Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle SOA Suite
11g Release 1 (11.1.1.4.0)

Part Number E10224-07
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

29 Designing Task Forms for Human Tasks

The human workflow service creates tasks for users to interact with the business process. Each task has two parts—the task metadata and the task form. The task form is used to display the contents of the task to the user's worklist.

Oracle BPM Worklist displays all worklist tasks that are assigned to a user or a group. When a worklist user drills down into a specific task, the task form renders the details of that task. For example, the task form for the Fusion Order Demo ApprovalHumanTask shows order information such as the order total and ship-to information.

This chapter describes how to design and customize task forms using ADF task flows in Oracle JDeveloper.

This chapter includes the following sections:

29.1 Introduction to the Task Form

If your SOA composite includes a human task, then you need a way for users to interact with the task. The integrated development environment of Oracle SOA Suite includes Oracle Application Development Framework (Oracle ADF) for this purpose. With Oracle ADF, you can design a task form that depicts the human task in the SOA composite.

The task form is a Java Server Page XML (.jspx) file that you create in the Oracle JDeveloper designer where you created the SOA composite containing the human task. Note that you must set the page encoding to UTF-8 in Oracle JDeveloper before creating the Java Server Page XML file. You can do this in Oracle JDeveloper by choosing Tools > Preferences > Environment, and selecting UTF-8 using the Encoding dropdown list.

Figure 29-1 shows the Oracle JDeveloper ADF Task Flow Based on Human Task option where you start creating a task form.

Figure 29-1 ADF Task Flow Based on a Human Task, in Oracle JDeveloper

Description of Figure 29-1 follows
Description of "Figure 29-1 ADF Task Flow Based on a Human Task, in Oracle JDeveloper"

29.1.1 What You May Need to Know About Task Forms: Time Zone Conversion

Time zone conversion is not automatic for datetime elements in the task payload when a task form is created. You must add the <af:convertDateTime> tag to enable time zone conversion on a datetime element. See any standard task header time label for an example. Example 29-1 shows a sample header.

Example 29-1 Time Zone Conversion

<af:outputText value="#{bindings.createdDate.inputValue}"
                        id="ot15">
         <f:convertDateTime type="#{pageFlowScope.dt}"
                              timeZone="#{pageFlowScope.tz}"
                              dateStyle="#{pageFlowScope.df}"
                              timeStyle="#{pageFlowScope.tf}"/>
         </af:outputText> 

29.2 Associating the Task Flow with the Task Service

When you create an ADF task flow based on a human task, you must select a task metadata file to generate the data control. This data control is used to lay out the content on the page and connect to the workflow service engine at execution time to retrieve task content and act on tasks. See "Getting Started with ADF Task Flows" in Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework for more information.

The hwtaskflow.xml file is used to capture the details on connecting with the service engine. By default, it uses remote EJBs to connect to the workflow server. The SOA server URL and port are automatically determined by using WebLogic Server runtime MBeans. However, you can override these by explicitly specifying the URL and port information here.

Seed a user that has ORMI privileges so that the task details application can connect to the workflow service. You can seed this user by using Oracle Enterprise Manager Fusion Middleware Control.

29.3 Creating an ADF Task Flow Based on a Human Task

ADF task flows are used to model the user interface for the task details page. You can create the task flow in the same application that contains the human task or in a separate application.

You must have previously created a human task (.task file) as part of a SOA composite before you can create a task flow. See Chapter 28, "Designing Human Tasks" for how to create the.task file.

If the task flow is in the same application as the human task, create a different project for the task flow. If the SOA composite contains multiple human tasks, create a separate project for each ADF task flow associated with each human task. By using an ADF task flow, you create data controls based on the task parameters and outcomes.

To autogenerate an ADF task form, access the human task in the SOA composite application (form and task are in the same application). See Section 29.3.1, "How To Create an ADF Task Flow from the Human Task Editor," for more information.

To create an ADF task form in a separate application, create the new application and project and browse for the .task file for the human task. See Section 29.3.2, "How To Create an ADF Task Flow Based on a Human Task," for more information.

29.3.1 How To Create an ADF Task Flow from the Human Task Editor

The.task file that specifies the human task is easily associated with the task flow when the two are located in the same application.

To create an ADF task flow for a human task:

  1. Open the BPEL process within the SOA composite application.

  2. Double-click the human task activity and click Edit.

    Figure 29-2 shows the Human Task dialog.

    Figure 29-2 Editing a Human Task

    Description of Figure 29-2 follows
    Description of "Figure 29-2 Editing a Human Task"

  3. In the .task tab (shown in Figure 29-3), click Create Form and select Auto-Generate Task Form.

    Figure 29-3 Creating a Task Flow from the Human Task Editor

    Description of Figure 29-3 follows
    Description of "Figure 29-3 Creating a Task Flow from the Human Task Editor"

  4. Provide a project name and a directory path (or use the default) and click OK.

    The taskDetails1_jspx icon appears in the designer, as shown in Figure 29-4.

    Figure 29-4 The taskDetails1_jspx Icon

    Description of Figure 29-4 follows
    Description of "Figure 29-4 The taskDetails1_jspx Icon"

The task flow and task form are complete and ready to be deployed.

29.3.2 How To Create an ADF Task Flow Based on a Human Task

The ADF Task Flow Based on Human Task option (shown in Figure 29-1) creates an ADF task flow and additional artifacts to make deployment easier. When you select the .task file to associate with the ADF task flow, human task data controls are created based on the task parameters and outcomes. These are then available to use in the JSPX page. You must have access to the SOA composite project while creating the task flow project.

To create an ADF task flow based on a human task:

  1. From the File main menu, select New > Applications > SOA Application.

  2. Click OK.

  3. Provide an application name and directory information (or accept the default), and click Finish.

  4. Right-click the project name and select New.

  5. Under Web Tier, select JSF.

  6. Select ADF Task Flow Based on Human Task and click OK.

  7. In the SOA Resource Browser, find and select the .task file where you defined the human task and click OK.

    1. If the human task is in the same application as the task definition, then click File to use the file browser to navigate to the .task file, which is typically in the composite directory.

    2. If the human task is in a different application, then click Resource Palette to use the MDS resource catalog and find the .task file in the composite application.

    3. If the .task file is located within the current application, then click Application.

    This displays the Create Task Flow dialog and creates the data controls.

  8. In the Create Task Flow dialog, accept the defaults and click OK.

    The taskDetails1_jspx icon appears in the designer, as shown in Figure 29-4. The task flow has a view, a control flow, and a task return.

