To capture runtime information about the progress of a service flow execution for tracking or reporting purposes, you can model your service
to emit a tracking event.
About this task
When you build your service, determine the point in the service flow at which you want runtime
data to be captured, and then insert an intermediate tracking node in the diagram at that point. A
tracking event is emitted when the service execution passes through the intermediate tracking event
node. The intermediate tracking event emits an EVENT_THROWN monitoring event. The event reports that
a message was sent, or an exception error or tracking data was created.
To track service flow variables for
performance monitoring, associate the variables with a tracking group, which holds the variable data
that you want to track. In the properties of the tracking event, bind a service variable to each
tracked field that you want to use. For more information about tracking groups, see Tracking groups of process variables.
Procedure
To model tracking logic into your service for data capture at run time, complete the
following steps:
- Open the designer.
-
From the library, create or open the service flow or heritage human service that you want to
work with, and click its Diagram tab.
-
From the palette, under Error, use the Tracking
tool to add an intermediate tracking event node to the service diagram. Wire the node in
the diagram, and then select the node.
- In the Implementation tab, under Intermediate
Event Type, ensure that the event type is set to Tracking.
Under Event Properties, specify the properties
for tracking data at run time:
- Click Select next to Tracking group to specify the
tracking group that you want to use. To create a tracking group, click New.
See Creating a tracking group.
- Optional: Under Associate tracked fields with other
task, you can specify the ID of the task with which you
want to associate the tracked fields in the selected tracking group.
You can also use the variable picker (
) to choose an existing variable from the library.
- Optional: Under Sort tracked fields by, bind a service variable to each
of the listed tracked fields. Use the variable picker (
) to select a variable from the variables list for the service flow. The variable must be a
simple type. You can also assign expressions and literal values to tracking group fields.
If you have multiple tracked fields, you can sort them by selecting a sort order from
the Sort tracked fields by list. Choose one of the following options:
- Default Order: The tracked fields are sorted as they appear in the
tracking group definition.
- Alphabetical (A-Z): The tracked fields are sorted in an alphabetical
list.
- Alphabetical (Z-A): The tracked fields are sorted in a reverse
alphabetical list.
- Optional: In the Pre & Post tab,
you can assign pre-execution and post-execution scripts to the tracking
event node. The JavaScript code that you add as pre- and post-execution
scripts runs immediately before or after the event runs.
- Click Save or Finish Editing.