Working with TasksLocate this document in the navigation structure

Use

A task is a request for a human to perform an action. In process modeling, you use tasks to assign them to the human activities in your process. Human activity is a type of flow object in the process you model that illustrates an activity that a human performs. When you create a human activity, it has a default task assigned to it, which you can change with another task.

After you create a new task, you can edit the task to define its attributes.

When working with tasks, you can do the following:

  • Create the task.

  • Assign a User Interface (UI) to the task.

  • Define task owners.

  • Define task administrators.

  • Define time constraints for the task.

  • Define task priorities.

  • Define a name and description of the task.

  • Define user texts for the task.

  • Send notification e-mails to the potential owners.

When you are defining tasks' roles, user text or time constraints, you could use expressions.

Caution

If you use context nodes in your expression from different namespaces with equal names, you have to declare the namespaces of these nodes. To solve the name conflict you can define a name prefix for the namespace. This declaration has the following syntax: xmlns:<prefix_name>="namespace_name" .

For more information about expressions, see Creating Expressions .

Prerequisites

You have opened the Process Development perspective in the SAP NetWeaver Developer Studio and have expanded your project in the Project Explorer view.

Procedure

Creating the Task

  1. Expand Process Modeling .

  2. In the context menu of the Tasks folder, choose New Task... .

  3. In the dialog that appears, specify a name of the task in the Name field.

  4. (Optional) Specify a description in the Documentation field and choose the Finish pushbutton.

Assigning a User Interface to the Task

You have the option of assigning either a Web Dynpro for Java (WDJ), Web Dynpro for ABAP (WDA) or Visual Composer (VC) UI component, or an Adobe form to your task.

For more information about WDJ, WDA and VC UI components, see Assigning a User Interface to a Task .

For more information about Adobe forms, see Assigning an Offline Form to a Task .

Another option you have is to use the UI Task Generation template. It allows you to create multiple tasks and WDJ or VC UI components for the tasks, spending less time and effort. For more information, see Generating Tasks and UI Components with UI Task Generation Template .

You can also generate a WDJ or VC UI component for a single task. For more information, see Generating a UI Component for a Single Task .

Defining Task Owners

You can define owners of the tasks that you assign to human activities in your process model. You define task owners on one of the following levels:

  • Lane level

  • Human activity level

  • Task level

You can also allow an actual task owner to invite contributors to the task at runtime, which means that multiple users can work together on a single task instance.

For more information, see Defining Task Owners .

Defining Task Administrators

For more information, see Defining Task Administrators .

(Optional) Defining Time Constraints

The time constraints are deadlines that refer to the activation, start, completion and expiration time of the task. For more information about defining time constraints, see Defining Time Constraints of a Task .

(Optional) Defining Task Priorities

  1. Expand Process Modeling , then expand Tasks .

  2. In the context menu of a task, choose Open .

    The task editor opens.

  3. Select a priority from the dropdown menu under Priority on the Overview tab page.

(Optional) Defining Name and Description of the Task

You specify a name of the task when you create the task. In the task editor you have the option to rename the task.

  1. Expand Process Modeling , then expand Tasks .

  2. In the context menu of a task, choose Open .

    The task editor opens.

  3. Choose the Rename... pushbutton under General Information on the Overview tab page.

  4. In the dialog that appears, specify a new name of the task in the New Name field and choose the Finish pushbutton.

  5. (Optional) Specify a description of the task in the Documentation field.

(Optional) Defining User Texts

User texts are the subject and the description of a task that are displayed for the processor of the task. User texts of tasks which have a WDJ, WDA or VC UI component assigned are displayed in the Universal Worklist. User texts of tasks which have an Adobe form as a UI component are the subject and the text of the e-mail to which the form is attached. You can parameterize user texts to provide them with dynamic content. You use variables to parameterize user texts.

  1. Expand Process Modeling , then expand Tasks .

  2. In the context menu of a task, choose Open .

    The task editor opens.

  3. Choose the Add pushbutton under Variables on the User Texts tab page to add a variable.

    The system automatically fills in values in the Name and Type fields, which you can edit. You define an expression with the expression editor.

  4. Select the value in the Name field to rename the variable.

    Caution

    You can only use the letters A-Z, the numerals 0-9 and an underscore (_) in the variable name.

  5. Select a type of the variable from the Type dropdown menu if you want to change the type that was filled in by the system.

    You must set a type before you create an expression.

  6. Choose the Edit... pushbutton to define an expression in the expression editor. Choose the OK pushbutton.

    Caution

    The return value of the expression you create must match the type you select in the Type field of the Variables table.

  7. Specify a subject of the task in the Subject field and a description in the Description field under Parameterized Texts .

    Use braces ({}) to reference the variables you defined under Variables . You reference a variable by putting the variable's name between the braces.

(Optional) Sending Notification E-mails to the Potential Owners

You can select the Send custom e-mail notification to potential owners checkbox from the Overview tab page of a task if you want to send an e-mail notification to the potential owners of a task. The subject for the mail would be the same as the given subject in the Parameterized Text from the User Texts tab page.

The body of the mail has three parts:

  • Header, that is predefined:

    Dear recipient,

    You have a new task in your work item inbox.

  • Body of the e-mail content - this is the description in the Parameterized Text from the User Texts tab page.

  • Footer, that is predefined:

    To access the task directly, use this link: [link to task execution UI]

    Follow the link to access your complete work item inbox: [link to UWL]*****************************************************

    This mail is automatically generated. Please do not reply.

    In case of technical issues directly contact your IT department.

This e-mail includes a direct link to the task execution UI and a link to the universal worklist (UWL) and has a custom text for its body. To enable sending these e-mail notifications, you have to configure the mail server connectivity. For more information, see Configuring Mail, Notification Messages, and Forms Services .