To continue creating the task form, see the following:

or

29.3.3 What Happens When You Create an ADF Task Flow Based on a Human Task

With an ADF task flow based on a human task, the task flow application has task data controls that wire the task form with the workflow services. The data controls provide the following:

  • Various parameters and operations to access task data and act on it

  • Drop handlers with which you can create interface regions to display the contents of the task

The human task-aware data controls appear in the Data Controls panel of the Oracle JDeveloper Application Navigator, as shown in Figure 29-5.

Figure 29-5 The Task Collection in the Data Controls Panel

Description of Figure 29-5 follows
Description of "Figure 29-5 The Task Collection in the Data Controls Panel"

The data controls for the task (represented by the Task node in Figure 29-5) have drop handlers to render the task form. See Section 29.4, "Creating a Task Form," for more information.

29.3.4 What You May Need to Know About Having Multiple ADF Task Flows That Contain the Same Element with Different Meta-attributes

You must create separate ADF task flows if both contain the same element, but with different meta-attributes specified (for example, editable and noneditable).

For example, assume you perform the following tasks.

  1. Create two task form applications for a SOA composite application:

    • Task form application one (for example, named EnterBankDetails.task) has one editable payload (for example, named BankDetails) and one noneditable payload (for example, named Employee).

    • Task form application two (for example, named ValidatePersonalInformation.task) has one editable payload (for example, also Employee).

    While creating the task form, the wizard provides you with the option to define the ADF table for payload Employee.

  2. Complete the wizard, then deploy the process.

  3. Invoke the process.

  4. Log in to Oracle BPM Worklist.

    There is a Validate Personal Information task (for ValidatePersonalInformation.task).

  5. Select the task.

    Employee details are available for modification, as expected.

  6. Add a new record, then approve the task.

  7. Select the Enter Bank Details task (for EnterBankDetails.task). In the task form, note that the Insert New and Delete buttons are still present for Employee data, even though it is a noneditable payload.

  8. Click Delete, then select Approve. The payload gets deleted.

Ensure that you create two separate ADF task flow applications because both contain the Employee element, but with different meta-attributes specified (editable and noneditable).

29.4 Creating a Task Form

You can create a task form by using the Auto-Generate Task Form option, the Launch Task Form Wizard option, or by using human task drop handlers.

29.4.1 How To Create an Autogenerated Task Form

The autogenerated task form can be further edited as needed.

To create an autogenerated task form:

  1. Open the BPEL process within the SOA composite application.

  2. Double-click the human task activity and click Edit.

  3. From the .task editor, click Create Form and select Auto-Generate Task Form, as shown in Figure 29-6.

    Figure 29-6 Creating a Task Form

    Description of Figure 29-6 follows
    Description of "Figure 29-6 Creating a Task Form"

  4. Provide a project name and a directory path (or use the default) and click OK.

    The default form opens in the taskDetails1.jspx tab. The default form for ApprovalHumanTask is shown in Figure 29-7.

    Figure 29-7 Autogenerated Task Form for ApprovalHumanTask

    Description of Figure 29-7 follows
    Description of "Figure 29-7 Autogenerated Task Form for ApprovalHumanTask"

29.4.2 How to Register the Library JAR File for Custom Page Templates

You can optionally specify your own custom page templates in the Custom Task Form wizard. As described in Section 29.4.3, "How To Create a Task Form Using the Custom Task Form Wizard," you select Custom Page Template in the Name and Definition page of the Custom Task Form Wizard and specify the library JAR file name and the path to the .jspx template file within the JAR file.

As a prerequisite, you first must register the library JAR file in Oracle JDeveloper.

To create the library JAR file for custom page templates:

  1. From the Tools menu, select Manage Libraries.

  2. Click New.

    The Create Library dialog appears.

  3. Highlight Class Path, and click Add Entry.

    The Select Path Entry dialog appears.

  4. Select the class path for the library, and click Select.

    The class path is displayed below Class Path and the library JAR file name is displayed in the Library Name field. Ensure that the library name you select ends with a suffix of .jar. Figure 29-8 provides details.

    Figure 29-8 Custom Library JAR File

    Description of Figure 29-8 follows
    Description of "Figure 29-8 Custom Library JAR File"

  5. Select the Deployed by Default checkbox.

  6. Click OK.

    When you run the Custom Task Form wizard, you select Custom Page Template on the Name and Definition page, and enter the following information that you registered in the Create Library dialog:

    • The same library name as you entered in the Library Name field in the Create Library dialog; these names must match.

    • The path to the .jspx templates file in the library JAR file in the Template Path field.

29.4.3 How To Create a Task Form Using the Custom Task Form Wizard

This wizard enables you to create a task form using ADF page templates and standardized task regions. The page templates can be either of the following:

  • Default page templates that are automatically provided. You select Default Page Template in the Name and Definition page of the Custom Task Flow wizard.

    There are two types of default templates:

    • Nontabbed, default templates

    • Tabbed templates in which the payload and comments, attachment, and history sections are displayed on a separate tab.

  • Custom page templates that you define. You select Custom Page Template in the Name and Definition page of the Custom Task Flow wizard. You package a page template and its artifacts into an ADF library JAR file. These JAR files can be packaged, deployed, discovered, and used like any other Oracle library component. The wizard prompts you to specify the JAR name and template location in the JAR.

Page templates let you define entire page layouts, including values for certain attributes of the page. When pages are created using a template, they all inherit the defined layout. When you make layout modifications to the template, all pages that consume the template automatically reflect the layout changes.

The templates used in the wizard generate content for the following six facets:

  • Actions

  • Attachments

  • Body

  • Comments

  • Header

  • History

For the action, header, and body facets, you can pick the content and attributes that you want to display and then fine tune the layout.

All six facets are defined in the default page templates. In the case of custom templates, you use these exact facet names in your template. If your template does not include these facets, then the facet content is not generated in the JSPX file.

If you do not want to include page templates in your task form, select None in the Name and Definition page. In this case, the wizard generates a task form with a header, body (one or more), and footer, and provides for tabular formatting into columns and rows. You can select any of the task (system) actions to display on the form and you can specify that the custom actions defined for the human task appear on the form as buttons. Any or all parts of the payload can be selected to appear, as well as attachments and comments.

For more information about facets, see Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.

