You can build a coach as the user interface that process participants
or case owners use to interact with a service.
About this task
In the first stage of designing a coach, your goal might be to build a mock-up. The mock-up
contains static elements to visualize what data the coach needs at run time and where the coach
displays the data in its layout. After you complete the first stage to design the look of the coach,
you then feed real business data to the coach controls. This step
requires you to create bindings between the coach controls and the data structures (variables) that
represent the business data in your IBM® Business
Process Manager processes or cases. Your process participants or case owners can then interact with the business
data, which helps them make the appropriate decisions.
Procedure
Building a coach is often an iterative process in which you loop back to refine the
coach as you build it. Although you can complete some of the steps in any order, in general you take
the following steps:
- Create one or more mock-ups for the coach. Use the mock-ups to identify elements in the coach
that are common with other coaches. Identify the following information:
- The elements in the coach that are reusable
- The best layout for the user interface elements in the coach
You can then use this information to decide which parts of the coach you can implement as
reusable coach views. For example, after you create the mock-up, you see that your coach contains
two sets of identical address fields. Instead of creating the two sets of address field in the
coach, you create one address field coach view. You can then use it for both sets of address
fields.
- f there are toolkits that contain artifacts that your coach can use, add a dependency to these
toolkits. These artifacts include business objects, coach views, and files. The dependency is to a
particular snapshot of the toolkit. If you are revising an existing coach, you can upgrade the
dependency to a different snapshot of the toolkit. The upgrade is optional. If you do not do the
upgrade, the coach continues to use the existing dependency.
Tip: Process applications created in IBM BPM Version 8.5.6 and earlier have a dependency on
the Coaches toolkit by default. Process applications created in V8.5.7 have a dependency on the Responsive Coaches
toolkit by default.
- If the coach views that your coach will use do not exist, create them. For information, see
Developing reusable coach views.
- In the human service
diagram, add the coach to the diagram and then double-click it
to edit it.
- Drag coach views or variables onto the layout of the coach.
These coach views can be the coach views that you created earlier or the stock controls. The variables are business objects and their parameters that are defined
for the human service
. For the variables, the Designer puts the coach view that is
associated with the business object or parameter type onto the layout. For example, if you drop a
variable that is of the String type, the Designer puts a text stock control that is bound to the
variable. If the variable type does not have an associated coach view, the Designer puts a
placeholder message on the layout instead. You can then use the placeholder to manually specify the
binding between the variable and a coach view.
For examples of dragging a coach view and variables onto a coach, see
Example: creating a tabbed coach.
Tip: For elements in the coach that you do not plan
to reuse, you can drop the appropriate palette component onto the coach. For example, for text
instructions for the user, you can drop an HTML element and add the text as HTML code. You can also
drag fields within a variable directly onto the coach.
Important: - Uninitialized variables that are bound to any coach view are automatically initialized to
default values that are appropriate for the variable type (for example,
String--"" empty string,
integer--0,boolean--false, complex object--{}
empty object). Note that if the coach optimization is enabled, initialization changes to
formerly uninitialized variables that receive an explicit default value when the coach is loaded are
not sent back for processing unless the changes are made by the user. For more information about
improving performance by enabling the coach optimization, see Enabling optimization for coaches.
Additional information about the coach
initialization of variables is available in the technote The initialization
status for some Coach variables for IBM Business Process Manager (BPM) might change
unexpectedly.
- For correct coach modeling, it is recommended that you do not rely on the
coach initialization of variables. Instead, you should explicitly initialize all the variables that
are bound to the coaches to the appropriate default values. Alternatively, you can make adjustments
for the fact that variables might not be initialized after the coach step in the human service.
- To lay out content in the coach, use the grid to specify cells. Each cell provides a location
on the page to display its contents. For information, see Laying out a coach or coach view using the grid layout. For
example, you have coach views that display meta data and coach views that display a form. You can
create a cell on the left to display the form coach views and a cell on the right to display the
meta data coach views. Use the content mode to add the appropriate coach views to the cells.
- To edit the coach view instances, select them and then change their properties. For example, for text fields and buttons, change the label to something useful for users.
Many coach views contain configuration options that you can set for each instance. You can also
override the styling of the coach view instances by adding CSS classes and attributes as HTML
properties. These CSS classes are defined elsewhere such as in the coach view definition in a CSS
file uploaded as an included script.
- If the coach views support having different types of visibility, define their visibility. For
information, see Setting the visibility of coach views.
Important: You can set the visibility of the controls in the Coaches toolkit. Custom
coach views might not provide you with this functionality. If a custom coach view does not support
setting visibility, contact the developer of the coach view to add support for this
functionality.
- Wire the coach into the service flow by connecting boundary events that the coach views fire to
the appropriate elements in the service flow.
- If needed, validate the data in the coach. For information about validating coaches in client-sided human services, see Validating coach data without exiting a coach and Validating coach data after exiting a coach. For information about
validating coaches in heritage human services, see Validating coaches in heritage human services.
- Click Save or Finish
Editing.
- In the Designer or the Inspector, click .
- Review the coach and update the coach or the coach views that it contains until the coach looks
and behaves as you intend.