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.
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:
You are now in the entry screen for maintaining a task.
TS(for standard task).
You go to the screen Standard task: Add on the Basic data tab.
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.
Name:Display material master
Object type: ZXX_MARA
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.
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.
You are on the input screen Maintain Agent Assignment.
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.
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
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.
You go to the dialog box Choose Event.
Object type: ZXX_MARA
Activate the Linkage
Activate the event-receiver linkage between the triggering event and the event-receiving standard task:
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.
You are now in the entry screen Task: Triggering events: Binding definition.
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.
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.
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.