To create a custom task form:

  1. Open the BPEL process within the SOA composite application.

  2. Double-click the human task activity, and click the Edit icon.

    The Human Task Editor appears.

  3. Above the editor, click Create Form and select Launch Task Form Wizard.

  4. Provide a project name and a directory path (or use the default), and click OK.

  5. In the Form Name field on the Name and Definition page, shown in Figure 29-9, provide the name of the form (.jspx file) that is generated at the end of the wizard. The default name, Humantasknumber_Form, is provided if you do not provide a name. Ensure that valid characters are used in the name. Spaces are not permitted.

    Figure 29-9 Custom Task Form Wizard: Form Name and Definition

    Description of Figure 29-9 follows
    Description of "Figure 29-9 Custom Task Form Wizard: Form Name and Definition"

  6. If you want to specify advanced definitions, expand Advanced.

  7. Specify the following information, and click Next. This form is created as an ADF task flow and added to the project.

    • Task Flow Name: The name of the ADF task flow that is generated at the end of the wizard. Accept the default name of Humantasknumber_TaskFlow or specify a different name.

    • Page Templates: The page template to use.

      • None: Select to create a task form that does not use a page template. This is the default selection.

      • Default Page Template: Select to use the default page template.

      • Custom Page Template: Specify the library name (for example, MyTemplatesLibrary.jar) and template class path in the JAR file (for example, templates/MyTemplate.jspx) to use. This is the library name and template class path that you specified in the Create Library dialog in Section 29.4.2, "How to Register the Library JAR File for Custom Page Templates."

        If the template is not found after the wizard finishes, a message is displayed indicating that the template was not found, and that task form generation is to continue without the use of a template.

  8. On the Header page, shown in Figure 29-10, perform the following procedures and click Next.

    • In the Actions facet section, select the options to include in the title bar of the task form:

      • Other actions (menu): Lists the system actions that are possible for the task, such as Request Information, Reassign, Renew, Suspend, Escalate, and Save.

      • Outcomes (buttons): Displays buttons for task actions that are defined in the human task, such as setting task outcomes.

    • In the Header facet section, enter the number of display columns. If you want each header label to display in its own column, then enter the same number as the number of headers you move into the Selected list. If you enter 1, but select 7 headers, all 7 headers appear in one column.

    • Move header labels into the Selected list and reorder them as needed.

      Figure 29-10 Custom Task Form Wizard: Setting Up the Header

      Description of Figure 29-10 follows
      Description of "Figure 29-10 Custom Task Form Wizard: Setting Up the Header"

  9. On the Body page, shown in Figure 29-11, perform the following procedures in the Body facet section to set up the form, and click Next:

    • Enter a title that describes the body panel.

    • Enter the number of columns for row 1. For a simple form, you may want to enter the same number as you entered for the number of header columns.

    • Click the Add (+) button to add more rows. For each new row, you can also specify the number of columns. Each row can have its own column layout. For each column in each row, a body page is created, labeled Row1, Column1, and so on.

      Figure 29-11 Custom Task Form Wizard: Setting Up the Body

      Description of Figure 29-11 follows
      Description of "Figure 29-11 Custom Task Form Wizard: Setting Up the Body"

      Note:

      If you specify rows or columns for which no payload data appears, then an empty panel group is displayed. You can use this blank section to add content to the form later by using data controls.
  10. On the Row1 Column1 page, shown in Figure 29-12, move all or part of the payload to the Selected list and click Next.

    Figure 29-12 Custom Task Form Wizard: Selecting the Body Fields

    Description of Figure 29-12 follows
    Description of "Figure 29-12 Custom Task Form Wizard: Selecting the Body Fields"

  11. For any Rown Columnn page after Row1 Column1, repeat Step 10 and click Next.

    The Footer page that displays is based upon the page template you selected on the Name and Definition page in Step 7 (either Default Page Template or Custom Page Template).

    1. If you selected Default Page Template, the Footer page shown in Figure 29-13 is displayed. Deselect any comments, attachments, or history facet that you do not want to include in the footer, and click Next. By default, the comments, attachments, and history facets are all selected.

      Figure 29-13 Custom Task Form Wizard: Selecting the Footer Fields for the Default Page Template

      Description of Figure 29-13 follows
      Description of "Figure 29-13 Custom Task Form Wizard: Selecting the Footer Fields for the Default Page Template"

    2. If you selected Custom Page Template, the Footer page shown in Figure 29-14 is displayed. Select any comments, attachments, or history facet that you want to move to the Selected list, and click Next.

      Figure 29-14 Custom Task Form Wizard: Selecting the Footer Fields for the Custom Page Template

      Description of Figure 29-14 follows
      Description of "Figure 29-14 Custom Task Form Wizard: Selecting the Footer Fields for the Custom Page Template"

  12. On the Summary page, shown in Figure 29-15, inspect your selections. Click Back to make changes or click Finish.

    Figure 29-15 Custom Task Form Wizard: Summary

    Description of Figure 29-15 follows
    Description of "Figure 29-15 Custom Task Form Wizard: Summary"

    The Designer initializes and the form_name.jspx tab is displayed, as shown in Figure 29-16 (upper part of tab) and Figure 29-17 (lower part of tab).

    Figure 29-16 Custom Task Form (Upper Part of Tab)

    Description of Figure 29-16 follows
    Description of "Figure 29-16 Custom Task Form (Upper Part of Tab)"

    Figure 29-17 Custom Task Form (Lower Part of Tab)

    Description of Figure 29-17 follows
    Description of "Figure 29-17 Custom Task Form (Lower Part of Tab)"

29.4.4 How To Create a Task Form Using the Complete Task with Payload Drop Handler

The human task drop handlers appear in the context menu of the designer, as shown in Figure 29-18.

Figure 29-18 Human Task Drop Handlers for Creating the Task Form

Description of Figure 29-18 follows
Description of "Figure 29-18 Human Task Drop Handlers for Creating the Task Form"

Other ADF drop handlers—for forms, tables, trees, and so on (shown in Figure 29-18)—can also be used to create task forms. See Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework for more information about standard ADF drop handlers .

Complete Task with Payload

This option creates the combination of all the preceding task form components (the task header, task history, task actions, and task comments and attachments), plus the interface for the payload. The payload interface is created as follows:

  • All text nodes are created as text input fields.

  • If an element has maxOccurs="unbounded", then it appears as a table.

  • Nested tables are not rendered; that is, if an element has maxOccurs="unbounded" and it has a child with maxOccurs="unbounded", then the child element is not rendered.

  • If there are multiple levels of nesting, then drag and drop the individual sections and use a standard ADF drop handler.

