Select Route task to all participants, in order specified from the list shown in

27-46 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite

27.3.7.2.3 Action Types To instruct the task service on how to route the task, rules can

specify one of many task actions. This is done by updating the TaskAction fact asserted into the rule session. However, rules should not directly update the TaskAction fact. Instead, rules should call one of the action RL functions, passing the TaskAction fact as a parameter. These functions handle the actual updates to the fact. For example, to specify an action of go forward, you must add a call GO_ FORWARDTaskAction to the action part of the rule. Each time a state machine routing rule is evaluated, the rule takes one of the actions shown in Table 27–13 :

27.3.7.2.4 Sample Ruleset This section describes how to use rules to implement custom

routing behavior with a simple example. A human workflow task is created for managing approvals of expense requests. The outcomes for the task are approve and reject. The task definition includes an ExpenseRequest payload element. One of the fields of ExpenseRequest is the total amount of the expense request. The routing slip for the task consists of three single participants assignee1, assignee2, and assignee3. By default, the task gets routed to each of the assignees, with each assignee choosing to approve or reject the task. Instead of this behavior, the necessary routing behavior is as follows: ResourceListType No Yes ManagementChainListTy pe No Yes ResourceType No Yes ParameterType No Yes AutoActionType No Yes ResponseType No Yes Table 27–13 Business Rule Actions Action Description Parameters GO_FORWARD Goes to the next participant in the routing slip default behavior. None PUSHBACK Goes back to the previous participant in the routing slip the participant before the one that just set the task outcome. None GOTO Goes to a specific participant in the routing slip. participant A string that identifies the label of the participant for example, Approver1 to which to route the task. COMPLETE Finishes routing and completes the task. The task is marked as completed, and no further routing is required. None ESCALATE Escalates and reassigns the task according to the task escalation policy usually to the manager of the current assignee. None Table 27–12 Cont. Use of Fact Types Fact Type Can Use in Routing Rules? Can Use in Participant Rules? Designing Human Tasks 27-47 ■ If the total amount of the expense request is less than 100, approval is only required from one of the participants. Otherwise, it must be approved by all three. ■ If an expense request is rejected by any of the participants, it must be returned to the previous participant for re-evaluation. If it is rejected by the first participant, the expense request is rejected and marked as completed. This behavior is implemented using the following rules. Note that when a rule dictionary is generated for advanced routing rules, it is created with a template rule that implements the default GO_FORWARD behavior. You can edit this rule, and make copies of the template rule by right-clicking and selecting Copy Rule in the Oracle Business Rules Designer. If the amount is greater than 100 and the previous assignee approved the task, it is not necessary to provide a rule for routing a task to each of the assignees in turn. This is the default behavior that is reverted to if none of the rules in the ruleset are triggered: ■ Early approval rule Figure 27–46 : Figure 27–46 Early Approval Rule ■ Push back on the rejected rule Figure 27–47 : Figure 27–47 Push Back On The Rejected Rule ■ Complete the Assignee1 rejected rule Figure 27–48 :