IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing monitor models > Create monitor models > Defining the visual model
Defining actions
To be updated dynamically at run time, a Scalable Vector Graphics (SVG) file needs a group of named shape sets for referencing sets of individual shapes in the SVG diagram. It also needs a set of actions (such as color or text changes, or effects on widgets in the Monitor dashboard space) that describe how the SVG elements represented by the shape sets change their properties based on the values of metrics or key performance indicators (KPIs) at run time.
If you created an SVG file following the instructions in Preparing SVG diagrams or exported an SVG file from WebSphere Business Modeler, the file contains shape sets with IDs that are associated with the monitor model namespace. When you import the SVG diagram into the Monitor Model editor, a shape set is automatically created for each shape with an ID.
There are several ways to specify how diagrams will be dynamically updated based on metric or KPI values in the Business Monitor dashboards:
- Use Set Color to change the fill or outline color of the SVG element associated with a shape set.
For example, regions of a map could change color based on the values of KPIs, or tasks in a process diagram could change color based on the values of metrics.
- Use Set Text to set a text value somewhere in the diagram.
For example, a text box could display different explanatory text or the value of a KPI or metric.
- Use Set Diagram Link to associate a shape set with a context ID, providing a hyperlink to another image when the SVG element is clicked.
For example, clicking a state on a map of the United States could link to a diagram of that individual state.
- Use Hide Shapes to hide a set of diagram elements based on the value of a metric or KPI.
For example, you could have tasks in a process diagram disappear as they are completed.
- Use Send Human Task Notification When Clicked to affect certain human task widgets on the same page in the Monitoring dashboard space.
For example, if a process diagram shows a process consisting of several different human tasks, clicking a human task could update the human task widgets to show instances of only that task.
- Use Send Notification When Clicked to affect custom widgets on the same page in the Monitoring dashboard space.
For example, in a diagram of a store, clicking a specific department could send an event that is received by an inventory widget. The inventory widget then makes a web service query to retrieve the inventory for that department and displays the inventory information.
To define an action:
Procedure
- 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.
- Right-click the shape set in the table and click Add Action. Add the action that you want. See the pages that follow for more details about the individual actions.
- After you have added an action, you can right-click the action and click Apply to Shape Sets to associate the same action with a different shape set, or with many shape sets.
Results
Actions that apply to more than one shape set are placed under each of the shape sets to which they apply. Changing one action changes them all (because there is really only one).
- 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.
- Displaying text
You can display dynamic text on a diagram at run time.
You might want to display the current value of a metric or key performance indicator (KPI) , or you might want to display a different text string based on the current value.
For example, you might want to display the elapsed duration beside a task in a process diagram.
- Linking to other diagrams
A dashboard user can click a shape in the dashboard at run time and navigate to a diagram associated with another monitoring context or key performance indicator (KPI) context. You can either set the link to work only if the value of a metric or KPI matches a certain expression, or set the link to go to different diagrams based on the value.- Hiding shapes
You can hide shapes in the Scalable Vector Graphics (SVG) diagram based on the value of a metric or key performance indicator (KPI) at run time.
For example, in a process diagram, you can hide the tasks that have completed and show only the tasks that are still running or have not yet started.
- Sending human task notifications
You can click an area in the diagram at run time and have it affect certain human task widgets on the same page of the Monitor dashboard space. The information in the human task widgets is based on the area that you selected in the diagram.
- Sending notifications to custom widgets
When you create custom widgets, you can enable communication between the diagram and the widgets at run time. You can click an area in the diagram and have it send information to other custom widgets created that are on the same page in the Monitor dashboard space. The widget can change its display based on the area that is clicked in the diagram. You simply design your custom widget to accept specific events and your diagram to emit those events.- Defining the actions of elements in process application diagrams
You can define the actions of elements such as activities in process application diagrams. These actions include Set Color, Set Text, Set Diagram Link, and so on.