Now you will complete the expressions for the six decision percentage metrics in the monitor details model. There are three decisions in the process model, so there is a yes metric and a no metric in the monitor model for the result of each decision. There will be a measure in the dimensional model that averages each metric, so the measure will show the percentage of the time that the branch was taken.
If a decision has not been traversed, then you do not want to include it in the averaging calculation. For example, the Approve Without Review? task in the process model is the only decision point that is always traversed. Account in Good Standing? and the Acceptable Credit Risk? tasks are only traversed under specific conditions while the order is being handled.
If the value of a metric is null, then the averaging functions will not include that metric’s value in the calculation. Therefore, you will set the default value to null for each metric as the starting condition. Its value will only be set if the decision point is reached. If it isn’t reached, it will remain null and therefore be excluded from the averaging calculation.
You will also create a trigger for each decision that determines when the yes branch is taken, sets the value of the yes metric to 100, and also sets the value of the no metric to 0. Then you will create a trigger for each decision that determines when the no branch is taken, sets the value of the no metric to 100, and also sets the value of the yes metric to 0. Therefore, when the measure averages each metric for the instances, the values will be null, 0 or 100, and the average will represent the percentage of the time that the branch was taken.
From the process model, only the Approve Without Review? task is guaranteed to always be set to a non-null value at the completion of the process. Of the other two, at least one task will be set to non-null and possibly both, depending on the path the customer order takes through the process.
In the following expressions, the WebSphere® Integration Developer BPEL editor contains the names of the links (for example, “AcceptableCreditRiskOutput_to_Merge2Input2”) for the process.
OrderHandlingFuture1_FlowCONDTRUE/BPELData/bpc:elementName eq 'AcceptableCreditRiskOutput_to_Merge2Input2'
Save your work.
Monitor Details Model Metric | Default Value | Trigger | Metric Value Expression |
---|---|---|---|
Acceptable Credit Risk? Yes Percentage | <empty> | Acceptable Credit Risk Yes Trigger | 100 |
Acceptable Credit Risk No Trigger | 0 | ||
Account in Good Standing? No Percentage | <empty> | Account in Good Standing Yes Trigger | 0 |
Account in Good Standing No Trigger | 100 | ||
Account in Good Standing? Yes Percentage | <empty> | Account in Good Standing Yes Trigger | 100 |
Account in Good Standing No Trigger | 0 | ||
Approve Without Review? No Percentage | <empty> | Approve Without Review Yes Trigger | 0 |
Approve Without Review No Trigger | 100 | ||
Approve Without Review? Yes Percentage | <empty> | Approve Without Review Yes Trigger | 100 |
Approve Without Review No Trigger | 0 |
Average_Process_Duration ge dayTimeDuration('P3DT1H')
The trigger condition checks whether the Average Process Duration is greater than 3 days and 1 hour.
Percentage_of_Orders_Shipped < 85
Check_Order_Handling_Policy_for_Automatic_ApprovalENTRY/Input/Customer/Country
Check_Order_Handling_Policy_for_Automatic_ApprovalENTRY/Input/Customer/City
Check_Order_Handling_Policy_for_Automatic_ApprovalENTRY/Input/TotalPrice