Complete Task without Payload

This option creates the combination of all of the preceding task form components (the task header, task history, task actions, and task comments and attachments).

Task Details for Email

This option creates an ADF region that renders well when sent by email. It generates the form shown in Figure 29-19.

Figure 29-19 Task Form for Email Notification

Description of Figure 29-19 follows
Description of "Figure 29-19 Task Form for Email Notification"

See Section 29.7, "Creating an Email Notification," for more information.

Task Header

All the standard header fields are added to the task form. This includes the task number and title; the state, outcome, and priority of the BPEL process, and information about who created, updated, claimed, or is assigned to the task. The header also displays dates related to task creation, last modification, and expiration. You can add or remove header fields as required for your task display.

Figure 29-20 shows an example of header information.

Figure 29-20 Header Information

Description of Figure 29-20 follows
Description of "Figure 29-20 Header Information"

Buttons for task actions are also created in the header, as shown in Figure 29-21.

Figure 29-21 Task Header: Task Action Buttons

Description of Figure 29-21 follows
Description of "Figure 29-21 Task Header: Task Action Buttons"

Task Actions

The following task actions appear from the Actions dropdown list or as buttons. The tasks that appear depend on the state of the task (assigned, completed, and so on) and the privileges that are granted to the user viewing the task. For example, when a task is assigned to a group, only the Claim button appears. After the task is claimed, other actions such as Reject and Approve appear.

The first three custom actions appear on the task form as buttons: Claim, Dismiss, and Resume. Only those buttons applicable to the task appear. Other actions are displayed under the Actions list, starting with Request for Information, Reassign, and Route. Systems actions—Withdraw, Pushback, Escalate, Release, Suspend, and Renew—follow the custom actions, followed by the Save button. These actions require no further dialog to complete.

  • Claim—A task that is assigned to a group or multiple users must be claimed first. Claim is the only action available in the Task Action list for group or multiuser assignments. After a task is claimed, all applicable actions are listed.

    Note:

    If an FYI task is sent to multiple users, a user must first select the Claim button to claim the task before they can dismiss it.
  • Dismiss—This action is used for a task that requires the person acting on the task to acknowledge receipt, but not take any action (like an FYI).

  • Resume—A task that was halted by a Suspend action can be worked on again. See Suspend.

  • Request for Information—You can request more information from the task creator or any of the previous assignees. If reapproval is not required, then the task is assigned to the next approver or the next step in the business process.

  • Reassign—Managers can reassign a task to reportees. The Reassign option also provides a Delegate function. A task can be delegated to another user or group. The delegated task appears in both the original user's and the delegated user's worklists. The delegated user can act on behalf of the original assignee, and has the same privileges for that task as the original assignee.

  • Route—If there is no predetermined sequence of approvers or if the workflow was designed to permit ad hoc routing, then the task can be routed in an ad hoc fashion. For such tasks, a Route button appears on the task details page. From the Routing page, you can look up one or more users for routing. When you specify multiple assignees, you can choose whether the list of assignees is for simple (group assignment to all users), sequential, or parallel assignment. In the case of parallel assignment, you provide the percentage of votes required for approval.

  • Withdraw—Only the task creator can withdraw (cancel) the task. The Comments area is available for an optional comment. The business process determines what happens next.

  • Pushback—This action sends a task up one level in the workflow to the previous assignee.

  • Escalate—An escalated task is assigned to the user's manager. The Comments area is available for an optional comment.

  • Release—Releasing a task makes it available to other assignees. A task assigned to a group or multiple users can then be claimed by the other assignees.

  • Suspend—This action suspends the expiration date indefinitely, until the task is resumed. Suspending and resuming tasks are available only to users who have been granted the BPMWorkflowSuspend role. Other users can access the task by selecting Previous in the task filter or by looking up tasks in the Suspended status. Buttons that update a task are disabled after suspension.

  • Renew—Renewing a task extends the task expiration date seven days (P7D is the default). The renewal duration is controlled from Oracle Enterprise Manager Grid Control Console. A renewal appears in the task history. The Comments area is available for an optional comment.

  • Save—Changes to the task are saved.

While you are creating a task form, all possible system action buttons appear, although only those actions that are appropriate for the task state and fit the user's privileges appear in the worklist.

Task History

The history of task actions appears on the task details page, and is displayed in the worklist as a history table. The history includes the following fields:

  • Version number

  • Participant name—the person who acted on the task

  • Action—for example, if the task was approved or assigned

  • Updated By—name of the person who last updated the task

  • Action date

See Figure 30-20, "History: Graphical View" and Figure 30-21, "History: Full Task Actions" for how task history is displayed in Oracle BPM Worklist, including the options to take a history snapshot, list future participants, and list full task actions.

Task Comments and Attachments

A trail of comments with the comment date and comment writer's user name is maintained throughout the life cycle of a task.

Files or reference URLs associated with a task can be added by any of the human task participants.

Figure 29-22 shows an example of the comments and attachments region.

Figure 29-22 Comments and Attachment Region

Description of Figure 29-22 follows
Description of "Figure 29-22 Comments and Attachment Region"

The following steps describe how to use a drop handler that creates the task form, including the payload, without building each region individually. To build each region individually, see Section 29.4.5, "How To Create Task Form Regions Using Individual Drop Handlers."

To create a task form using the Complete Task with Payload drop handler:

  1. In the designer, double-click taskDetails1_jspx.

  2. In the Create JSF Page dialog, provide a file name and directory information (or accept the defaults) and click OK.

  3. In the Data Controls panel of the Application Navigator, expand the human task node, then the getTaskDetails node, and then the Return node.

  4. Drag the Task icon into the taskDetails.jspx window.

  5. Select Human Task, and then Complete Task with Payload.

  6. In the Edit Action Binding dialog, shown in Figure 29-23, click OK.

    Figure 29-23 Edit the Action Binding

    Description of Figure 29-23 follows
    Description of "Figure 29-23 Edit the Action Binding"

  7. In the next Edit Action Binding dialog, the data collection is selected, as shown in Figure 29-24; click OK.

    Figure 29-24 Select the Data Collection and Action

    Description of Figure 29-24 follows
    Description of "Figure 29-24 Select the Data Collection and Action"

    The task form is displayed, as shown in Figure 29-25.

29.4.5 How To Create Task Form Regions Using Individual Drop Handlers

