IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing monitor models > Create monitor models > Defining the visual model > Defining actions

Changing colors

You can color-code shapes in a diagram at run time based on the value of a metric or key performance indicator (KPI) at run time.

For example, in a model of a process, you might want any task that has exceeded a predefined elapsed duration to be displayed in red.

To color-code a shape set:


Procedure

  1. Place your mouse cursor on the diagram and find the shape set in the area of the diagram that you want to affect. The cursor changes to a hand when it is on the shape set. Click the diagram to highlight the corresponding shape set in the table at the bottom of the page.
  2. Right-click the shape set in the table and click Add Action > Set Color.

  3. To set the color based on an expression, add a condition in the Condition row.

    For example, if you want a shape set to be red if a metric value is higher than 60, you would type metric_name > 60. You can either type directly into the cell, or, for a large expression, click the button to open a resizable window. For help writing the expression, press Ctrl+Space.

    Because you are creating expressions to be resolved at run time, you can only use the elements in the context that the diagram is attached to. If the diagram is attached to a monitoring context, you can use the metrics, keys, counters, and stopwatches in that context. If the diagram is attached to a KPI context, you can use the KPIs in that context.

  4. To set the color that will fill the shape set, click the button in the Fill Color row. A Color window is displayed in which you can choose a color or click Define Custom Colors to create your own.

  5. To set the color that will outline the shape set, click the button in the Outline Color row. A Color window is displayed in which you can choose a color or click Define Custom Colors to create your own.


Example

After adding one Set Color action, you might want to add more Set Color actions on the same shape set, and enter the condition and fill color attributes for each.

For example, you might want to specify the color red for metric values higher than 60, orange for metric values of 30 - 60, and green for values less than 30.

After you have finished specifying actions for one shape set, you can apply them to any number of other shape sets. Right-click the action and click Apply to Shape Sets.

For example, after color-coding one activity in a process diagram based on its elapsed duration, you might decide to color several other activities the same way.

Defining actions