Pattern 39 (Data-Based Task Trigger)
Data-based task triggers provide the ability to trigger a specific task when an expression based on data elements in the process instance evaluates to true. Any data element accessible within a process instance can be used as part of a data-based trigger expression.
Trigger the Re-balance Portfolio task when the loan margin is less than 85% .
This pattern provides a means of triggering the initiation or resumption of a task instance when a condition based on data elements in the process instance is satisfied.
This Pattern is analogous to the notion of active rules [Har93] or event-condition-action (ECA) rules [PD99] found in active databases [DGG95]. A specific data-based trigger expression is associated with a task that is to be enabled in this way.
There are no specific context conditions associated with this pattern.
This pattern is directly supported in FLOWer through the specification of a condition corresponding to the required data expression on a milestone construct immediately preceding the to-be-triggered task. When the data condition is met, the task is then triggered. Similarly the pattern can be directly implemented in COSA through the use of transition conditions which incorporate the data condition being monitored for on the incoming edges to the to-be-triggered task. Depending on the semantics required for the triggering, the transition condition may or may not include the CONDITION.TOKEN tool agent (footnote 13). BPMN supports this pattern via the Rule Event construct.
Many PAIS do not directly support this pattern, however in some cases it can be constructed for offerings that support event-based triggering (i.e. WDP38) by simulating event-based triggering within the context of the process instance. This is achieved by nominating an event that the triggered task should be initiated/resumed on and then establishing a data monitoring task that runs (continuously) in parallel with all other tasks and monitors data values for the occurrence of the required triggers. When one of them is detected, the task that requires triggering is initiated by raising the event that it is waiting on. The only caveat to this approach is that the process environment must not support the Implicit Termination Pattern (WDP-11), e.g. Staffware. If the process environment were to support this pattern, then problems would arise for each case when the final task was completed as this would not imply that other outstanding task instances should also terminate. Since the monitoring task could potentially run indefinitely, it could not be guaranteed that it would cease execution at case completion. This scenario is illustrated in Figure 24. Task instance A is to be triggered when trigger condition evaluates to true. A task instance is set up to monitor the status of trigger condition and to complete and pass control to A when it occurs.
By adopting the strategy illustrated in Figure 24, the pattern can be indirectly implemented in BPEL. Although it could be similarly constructed in Staffware, WebSphere MQ and XPDL, all of these offerings support Implicit Termination and hence would lead to problematic implementations of this pattern as it would not be clear when the trigger condition task should be complete execution.
Figure 24: Data-based task trigger
An offering achieves full support if it has a construct that satisfies the description for the pattern. It achieves a partial support rating if programmatic extensions are required to facilitate the trigger handling.
To achieve a + rating (direct support) or a +/- rating (partial support) the product should satisfy the corresponding evaluation criterion of the pattern. Otherwise a - rating (no support) is assigned.
|Websphere MQ Workflow||3.4||-||Not supported|
|FLOWer||3.0||+||Directly supported via inclusion of milestones with data-based conditions preceding tasks that are waiting on the data condition|
|COSA||4.2||+||Directly supported by including a transition condition (which may include CONDITION.TOKEN) corresponding to the required data condition on the incoming arc to the task to be triggered|
|BPEL4WS||1.1||+/-||Indirectly achievable by including a data condition monitoring task in the process and triggering the to-be-triggered task via a link or alternatively using message events for triggering|
|BPMN||1.0||+||Supported through the Rule Event construct|
|Oracle BPEL||10.1.2||-||Not supported|
|jBPM||3.1.4||-||jBPM does not currently support data-based task triggers (as stated on www.jboss.com/index.html?module=bb&op=viewtopic&t=102283)|
|OpenWFE||1.7.3||-||Any support for this pattern was not observed in OpenWFE.|
|Enhydra Shark||2||-||Enhydra Shark does not support data-based task triggers. Deadline triggers are the classical example for this pattern. Even if deadlines could be specified for activities, any deadline expiration did not occur during execution.|
Summary of Evaluation