You can create a display form with multiple regions using the individual Task Header, Task Action, Task History, and Task Comment and Attachment drop handlers shown in Figure 29-26.

Figure 29-26 Using Human Task Drop Handlers

Description of Figure 29-26 follows
Description of "Figure 29-26 Using Human Task Drop Handlers"

Task Header provides both header and task actions, so you do not need the Task Action drop handler when you use Task Header. Use Task Action when you want the actions dropdown menu and buttons, but not header details.

To create the task form without building each region individually, see Section 29.4.4, "How To Create a Task Form Using the Complete Task with Payload Drop Handler."

Before you create this task form, you must have created the following:

To create task form regions using individual drop handlers:

  1. In the designer, double-click taskDetails1.jspx.

  2. In the Create JSF Page dialog, provide a file name and directory information (or accept the defaults) and click OK.

  3. In the Data Controls panel of the Application Navigator, expand the human task node, then the getTaskDetails node, and then the Return node.

  4. Drag the Task icon into the taskDetails.jspx window.

  5. Select Human Task, and then Task Header.

    This creates the Actions dropdown list and buttons for task actions, as shown in Figure 29-27, and header details, as shown in Figure 29-28.

    Figure 29-27 Designing the Task Form: Buttons for Task Actions

    Resolved, Unresolved
    Description of "Figure 29-27 Designing the Task Form: Buttons for Task Actions"

    Figure 29-28 Designing the Task Form: Task Headers

    Description of Figure 29-28 follows
    Description of "Figure 29-28 Designing the Task Form: Task Headers"

  6. Drag additional Task icons into the JSPX designer, selecting these options with each iteration:

    • Human Task, then Task History

    • Human Task, then Task Comment and Attachment

    The task form now has multiple regions for task action dropdown lists and buttons, task header details, task history, and comments and attachments.

To continue creating the task form, see Step 1 in Section 29.4.6, "How To Add the Payload to the Task Form."

29.4.6 How To Add the Payload to the Task Form

In addition to adding the payload, you can create task form regions. See Step 1 in Section 29.4.5, "How To Create Task Form Regions Using Individual Drop Handlers."

To add the payload to the task form:

  1. From the Component Palette, select ADF Faces.

  2. Expand Layout.

  3. Drag Panel Group Layout between the Header and Comment sections.

  4. In the Data Controls panel, expand Task, and then Payload.

  5. Drag the payload data collection to the left of the Panel Group Layout area.

    An alternative to dropping the payload node onto the form is to expand the payload node and drop the necessary child elements onto the form. For example, to create a read-only form for the VacationRequest payload, expand the payload node, drag the Vacation Request Process Request node onto the form, and select Forms > ADF Read-only Form.

  6. From the context menu, select Forms, then ADF Read-only Form, as shown in Figure 29-29.

    Figure 29-29 Adding ADF Read-Only Fields to the Task Form Payload Region

    Description of Figure 29-29 follows
    Description of "Figure 29-29 Adding ADF Read-Only Fields to the Task Form Payload Region"

  7. In the Edit Form Fields dialog, accept the defaults and click OK.

    This creates read-only fields in the payload region, between the Details and History sections.

    The payload regions appear, as shown in Figure 29-30.

    Figure 29-30 The Payload Region of the Task Form

    Description of Figure 29-30 follows
    Description of "Figure 29-30 The Payload Region of the Task Form"

The task form, shown in Figure 29-31, is complete and ready to be deployed.

Figure 29-31 The Task Form (taskDetails.jspx)

Description of Figure 29-31 follows
Description of "Figure 29-31 The Task Form (taskDetails.jspx)"

29.4.7 What Happens When You Create a Task Form

The form you designed is saved in the .jspx file at

JDev_Oracle_Home\mywork\task_form_application_name\project_name\public_html

The task form is ready to be deployed. See Section 29.8, "Deploying a Composite Application with a Task Flow."

29.5 Refreshing Data Controls When the Task XSD Changes

When task metadata changes, refresh the Data Controls view (XSD changes are not refreshed) that is based on that task metadata. The refresh functionality re-creates the data control. Figure 29-32 shows the Refresh option.

Figure 29-32 Refreshing Data Controls

Description of Figure 29-32 follows
Description of "Figure 29-32 Refreshing Data Controls"

To refresh the data control:

  1. Right-click the data control.

  2. Select the Edit Definition option to display the Refresh Data Control dialog, as shown in Figure 29-33.

    Figure 29-33 The Refresh Data Control Button

    Description of Figure 29-33 follows
    Description of "Figure 29-33 The Refresh Data Control Button"

29.6 Securing the Task Flow Application

You can use any container-based security for securing the task flow. See Section 32.6.2.1.2, "Requirements for Client Applications For Identity Propagation," for more information. Form-based authentication and SSO-based authentication are available for web security.

If you are sending a notification as email, do not secure the URL with"/notification/secure" to use container-based security because this is accessed by SOA APIs using an internal context that cannot be created outside of SOA. The URL pattern inside security cannot contain "/" (all URLs) and "//notification".

No additional steps are required for identity propagation. Identity is automatically propagated to the server EJBs.

29.7 Creating an Email Notification

A task form is used to provide an email notification, if email notification is defined as part of the human task. Options for email notification include:

Section 32.2, "Notifications from Human Workflow" to review notification settings as part of a human task definition (.task file).

29.7.1 How To Create an Email Notification

To send a custom email notification whose content and layout you have specified, create another JSPX file in which you design an email notification page. (Note, however, that you can use the default page for notification with no further modifications.) Create the custom notification page by using the custom and standard drop handlers, or use the email notification drop handler. In addition, do the following:

  • Add a router to the task flow. The router directs the task flow to send either the email notification page or the default page, depending on the control flow based on the bpmClientType page flow scope value.

  • Edit the generated inline CSS to customize the page. No additional CSS is included at runtime and the ADF CSS is not available at runtime. See the samples notification-101 and notification-102 at

    https://soasamples.samplecode.oracle.com
     
    
  • Reference images directly from the HTML or JSF page. (Indirect references, for example, an included JSF that in turn includes the image, are not allowed.)

29.7.1.1 Creating a Task Flow with a Router

The control flow case with a router enables you to direct the request to a specific page based on certain parameters. For an ADF task flow based on a human task, you need a special page for email notifications. This section describes how to create a special page for email notifications.

