Coach views

Coach views are reusable sets of user interfaces that users use to interact with a business object or service. Coach views can comprise one or more sets of other coach views, data bindings, layout instructions, and behaviors.

Because coach views are reusable, each coach view instance can share parts of its user interface with other coach view instances within a coach. For example, you create a coach that contains a coach view instance that includes a set of address fields. If you create a second coach that needs the same address fields, you can reuse the same coach view. In both cases, the coach is using an instance of the coach view. You can edit the properties of each instance independently. For example, changing the label of one coach view instance does not change the label of the other. Both coach view instances use a reference to point to the coach view definition. This approach means that if the coach view definition changes, you can see the change reflected in the instances of the coach view.

Coach views in toolkits or process applications
You can create a coach view in the process application or in a toolkit. In general, create highly reusable coach views in toolkits and more specialized coach views in process applications. Choosing the process application means that you can reuse it only within the process application. However, it also means that if someone edits the coach view, the changes apply to the instances of the coach view in that process application. If the coach view is in a toolkit and then someone edits it, the changes could apply to all instances of the coach view in all the applications that use that version of the toolkit. Because editing a coach definition can affect many instances, be careful in your changes. For example, deleting a content box in the coach view definition could mean that coaches or coach views that contain instances of that coach view cannot display the content that they had defined in that content box. You cannot directly edit the definition of the coach view from within the parent coach or coach view. Instead, you must open the coach view definition first before you can change it.
BPM UI toolkit
The BPM UI toolkit, which is the default toolkit, provides a rich set of coach views or controls that you can use to build applications that run on multiple devices. Use the BPM UI coach views for new development. To become familiar with the BPM UI coach views, explore the Discover BPM UI sample. For more information, see BPM UI toolkit.
Earlier toolkits, such as the Responsive Coaches toolkit and the Coaches toolkit, are deprecated, but coaches that use coach views from these toolkits still work and are supported in the web Process Designer. You can convert most of your deprecated coach views into BPM UI coach views. For more information about the conversion, see Converting deprecated functions.
Composite-style vs widget-style coach development
Typically, when you build your coach view, you can follow one of the following patterns. Or you can use a combination of both patterns if your user interface is more complex and requires it.
  • Composite-style coach views are simple and do not require advanced technical skills to build. To create a composite-style coach view, add content to the layout by dragging and dropping controls from the palette. If your coach view has multiple areas of information, use the grid layout to arrange the controls, then set their properties and complete the data binding as required. Composite-style coach views can be reused in multiple coaches or in other coach views that can be built hierarchically.
  • Widget-style coach views are more complex and require a more technical skill set. Typically, the widget-style coach views are custom coach views that can include, for example, a custom HTML segment that you can populate with HTML code, or an iFrame that has a specific ID. You can set the configuration properties of the widget-style coach view and add inline CSS and inline JavaScript logic in the Behavior page. For behavior that occurs at run time, for example, when a page is loaded or a button is clicked, you can place the JavaScript logic inside the coach view's event handlers, under Events. For tips on how to develop widget-style coach views for use with IBM® Robotic Process Automation with Automation Anywhere, see the following section.
The WYSIWYG for the user interface that you are building depends on the type of coach view: for a composite-style coach view, the WYSIWYG renders all the embedded coach views. For a widget-style coach view, consider adding Advanced Preview HTML or JavaScript for a better WYSIWYG experience. You can use an image-based preview if the WYSIWYG experience is not important.
To ensure optimal UI performance, IBM BPM provides guidance as you develop and test your coach-based user interfaces. For more information, see Accessing coach performance statistics.
IBM BPM version 8.6.0 cumulative fix 2017.12

Considerations for IBM Robotic Process Automation with Automation Anywhere

With IBM Robotic Process Automation with Automation Anywhere (IBM RPA), repetitive tasks in IBM BPM processes can be automated and expedited by using bots. To enable an efficient interaction with the IBM RPA bots, the following enhancements were made to the IBM BPM coach framework.

Coach support for IBM RPA
To develop reliable user interfaces that IBM RPA bots can use, you must provide a stable and predictable identification of coach views in your coaches. To ensure that, when you develop your coaches and coach views in the web Process Designer, use the context.controlidpath property that is available in the context JavaScript API object. See The coach view context object.
The context.controlidpath property uniquely identifies a coach view instance within a coach. It remains stable through most coach layout changes and can be used as a base to create unique IDs for DOM elements in the implementation of the coach view. For example, it can tolerate changes such as new content added to the coach, content moved around inside the coach, for example, between sections and layout widgets, or changes to field labels.
Both the BPM UI toolkit and the Responsive Coaches toolkit are enhanced to use the improved framework. No support for IBM RPA is provided for the coach views in the Coaches toolkit.
Coach development tips
To facilitate the automation of tasks in IBM RPA, keep in mind the following points when you develop your IBM BPM coaches and coach views:
  • Use context.controlidpath as the base string for HTML IDs within the DOM structure of your coach views. For example, when you build a Text coach view, you might want to give your label DOM element the ID text-label-<controlidpath> and the input element the ID text-input-<controlidpath>.
  • Apply the unique identification to all the DOM elements with which the user might want to interact in an RPA task, including the following elements:
    • Form-style fields
    • Read-only information that might be used by the task, for example, text that might be copied by the task for some purpose
    • Page navigation fields, such as Tab controls
  • To verify that a control works well with the IBM RPA bots, record the interactions using the RPA Smart Recorder, and ensure that the captured HTML IDs are the expected ones, as described earlier. Iterate through recording, playback, and HTML ID assignment until all the interaction elements have stable IDs.
    Note: Users might still need to make minor adjustments to the recorded objects to optimize the playback, but the adjustments should be limited to simple changes such as changing keystroke delays, removing captured properties, and so on.

For more information about IBM RPA, see the IBM Robotic Process Automation with Automation Anywhere V10.0 documentation.