Specifying Task Parameters From the Priority list, select a priority value between 1 the highest and 5. This

27-86 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite The participant of the second task may want to see the approval history, comments, and attachments created when the manager approved the purchase. You can link these different tasks in the BPEL process by chaining the second task to the first task with this option. For chained tasks, the title of the new task cannot be set from the task metadata .task file. For example, assume existing Task A is chained with new task Task B, and Task B has a new title set in the Human Task Editor; this title is not recognized. Therefore, if the chained task requires a different title, it must be set in the task instance before calling the task service reinitiate operation. If a BPEL process is initiating the tasks, set the task title before the workflow service APIs are called. If a Java program is calling the workflow APIs programatically, then it must set the title. To include the task history of other tasks: 1. Select the Include task history from checkbox of the Advanced tab to extend a previous workflow task in the BPEL process. Selecting this checkbox includes the task history, comments, and attachments from the previous task. This provides you with a complete end-to-end audit trail. When a human task is continued with another human task, the following information is carried over to the new workflow: ■ Task payload and the changes made to the payload in the previous workflow ■ Task history ■ Comments added to the task in the previous workflow ■ Attachments added to the task in the previous workflow ■ Due date In the Include task history from list, all existing workflows are listed. 2. Select a particular human task to extend continue the selected human task. For example, a hiring process is used to hire new employees. Each interviewer votes to hire or not hire a candidate. If 75 of the votes are to hire, then the candidate is hired; otherwise, the candidate is rejected. If the candidate is to be hired, an entry in the HR database is created and the human resources contact completes the hiring process. The HR contact also must see the interviewers and the comments they made about the candidate. This process can be modeled using a parallel participant type for the hiring. If the candidate is hired, a database adapter is used to create the entry in the HR database. After this action, a simple workflow can include the task history from the parallel participant type so that the hiring request, history, and interviewer comments are carried over. This simple workflow is assigned to the HR contact. 3. Select a payload to use: ■ Clear old payload and recreate This option is applicable when the payload attributes in the XML files of the human tasks involved in this extended workflow are different. For example, the payload attribute for the human task whose history you are including has three extra attributes than the payload of the other human task. ■ Use existing payload This option is applicable when the payload attributes in the XML files of the human tasks involved in this extended workflow are the same. Designing Human Tasks 27-87

27.4.5 How to View the Generated Human Task Activity

When you have completed modeling the human task activity, the human task is generated in the designer. Figure 27–77 shows how a workflow interaction is modeled. Figure 27–77 also illustrates the interaction when no BPEL callbacks are modeled. In this case, after a task is complete, the BPEL process is called back with the completed task. No intermediary events are propagated to the BPEL process instance. It is recommended that any user customizations be done in the first assign, AssignTaskAttributes, and that AssignSystemTaskAttributes not be changed. Figure 27–77 Workflow Interaction Modeling Click the Expand icon next to the human task activity in Oracle BPEL Designer to display its contents, as shown in Figure 27–78 . Figure 27–78 Expanding the Human Task Activity

27.4.5.1 Invoking BPEL Callbacks

If intermediary events must be propagated to the BPEL process instance, select the Allow task and routing customization in BPEL callbacks checkbox in the Events section of the Human Task Editor. When this option is selected, the workflow service invokes callbacks in the BPEL instance during each update of the task. The callbacks are listed in the TaskService.wsdl file and described as follows: ■ onTaskCompleted This callback is invoked when the task is completed, expired, withdrawn, or errored. ■ onTaskAssigned AssignTaskAttributes Captures the user-defined attributes of the task such as title, payload, creator, priority, and so on InitiateTask Initiates the task by invoking the task service ReceiveCompletedTask Receives the completed task from the task service AssignSystemTaskAttributes Captures the system task attributes such as process id, process version, and so on