To create a task flow with a router:

  1. In the Application Navigator, expand the task flow project and double-click project_name _TaskFlow.xml.

    The XML file opens in the designer. In the diagram view, you see the taskDetails1.jspx icon.

  2. From the Component Palette, select ADF Task Flow, and drag the View icon into the designer.

  3. Click view1 below the icon and enter a name for the email notification page.

    Figure 29-34 shows an example using the name EmailPage.

    Figure 29-34 Creating the Email Page

    Renaming the view icon to EmailPage
    Description of "Figure 29-34 Creating the Email Page"

  4. From the Component Palette, drag Router into the designer.

  5. Click router1 below the icon and enter a router name.

    Figure 29-36 shows an example using the name PageRouter.

  6. To ensure that the router is called, right-click the router icon and click Mark Activity > Default Activity, as shown in Figure 29-35.

    Figure 29-35 Marking the Router as the Default Activity

    Description of Figure 29-35 follows
    Description of "Figure 29-35 Marking the Router as the Default Activity"

  7. Click the router - router_name - Property Inspector tab.

  8. In the default-outcome field, enter default.

  9. Click Add, and in the Outcome field, enter the name of the email notification page.

  10. Use the Expression Builder to enter the following in the expression field: #{pageFlowScope.bpmClientType=="notificationClient"}

  11. In the Component Palette, click Control Flow Case.

  12. In the designer, drag from the router page icon to taskDetails1.jspx.

    The control flow is automatically labeled default, as shown in Figure 29-36.

    Figure 29-36 Connecting the Control Flow

    Default flow control
    Description of "Figure 29-36 Connecting the Control Flow"

  13. In the Component Palette, click Control Flow Case.

  14. In the designer, drag from the router page icon to the email notification page icon.

  15. Click the control-flow-case - email_page_name - Property Inspector tab.

  16. From the from-outcome list, select the name of the email notification page.

    Figure 29-37 shows the completed control flow.

    Figure 29-37 Completed Control Flow for an Email Notification

    EmailPage property inspector
    Description of "Figure 29-37 Completed Control Flow for an Email Notification"

To continue creating the email notification page, see Step 1 in Section 29.7.1.2, "Creating an Email Notification Page."

29.7.1.2 Creating an Email Notification Page

Creating an email notification page is similar to creating a task form, with the addition of defining layout and inline styles. See Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework for design information.

To create an email notification page:

  1. In the designer, double-click EmailPage.

  2. In the Create JSF Page dialog, provide a file name and directory information (or accept the defaults) and click OK.

    The EmailPage.jspx tab opens in the designer.

  3. From the Component Palette, drag any of the Common Components (for an image, for example) or Layout components into the designer.

  4. For the layout component you selected, provide alignment and other details in the Property Inspector tab.

    Figure 29-38 shows the layout fields available when Panel Group Layout is selected.

    Figure 29-38 Specifying a Layout

    Panel group layout
    Description of "Figure 29-38 Specifying a Layout"

    See Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework for more information about panel group layout.

  5. Expand Appearance, Style and Theme, Behavior, Advanced, Customization, and Annotations to specify other details, as shown in Figure 29-39.

    Figure 29-39 Specifying a Layout: More Details

    Description of Figure 29-39 follows
    Description of "Figure 29-39 Specifying a Layout: More Details"

    See "How to Set Component Attributes," in Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.

  6. From the Data Controls panel, expand the human task node, then the getTaskDetails node, and then the Return node.

  7. Drag Task into the panel group layout area.

  8. Select Human Task, and then Task details for email, as shown in Figure 29-40.

    Figure 29-40 Human Task Drop Handlers

    Description of Figure 29-40 follows
    Description of "Figure 29-40 Human Task Drop Handlers"

    This drop handler includes a header with inline style, a payload using ADF, and a comment using inline style. Because the payload is dynamically generated, it does not include an inline style.

    In general, you can find the inline styles for the Header section for each component and use the same style for the Content section for the respective components.

  9. In the Edit Action Bindings dialog, select the data collection and click OK.

The email task form is complete and ready to be deployed.

29.7.2 What Happens When You Create an Email Notification Page

The email notification page is sent as HTML content in the email message body. Images on the page are inlined as attachments. Relative URLs are converted to absolute URLs.

29.7.3 What You May Need to Know About Creating an Email Notification Page

A notification may not display correctly in email if the styles used in the fields of the form are not valid for email. Editing the generated inline CSS to customize the page may be required. See Section 29.7.1, "How To Create an Email Notification," for more information.

Security issues can also prevent the form from being rendered correctly. See Section 29.6, "Securing the Task Flow Application," for more information.

29.8 Deploying a Composite Application with a Task Flow

The composite application containing the task flow must be deployed before you can use the task form in the Worklist Application. The process for deploying an application with a task flow is basically the same as deploying any SOA composite application, as described in Section 29.8.2, "How To Deploy a Composite Application with a Task Flow." See Chapter 41, "Deploying SOA Composite Applications" for more information.

29.8.1 Before Deploying the Task Form: Port Changes

If you are not using the default values for RMI or HTTP ports, open the hwtaskflow.xml file in Oracle JDeveloper to change values. Figure 29-41 shows the file in the Application Navigator.

Figure 29-41 The hwtaskflow.xml File

Description of Figure 29-41 follows
Description of "Figure 29-41 The hwtaskflow.xml File"

Example 29-2 shows a sample hwtaskflow.xml file with comments on which values can and cannot be changed.

Example 29-2 Sample hwtaskflow.xml File

<!--Sample hwtaskflow.xml file. This is required for successful deployment of an
ADF Task Flow Based on Human Task application. -->
 
<?xml version = '1.0' encoding = 'UTF-8'?>
<hwTaskFlows xmlns="http://xmlns.oracle.com/bpel/workflow/hwTaskFlowProperties">

   <!-- Name of the client application used to view the tasks, defaults to
 'worklist' -->

   <ApplicationName>worklist</ApplicationName>

   <!-- Type of ejb lookup used. If not specified, remote lookup is used. Values
 - LOCAL, REMOTE, SOAP -->
   <LookupType>LOCAL</LookupType>

   <!-- Do not modify this element. Value must be 'false' for deployment to
 complete successfully -->


   <TaskFlowDeploy>false</TaskFlowDeploy>

   <!-- Connection details for soa server for remote ejb lookup.
If not specified, default values for ejbProviderUrl is http://localhost/soa-infra
        , aliasKeyName is BPM_SERVICES, keyName is BPM_SERVICES  -->

   <SoaServer>
      <ejbProviderUrl/>
      <aliasKeyName/>
      <keyName/>
      <connectionName/>
   </SoaServer>

   <!-- Connection details for server on which task flow is deployed.
