Generated Monitor Models for a Process Application
When a process application is built within Process Designer, we have the option of importing that application into Integration Designer. Once available in ID, we can generate a Monitor Model using that Process Application as a source. Right clicking on the Process App produces a menu entry that includes:
If we select "Generate Monitor Model" a dialog is presented into which the names of the Monitor Project and the Monitor Model can be entered:
Next we are offered the opportunity for the Monitor Model to be constructed for us.
Once we have a monitor model built, we can build the Java EE projects and deploy them as normal.
<BPD> Steps Level
|| |Metric ID|Name|Description| |Step_Instance_ID|Step Instance ID|Monitoring Context key| ||Aux Last Event Time|| |COMPLETED|COMPLETED|Whether or not the monitoring context has been closed/completed.| |bmon_Cost|Cost|KPI cost of running this process step| |CreationTime|CreationTime|The time the activity was created.| |bmon_EndTime|End Time|End time of this process step| |bmon_ExecutionTime_Clock|Execution Time (Clock)|Execution time for running this process step| |bmon_LaborCost|Labor Cost|Labor cost of running this process step| |bmon_PerformerID|Performer ID|The id of the person who performed the step.| |bmon_PerformerName|Performer Name|The name of the person who performed the work| |bmon_PotentialPerformerID|Potential Performer ID|The id of the user who can work on this step| |bmon_PotentialPerformerName|Potential Performed Name|The name of the user who can work on this step| |bmon_ResourceCost|Resource Cost|Resource cost of running this process step| |bmon_Rework|Rework|Rework KPI| |Snapshot_ID|Snapshot ID|The snapshot ID of this step| |Snapshot_Name|Snapshot Name|The name of the snapshot of this step| |bmon_StartTime|Start Time|Start time of this process step| |bmon_State|State|The state of the step. Values seen include:
- | |bmon_Step_Name|Step Name|The name of this process step| |TerminationTime|TerminationTime|The time that the activity ended.| |bmon_TotalTime_Clock|Total Time (Clock)|Total Time for running this process step| |bmon_ValueAdd|Value Add|Value Add KPI| |bmon_WaitTime_Clock|Wait Time (Clock)|Wait time for running this process step| |bmon_f_<Variable>|<Variable>|Exposed variable.|
Working with Changed Variables
Consider a BPD variable called "
amount" that defines the amount of a sale within a process. This variable is flagged as "tracked". Imagine we wish to fire an outbound event from Monitor when the amount is changed to be greater than $5000.
This seems simple enough. We can define a trigger that is sourced when the value of the "
amount" metric changes. For example:
Unfortunately, there is a problem. The architecture of the events sent to Business Monitor is that EVERY event contains the current value of the "
amount" metric. This has the side effect of causing the "
amount" metric to flag as changed continuously. The "
Value changed" moniker of the trigger source is misleading as it is actually when the value is updated … even if the actual value of the metric doesn't change.
This would mean that our trigger would fire every time BPM publishes an event which is at the start and end of a BPD activity … even if that activity doesn't change the value of the "amount" variable.
Fortunately, there is a solution. What we do is introduce a new metric that contains the "old" value of the variable. We will call this new metric "amount*".
We say that this metric is updated when our "
AmountChanged" trigger occurs. Now we can add a condition to our trigger which reads:
What this says is that we only fire the "
AmountChanged" trigger when the old amount is not the same as the new amount (i.e. when the value changes).