Unit 2: Creating a Workflow 

Use

To define the flow of the approval process in the system, you first create a multistep task workflow template.

For further information, refer to Definition of Multistep Tasks in the SAP Business Workflow documentation.

Procedure: Creating a workflow template

  1. Choose Tools ® Business Workflow ® Development ® Definition Tools ® Tasks/Task Groups ® Create.
  2. This takes you to the Task: Maintain screen.

  3. In the Task type field, choose the Workflow template entry.
  4. Choose .

The Workflow Template: Add screen is then displayed.

Entering the basic data for the workflow template

  1. Enter an abbreviation (of your choice) and a name (of your choice) for the workflow template to be created.
  2. Abbreviation: < ini _ws>

    Name: <Workflow: notification of absence ( ini )>

  3. Choose .
  4. In the Create Object Directory Entry dialog box, choose Local object.
  5. The system has now allocated an 8-digit number for your workflow template. This number is made up of the 3-digit prefix number (Customizing setting) and a 5-digit number taken from a number range. This number together with the letters WS forms the workflow ID. Make a note of the ID so that you can later call the workflow more quickly.

    Entering a workflow description

  6. Go to the Description tab.
  7. Choose the text type Task description and then .
  8. The SAPscript text editor is then launched.

  9. Enter a text that describes the task. You can use the following proposal:
  10. <You can use this workflow to create a notification of absence. This will then be sent to your superior for review. You will be notified of the result of this review.

    If your request is rejected, you can revise it and resubmit it for review or withdraw it completely.>

  11. Choose to return to the workflow template and then save the workflow template.
  12. Determining agents

    To enable the workflow template to be started in dialog, the workflow template must be assigned to its possible agents.

  13. Select Additional data ® Agent assignment ® Maintain
  14. The workflow template: agent assignment screen is displayed.

  15. Position the cursor on the name of your workflow template.
  16. Choose Properties…
  17. The dialog box Task: <Workflow: Notification of absence (ini)> is displayed.

  18. Set the General task flag.
  19. Choose Copy and then .

Designating your workflow template as a general task means that every user in the system is authorized to start this workflow template in dialog.

Result

You have now created a workflow template as a "framework" for a workflow definition.

To create a workflow definition, you need tasks that are used as steps in the workflow definition.

Additional information: Tasks

A task can either be a single-step task or a multistep task. In our example of the notification of absence, making the application and checking the application are single-step tasks. The entire procedure involved in processing a leave request consists of these (and other) single steps, and is therefore a multistep task.

In this tutorial, a single step task is generally described as a task. The difference between the task types is only explicitly explained if there is a risk of confusion over multistep tasks. The term workflow is used as the umbrella term for the workflow template (and thus the multistep task) and the workflow definition. More precise differentiation only takes place if there is a risk of confusion.

On a technical level, the main difference between single-step tasks and multistep tasks is that:

A workflow definition is made up of a sequence of different steps (for example, all steps required to process a leave request).

Standard tasks and workflow templates are client-independent. Customer and workflow tasks are client-dependent. Customer and workflow tasks are no longer supported and are therefore no longer used in this tutorial.

An Activity is a possible step type in a workflow definition. An activity refers to a task. It references a task, which can be a single-step or multistep task (subworkflow).

For further information, refer to Tasks and Task Groups in the SAP Business Workflow documentation.