If not specified, default values for hostname is localhost,
        httpPort is 8888 and httpsPort is 443 --> -->

   <TaskFlowServer>
      <hostName/>
      <httpPort/>
      <httpsPort/>
   </TaskFlowServer>

    <!-- Task Flow specific properties -->

<hwTaskFlow>
  <WorkflowName></WorkflowName>
 <TaskDefinitionNamespace></TaskDefinitionNamespace>
  <TaskFlowId></TaskFlowId>
  <TaskFlowFileName></TaskFlowFileName>
 </hwTaskFlow>
</hwTaskFlows>

29.8.2 How To Deploy a Composite Application with a Task Flow

An application server connection is required to do the following.

To deploy a composite application with a task flow:

  1. Right-click the composite application name, select Deploy, and then application_name > to > application_server_connection.

    If you do not have a connection, select New Connection and use the Application Server Connection wizard.

  2. In the Select Deployment Targets dialog, select a server instance.

  3. Click OK.

29.8.3 How To Redeploy the Task Form

If you change the task form and want to redeploy it, repeat the deployment step. (Right-click the task form application name, select Deploy, and then application_name > to > application_server_connection.) A message asking you if you want to undeploy the form is displayed. Click OK and deploy the task form again.

29.8.4 How To Deploy a Task Flow as a Separate Application

If you want to deploy the task flow as a separate application, outside of the SOA composite application, then create a new application and project as a container for the task flow. After you deploy the SOA composite application, deploy the task flow application.

29.8.5 How To Deploy a Task Form to a non-SOA Oracle WebLogic Server

This section describes how to deploy a task form to a non-SOA Oracle WebLogic Server.

29.8.5.1 Deploying oracle.soa.workflow.jar to a non-SOA Oracle WebLogic Server

The oracle.soa.workflow.jar shared library is needed on the non-SOA Oracle WebLogic Server. It is available from

ORACLE_JDEV_HOME\jdeveloper\soa\modules\oracle.soa.workflow_11.1.1

Use Oracle WebLogic Server Administration Console to deploy the JAR file.

To deploy oracle.soa.workflow.jar:

  1. Go to Oracle WebLogic Server Administration Console at

    http://remote_hostname:remote_portnumber/console
    
  2. In the Domain Structure area, click Deployments.

  3. Click Install, as shown in Figure 29-42.

    Figure 29-42 Oracle WebLogic Server Administration Console: List of Deployments

    Description of Figure 29-42 follows
    Description of "Figure 29-42 Oracle WebLogic Server Administration Console: List of Deployments"

  4. In the Path field, provide the following path and click Next.

    ORACLE_JDEV_HOME/jdeveloper/soa/modules/oracle.soa.workflow_11.1.1/oracle.soa.workflow.jar
    
  5. Keep the same name for the deployment and click Next, as shown in Figure 29-43.

    Figure 29-43 Oracle WebLogic Server Administration Console: Install Applications Assistant

    Description of Figure 29-43 follows
    Description of "Figure 29-43 Oracle WebLogic Server Administration Console: Install Applications Assistant"

  6. Select the Deploy as Library option and click Finish.

  7. Confirm that the oracle.soa.workflow(11.1.1,11.1.1) library is in the Active state, as shown in Figure 29-44.

    Figure 29-44 Oracle WebLogic Server Administration Console: The oracle.soa.workflow Active State

    Description of Figure 29-44 follows
    Description of "Figure 29-44 Oracle WebLogic Server Administration Console: The oracle.soa.workflow Active State"

See Section 29.8.5.2, "Defining the Foreign JNDI Provider on a non-SOA Oracle WebLogic Server," to continue.

29.8.5.2 Defining the Foreign JNDI Provider on a non-SOA Oracle WebLogic Server

Use Oracle WebLogic Server Administration Console to complete this portion of the task.

To define the foreign JNDI provider:

  1. In the Domain Structure area, expand Services and click Foreign JNDI Providers.

  2. Click New.

  3. In the Name field, enter ForeignJNDIProvider-SOA, as shown in Figure 29-45, and click OK.

    Figure 29-45 Creating a Foreign JNDI Provider

    Description of Figure 29-45 follows
    Description of "Figure 29-45 Creating a Foreign JNDI Provider"

  4. Click the ForeignJNDIProvider-SOA link.

  5. Do the following and click Save.

    • For Initial Context Factory, enter weblogic.jndi.WLInitialContextFactory.

    • For Provider URL, enter t3://soa_hostname:soa_portnumber/soa-infra.

      In a clustered environment, for Provider URL, enter http://soa_hostname:soa_portnumber/soa-infra.

    • For User, enter weblogic.

    • For Password, enter weblogic.

    Figure 29-46 shows the page where you enter this information.

    Figure 29-46 Defining the Foreign JNDI Provider

    Description of Figure 29-46 follows
    Description of "Figure 29-46 Defining the Foreign JNDI Provider"

See Section 29.8.5.3, "Defining the Foreign JNDI Provider Links on a non-SOA Oracle WebLogic Server," to continue.

29.8.5.3 Defining the Foreign JNDI Provider Links on a non-SOA Oracle WebLogic Server

Use Oracle WebLogic Server Administration Console to complete this portion of the task.

To define the foreign JNDI provider links:

  1. In the Domain Structure area, expand Services and click Foreign JNDI Providers.

  2. Click the ForeignJNDIProvider-SOA link.

  3. Click the Links tab.

  4. Click New.

    Figure 29-47 shows the Links tab.

    Figure 29-47 Defining the Foreign JNDI Provider Links: The Links Tab

    Description of Figure 29-47 follows
    Description of "Figure 29-47 Defining the Foreign JNDI Provider Links: The Links Tab"

  5. Do the following and click OK.

    • For Name, enter RuntimeConfigService.

    • For Local JNDI Name, enter RuntimeConfigService.

    • For Remote JNDI Name, enter RuntimeConfigService.

    Figure 29-48 shows where you do this.

    Figure 29-48 Defining the Foreign JNDI Provider Links: Link Properties

    Description of Figure 29-48 follows
    Description of "Figure 29-48 Defining the Foreign JNDI Provider Links: Link Properties"

  6. Do the following and click OK.

    • For Name, Local JNDI Name, Remote JNDI Name, enter ejb/bpel/services/workflow/TaskServiceBean.

    • For Name, Local JNDI Name, Remote JNDI Name, enter ejb/bpel/services/workflow/TaskMetadataServiceBean.

    • For Name, Local JNDI Name, Remote JNDI Name, enter TaskReportServiceBean.

    • For Name, Local JNDI Name, Remote JNDI Name, enter TaskEvidenceServiceBean.

    • For Name, Local JNDI Name, Remote JNDI Name, enter TaskQueryService.

    • For Name, Local JNDI Name, Remote JNDI Name, enter UserMetadataService.

