Step 5: Defining a Single-Step Task

In the scenario on which this tutorial is based, the process of informing an employee from the design office responsible is a single-step task. The creation of this single-step task is linked to the event created when the material master data is changed.

The creation of a workflow template (with reference to a workflow definition) is not part of this tutorial.

This can, however, be achieved without any problems using the information contained in this chapter.


You have


Defining a standard task

In this section you will define the standard task ZXX_MatDisp as a single-step task, which will display the master data of the material changed when executed and, in addition, will notify the agent responsible by means of a long text.

Carry out the following steps to define this standard task:

  1. Choose Definition tools ® Tasks/Task groups ® Create in the workflow area menu for developers (transaction SWLD), or call transaction PFTC.

    You are now in the entry screen for maintaining a task.

  2. In the field Task type, enter:

    TS (for standard task).

  3. Select Task ® Create

You go to the screen Standard task: Add on the Basic data tab.

Basic data

When the standard task is executed by its agent, the object method DISPLAY is to be executed on an object of type ZXX_MARA.

At runtime, the element _WI_Object_ID in the task container contains the reference to the object which will be processed by the object method.

In this scenario, this element is filled from the event parameter container via binding (see below).

The object reference from the element _WI_Object_ID is also used in the long text to access the object attributes (Changed by) and key fields (Material number) and to display them.

  1. Describe the standard task by specifying the following:

    Abbreviation: ZXX_MatDisp

    Name: Display material master

    Object type: ZXX_MARA

    Method: DISPLAY

    You have created object type ZXX_MARA in the object repository as a subtype of object type BUS1001. Object type ZXX_MARA has inherited the method DISPLAY from its supertype.

    Use the F4 possible entries pushbutton to find the object type and the methods defined for the object type.

  2. Save your entries.

Every task is identified by an 8-digit task number. The number is assigned automatically when you first save the task.

You can navigate to the processing for the corresponding object type in the object repository by double-clicking on the entered object type or method names.

Maintain Agent Assignment

To determine the possible agents of the standard task ZXX_MatDisp, link it to the job design specialist.

The possible agents of a single-step task are the employees in the company who are organizationally responsible and authorized to process the task at runtime. The total number of possible agents cannot be increased by role resolution.

  1. To make the assignment, select Additional data ® Agent assignment ® Maintain.

    You are on the input screen Maintain Agent Assignment.

  2. Position the cursor on the standard task displayed and choose Agent assignment ® Create...
  3. In the dialog box Choose agent type, select Job.
  4. In the dialog box Choose job, enter:


Double clicking on the folder symbol to the left of the job description displays the positions derived from the job and their holders.

Long texts for standard tasks

A long text can be used to enter information about the standard task.

The long text can be displayed from the integrated inbox of the user who executes the single-step task.

  1. To enter a long text, select the tab page Description and then the function Change text.
  2. Write your text.

In the long text, you can mark the places where runtime-dependent value from the task container should be inserted. To do this, choose Insert ® Expression at the appropriate points.

Enter the following text:

The basic material of material &_WI_Object_ID.Material& was changed by employee &_WI_Object_ID.ChangedBy&.

When the work item is executed, the material master of the material changed is displayed. You should verify the change.

If the keyword _WI_Object_ID does not appear in the list for insertion as a text variable, you must change the view using the function Key on/off.

In the long text for the standard task, you refer to the attribute ChangedBy of the object type ZXX_MARA, which you created.

Determine Triggering Event

In this scenario, a (single-step) standard task is to be started as a reaction to the event WrkstChanged. This event must therefore be specified as the triggering event in the definition of the standard task.

  1. To specify events as triggering events of a standard task, select the tab page Triggering events.
  2. Choose Edit ® Event ® Insert.

    You go to the dialog box Choose Event.

  3. Make the following entries:

    Object type: ZXX_MARA

    Event: WrkstChanged

  4. Transfer your entries and select Save.

Activate the Linkage

Activate the event-receiver linkage between the triggering event and the event-receiving standard task:

  1. Select the event and choose Edit ® Event ® Activate/deactivate linkage.

Defining binding between an event and a standard task

The event parameter _Evt_Object of the event WrkstChanged contains the object reference to the material changed. This information must be made known to the standard task ZXX_MatDisp via binding.

The element _WI_Object_ID is provided as standard in the task container and must always contain the object reference to the object processed by the task.

  1. To define the binding from the event parameter container to the workflow container, choose Goto ® Binding ® Event.

    You are now in the entry screen Task: Triggering events: Binding definition.

  2. Assign the element _Evt_Object from the event parameter container (right hand side) to the element _WI_Object_ID in the task container (left hand side).

This binding definition is already entered.

Exit input with ENTER.

You have assigned the reference to the object whose modification is publicized by the event to an element in the task container. Now the standard task "knows" which object is to be processed.

Specifying a default role for a standard task

The role ZXX_FindLab is created as a default role for the standard task.

If the standard task is started by an event and runs as a separate, single step, the default role is resolved at runtime to establish the agent.

  1. To specify a default role for the agent, select the tab page Default roles.
  2. Using the F4 input help, enter the role you defined


in the field Agent (default role).

Defining binding between a task and a role

For every default role you specify, you must define the binding between the task container and the role parameter container. This ensures that the role parameter container has the data necessary for role resolution.

The role parameter container of the role you defined contains the element ORG_Object_ID.

In the binding, this element must be filled with the design office whose assigned organizational unit is to be "produced" as the result of the role resolution and therefore as the agent of the standard task.

The reference to the design office is an attribute of the object type material, while the reference to the processed material is to be found in the task container in the element _WI_Object_ID.

  1. Choose Goto ® Binding ® Role
  2. Assign the expression _WI_Object_ID.Laboratory to the element ORG_Object_ID in the role parameter container.

Use the F4 key to display possible entries when selecting the entry above.


In this section, you have defined a single-step task (standard task) whose function is to display the master data of an object of type BUS1001 (material). The reference to the object to be displayed is found in the task container in element _WI_Object_ID.

You defined a triggering event for this task and therefore determined when the task is started.

In addition, you linked the single-step task with all its possible agents and reduced the total number of possible agents by specifying a default role.