Providing information about coach views
You can help people use a coach view by making it easier to find and providing information about it.
Procedure
Provide information such as tags, documentation, and icon images for the coach view in its Overview page:
- Add one or more tags to the coach view. Process Designer uses these tags to categorize the coach view on the palette and within the library. If you do not specify a tag, you can find your coach view in the No Tags category.
- In the Documentation field, provide information about the coach view that helps people who reuse your view in their own coaches or coach views. For example, describe the boundary events that your view fires.
- If you want your coach view to use named boundary events to move to the next step in the service flow, select Can Fire Boundary Event. In a human service diagram, you see these boundary events as wires. This diagram also shows the control that fires the boundary event.
- If you want your view to be selectable
as a template when someone creates a coach view, select Use
as a Template. Tip: Add a content box to your coach view so that coach views that are based on the template have an area in which users can drop content.
- If you want coaches or coach views that contain your coach
view to display a label at design time, select Supports
a label. To have the coach view access the
label value in the runtime environment, add the following code as
inline JavaScript in the Behavior page
of the coach view:
Also, see Example: showing the label of a complex coach view for information on how to display the label at runtime.this.context.options._metadata.label.get("value");
- If you want to improve performance for the coach view,
select Prototype-level event handlers. Selecting this option means that the event handlers for the
coach view are in the prototype and not in every instance. The performance
gain comes from having one set of the event handlers per coach view
definition instead of having a set per coach view instance. However,
the JavaScript code that
you use to create and access variables differs between coach view
instance-level event handlers and prototype-level handlers. For prototype-level
event handlers, you must use the this keyword. The
following table shows the coding difference for the two levels of
event handlers:
Instance-level event handlers Prototype-level event handlers - Define the variable in the inline JavaScript of the coach view:
var myVariable = "123";
- Access the variable in the load event handler:
if(myvariable == "123") { ... }
- Define the variable in the inline JavaScript of the coach view:
this.myVariable = "123";
- Access the variable in the load event handler:
if(this.myvariable == "123") { ... }
You can also look at the stock controls for examples of the coding difference. The stock controls of the Coaches toolkit in version 8.5.0 and higher have prototype-level event handlers. The stock controls in earlier versions of the Coaches toolkit have instance-level event handlers.
- Define the variable in the inline JavaScript of the coach view:
- If you are using the Process Designer web editor, you can specify HTML and JavaScript to create and enhance the design-time appearance of your coach view. For information, see Configuring the design-time appearance of coach views.