See Section 29.8.5.4, "Including a Grant for bpm-services.jar," to continue.

29.8.5.4 Including a Grant for bpm-services.jar

To include a grant for bpm-services.jar, edit the system-jazn-data.xml file and then restart the non-SOA Oracle WebLogic Server.

To include a grant for bpm-services.jar:

  1. Locate the system-jazn-data.xml file by navigating to the domain directory, soa-infra, and then to

    ORACLE_WEBLOGIC_INSTALL/user_projects/domains/your_domain_name/config/fmwconfig
    
  2. In system-jazn-data.xml, add the following grant. (If all or some portion of the grant exists, then add only what is missing.)

    <grant>
      <grantee>
       <codesource>
        <url>file: ORACLE_JDEV_HOME/jdeveloper/soa/modules/oracle.soa.workflow_
    11.1.1/bpm-services.jar</url>
       </codesource>
      </grantee>
      <permissions>
       <permission>
        <class>oracle.security.jps.JpsPermission</class>
        <name>VerificationService.createInternalWorkflowContext</name>
       </permission>
      <permission>
      <class>oracle.security.jps.service.credstore.CredentialAccessPermission
      </class>
      <name>credstoressp.credstore.BPM-CRYPTO.BPM-CRYPTO</name>
      <actions>read,write</actions>
      </permission>
      <permission>
       <class>oracle.security.jps.JpsPermission</class>
       <name>IdentityAssertion</name>
       <actions>*</actions>
      </permission>
     </permissions>
    </grant>
    
  3. Restart the non-SOA Oracle WebLogic Server.

See Section 29.8.5.5, "Deploying the Application," to continue.

29.8.5.5 Deploying the Application

Deploy the application that contains the task form to a non-SOA Oracle WebLogic Server the same way other applications are deployed. When you set up the application server connection, specify the domain on the non-SOA server (the domain you specified in Step 1 of Section 29.8.5.4, "Including a Grant for bpm-services.jar.". See Chapter 41, "Deploying SOA Composite Applications" for information on deploying applications.

29.8.6 What Happens When You Deploy the Task Form

When the task form is deployed, an automatic association is created between the task metadata and the task flow application URL. Use Oracle Enterprise Manager 11g Fusion Middleware Control to update this mapping. Access the task flow component in the Component Metrics table for a specific SOA composite application. The Administration tab shows the URI for the task form. See Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite for more information. If the task flow is configured for HTTPS access, you may need to do additional settings in Enterprise Manager.

See Chapter 30, "Using Oracle BPM Worklist" for information on how to act on tasks.

Notes:

  • For the task form to work correctly, always specify the URL using the complete name for the host on which the task flow is deployed.

  • If you want to access the task form from a different URL that has a different port number than the hostname and port number previously set in Oracle WebLogic Server Administration Console, then you must change the port number for the front-end in Oracle WebLogic Server Administration Console and redeploy the task form so that the task details appear correctly in the worklist.

29.8.7 What You May Need to Know About Undeploying a Task Flow

When a task flow Web application is deployed, the task flow URL is registered in the database. This URL is displayed in Oracle BPM Worklist when a task is clicked and the task details are displayed. If the task flow Web application is later undeployed or stopped, the task flow URL in the database is not removed as part of the undeployment. Consequently, when you click the task in the worklist to see the task details, a 404 Not Found error is displayed rather than the message Details not available for task. To avoid the 404 Not Found error, use Oracle Enterprise Manager Fusion Middleware Control Console to undeploy the task flow application from the application home page.

29.9 Displaying a Task Form in the Worklist

The task form is displayed in Oracle BPM Worklist, a web-based interface for users to act on their assigned human tasks. Specific actions are available or unavailable depending on a user's privileges.

Figure 29-49 shows how the task form for the help desk request example is displayed in the Worklist Application task details page.

Figure 29-49 Worklist Task Details Page

Description of Figure 29-49 follows
Description of "Figure 29-49 Worklist Task Details Page"

29.9.1 How To Display the Task Form in the Worklist

The task form is available in Oracle BPM Worklist after you log in. See Section 30.2.1, "How To Log In to the Worklist" for instructions.

29.10 Displaying a Task in an Email Notification

Figure 29-50 shows how an email task notification appears in email.

Figure 29-50 Email Task Notification

Description of Figure 29-50 follows
Description of "Figure 29-50 Email Task Notification"

You can click an available action, RESOLVED or UNRESOLVED, or click the Worklist Application link to log in to the worklist. Clicking an action displays an email composer window in which you can add a comment and send the email.

29.11 Reusing the Task Flow Application with Multiple Human Tasks

You can reuse a single task flow application with multiple human tasks. To use this feature, all human tasks must have identical payload elements.

29.11.1 How To Reuse the Task Flow Application with Multiple Human Tasks

  1. Open the TASKFLOW_PROJ_DIR\adfmsrc\hwtaskflow.xml file.

  2. For each additional human task, add the following element inside the file (at the bottom just before </hwTaskFlows>):

    <hwTaskFlow>
      <WorkflowName>$TASK_NAME</WorkflowName>
      <TaskDefinitionNamespace>$TASK_NAMESPACE</TaskDefinitionNamespace>
      <TaskFlowId>$TASK_FLOW_NAME</TaskFlowId>
      <TaskFlowFileName>$TASK_FLOW_FILENAME</TaskFlowFileName>
    </hwTaskFlow
    

    where:

    • $TASK_NAME is replaced with the name of the human task inside the .task file (value of the <name> element).

    • $TASK_NAMESPACE is replaced with the namespace of the human task inside the .task file (value of the attribute targetNameSpace of element <taskDefinition>).

    • $TASK_FLOW_NAME is copied from the existing <hwTaskFlow>/<TaskFlowId> element.

    • $TASK_FLOW_FILENAME is copied from the existing <hwTaskFlow>/<TaskFlowFileName> element.