Professional Documents
Culture Documents
Tasks
Contents
Basics for defining a task
Enhanced components for
defining a task
Task groups
Business Workflow Explorer
SAP AG 1999
Create a task
Define the basic components of a task
Define the enhanced components of a task
Define and use task groups for structuring
tasks
Use the Business Workflow Explorer
SAP AG 1999
Introduction Routing
Customizing Deadlines
SAPAG1999
Workflow template
Workflow
Task types:
Definition
Workflow template
(WS)
Tasks
Task (TS)
Organizational
plan
Object type
Attribute Method
SAP functions
SAP AG 1999
Task
Standard task
Reference to object
TS
method or
manual activity
Workflow
Workflow template
Reference to WS
workflow definition
SAP AG 1999
From an organizational perspective, tasks are the central element in the workflow system.
Tasks are used to describe a business process. Tasks can be executed one after the other in the
business process. Parallel steps can, however, also be defined.
Tasks are designed as client-independent and time-independent, reusable modules.
Tasks are generally executed in the context of a workflow definition.
In exceptional cases, they can also be explicitly triggered without being included in a workflow.
Like tasks, workflow templates are also client-independent and time-independent.
You may find workflow tasks (WF) and customer tasks (T ) in your system. They are client-specific
and have a validity period.
Up to and including Release 4.0, WF and T could be created with the same authorizations as WF und
TS.
As of Release 4.5A, when you create new workflows and tasks, the system only offers you WS and
TS.
WF and T are not being further developed.
Existing WF and T are still executable.
Note: You cannot include customer tasks (T ) in a workflow template.
Event
ZBUS1001.
Organizational plan Old_Material_Changed
Design department WHO?
Designer position ( = Possible
agent)
Holder: Mary
ZBUS1001.Display What?
Task
Attributes and key Work item Display material
and (Confirm end of
of ZBUS1001
long texts processing)
SAP AG 1999
O rganizational
Standardtask
plan
Ob jecttypewith Whois
What isto
obje ctmethod responsible
execute forthe
thetask? task?
Characteristics
"G eneraltask"
all SAPu sers
Texts Events
Workitemtext:Titleofwork
iteminin bo x TerminatingEvents
L ongtexts: Triggeringevents
D escrip tion Onlyif thetaskisn ot
N otification usedinaw orkflow
M isse dd eadlines
SAPA
G1999
Background
Based on the object method, the task can be flagged as a
background task.
Confirm end of processing
During runtime, the user can create an attachment after the
work item has been executed.
The user explicitly explains that the work item does not have
to be processed any longer.
SAPphone
Form (SAPforms indicator)
SAP AG 1999
Example:
Process request from &_WI_Object_ID.CreatedBy&
SAP AG 1999
The long texts of tasks use the same concept for variables.
You maintain long texts in the task on the ‘Description’ tab page.
You include variables by choosing ‘Insert -> Expression’.
Example of a task description for the "Approval step”
Employee &_WI_Object_ID.CreatedBy& created a notification of absence under the number
&_WI_Object_ID.Number& on &_WI_Object_ID.CreateDate&. Decide whether to approve.
SAP AG 1999
The terminating events are published events of the business object type on which the task is based.
You have to assign terminating events to each asynchronous task. The system recognizes by the
triggering event that the method call is completed.
Example 1: The asynchronous task "Delete leave request" has to have at least one terminating event,
usually the event "Deleted".
The application triggers the event in the context of the method "Delete leave request" and the
associated work item can be completed.
Example 2: The synchronous task "Approve application" can have a terminating event. The event
may be an enterprise-wide recruitment freeze.
Synchronous tasks need terminating events if it is not guaranteed that the processing on which the
work item is based is executed by the workflow system exclusively.
If a task is to be able to be completed by a business event exclusively, this task has to contain an
asynchronous method.
_WI_Object_Id
_WI_Actual_Agent
Terminating events
_WI_OBJECT_ID
_WI_OBJECT_ID
stands
stands for the
for the affected
affected work
work item
item
at runtime
at runtime
SAP AG 1999
A terminating event applies to one instance of a task only, that is, to one specific work item. The key
of the work item, therefore, has to be given to the terminating event.
Example:
A head of department has four work items for leave request.
They have the work item numbers 1, 2, 3, 4.
The person making request number 3 deletes their request. The work item in the inbox is then no
longer needed and has to be deleted.
The terminating event "Request deleted" now has to be generated for work item 3.
The object reference is given to the terminating event for this purpose.
The object reference for a task is always in the variable _WI_OBJECT_ID.
A terminating event for a task is, therefore, specified as follows:
Object type for which the event is defined
Name of event
Container element _WI_OBJECT_ID
SAP AG 1999
Since a synchronous method can return values to the calling system, synchronous methods can have
export parameters or results parameters.
Example of results parameters:
The method ‘Approve leave request’ is to be completed with ‘Approved’ (A), ‘Rejected’ (R) and
‘New’ (N).
The values A, R and N are stored as fixed values in a domain.
The relevant value is transferred to the workflow in a special attribute.
The definition of results parameters can be exemplified using the method ‘Approve notification of
absence’ (Formabsenc.Approve).
General definition: Results parameter flag set
Under Result type, you find the reference field for the respective value (= PROCSTATE) and the
reference table SWXFORMAB.
In the ABAP Dictionary, the field PROCSTATE is of the field type SWX_PROCST. This field type
is assigned a domain SWX_PROCST. The domain contains the fixed values A, R, N.
If you incorporate a task that links to a method with results parameters into a workflow definition,
the Workflow Builder automatically generates outcomes corresponding to the defined fixed values.
If a task is to be able to be completed by a business event exclusively, this task has to contain an
asynchronous method.
Key fields
Number
Number Number
Attributes
ApprovDate
ApprovDate Approval date
ApprovBy
ApprovBy Approved by
CreateDate
CreateDate Creation date
CreatedBy
CreatedBy Created by
Methods
Display
Display Display notification of absence Dialog Synchronous
Create
Create Create notification of absence Dialog Synchronous
Delete
Delete Delete notification of absence Asynchronous
Update
Update Update notification of absence Dialog Synchronous
Approve
Approve Approve notification of absence Dialog Synchronous Result
Events
Created
Created Notification of absence created
Deleted
Deleted Notification of absence deleted
SAP AG 1999
The object type “notification of absence” (FORMABSENC) is used as an example demonstrating the
attributes, methods, and events above.
AF_approve
Long text
SAP AG 1999
A results parameter is defined for the method APPROVE. The results parameter refers to a result
type that references a table field (PROCSTATE in SWXFORMABS).
From the entries in the dictionary, it becomes clear that the result type refers to fixed values of the
domain SWX_PROCST. The fixed values are A (Approved), R (Rejected) and N (New).
If the method APPROVE is incorporated in a workflow step, the system always generates possible
outcomes for the 3 values automatically.
AF_delete
SAP AG 1999
Multiple outcomes
SAP AG 1999
Task group 1
Standard task 1
...
Standard task m
Task group 3
SAP AG 1999
Logically connected tasks are grouped together in task groups. Note also that task groups can have a
description text. The use of the task group can therefore be precisely documented.
Hence, it is possible, for example, to:
Place workflow templates that only communicate with each other using events together in a task
group. As a result, you obtain a better overview.
Bundle tasks (workflow templates and standard tasks) that belong to one work area in order to
increase reusability.
Task groups are also useful for defining the search range for the Business Workflow Explorer. The
Business Workflow Explorer can then display the tasks in these task groups.
Important note: Task groups can only contain the task types 'workflow template' and 'standard task'.
Workflow tasks and customer tasks are no longer supported.
Workflow template x
Forwards
Forwards to
to
USSCHMIDTPA (Patrick Smith) agent
agent
assigned
assigned
Standard task x USSCHMIDTPA
USSCHMIDTPA
USSCHMIDTPA (Patrick Smith)
Workflow template y
SAP AG 1999
Tasks pass on their characteristics to the collected tasks and task groups.
This inheritance also continues through any assigned task groups. As shown in the graphic, the tasks
in a task group also inherit the characteristics of the task group highest in the hierarchy.
With very extensive inheritance hierarchies, undesired agent assignments can be made if an
organizational object is assigned to the highest task group. Therefore, ensure that the change of
responsibility for the task group is also desired for the assigned tasks and task groups.
Onemediumformanagingtasksandworkflows
Functionsavailableinclude...
Create
Change
Display
Copy
Agentassignment
Andsoon.
Nohelpvalu esreq uired.Allrelevanttasks
aredisplayeddirectly.
SAPAG1999
The Business Workflow Explorer facilitates the management of workflow projects. All tasks can be
assigned to a task group. The relevant employees incorporate this task group into the search range of
the Business Workflow Explorer.
The functions mentioned here can always be accessed from context menus (right mouse button). The
following functions are also possible:
Display current workflows of task
Quick overview of most important task attributes
The Business Workflow Explorer always uses a defined search area. This area can be defined
interactively by the user. Note, however, that calling the Business Workflow Explorer takes longer
than accessing the largest chosen search range since all tasks have to be imported with their
attributes. Therefore, ensure that the chosen search range is not unnecessarily large.
Parts of the Business Workflow Explorer can be used within the Workflow Builder.
Query
SAP AG 1999
The search range of the Business Workflow Explorer can be defined with the following objects:
- Task groups
This is the preferred option since granularity is optimized. In principle, every workflow modeler
can create one or more task groups to organize their tasks.
Application components
This key is not a very precise sort key and is probably not relevant for customer projects.
- Other
SAPphone tasks
Tasks suitable for telephone integration (inbound calls and/or outbound calls).
Local objects
All local tasks in the system. Only your own local tasks (user-specific).
The tasks used in a workflow definition can be displayed in more detail by choosing 'View->Details'.
The Explorer then displays more information about the tasks in additional columns (object type,
method, agent assignment, background task, and so on.).
If you click on a multistep task in the left-hand tree, the most recent (and not the active) version is
read and displayed in detail in the right-hand tree.
Unit: Tasks
Topic: Basics for Task Definition
Standard tasks are based on the methods of object types. These tasks can
be used as stand alone 'single-step tasks' or as steps in a workflow
definition.
1-1 Familiarize yourself with the different tasks in the SAP workflow concept.
1-1-1 List all the task types that you can create by default in Release 4.6, along
with their abbreviation and their usage method:
_________________________________________________________
_________________________________________________________
_________________________________________________________
1-2 Define the two tasks as standard tasks. Do not enter a work item text yet.
1-3 Test your two tasks "Change documents for material" and "Display material
master".
© SAP AG BC601 6-25
1-3-1 Update the organizational buffer.
Enter TS and the number of your "Change documents for material" task, for
example, "50012901".
In the "Initialize Container" dialog box, use the input help in the "Value"
field to enter your material T-BBD##.
1-4 You have demonstrated the tasks to your users and they have asked for some
enhancements. They would like the completion of the task to be explicitly
confirmed and would like to add some meaning to the message text in the worklist.
Adjust the task "Change documents for material" to the user requirements.
1-4-2 Change the work item text for the task "Change documents for material".
The work item text appears in the worklist of the recipients.
On the "Basic data" tab page, enter your text, for example "Display changes
of material" in the "Work item text" field.
Position your cursor after "material" and insert the material number variable
by choosing the "Insert variables" button.
In the "Please Choose an Expression" dialog box, click on the plus sign next
to the object type "Y##MARA" (may also be displayed as
BUS1001_Groupnr_## or _WI_OBJECT_ID).
Double-click the "Material" field.
The work item text now contains the value
&_WI_OBJECT_ID.MATERIAL& after "material".
Save your task.
(Note: The & sign is a placeholder for the variable.)
Make sure that there is at least one space before the first '&' sign and one
space after the second '&' sign.
Again, make sure that there is at least one space before the first '&' sign and
one space after the second '&' sign.
1-4-5 Test your task again. Open another session and go to the Business
Workplace.
Write down your work item text:
________________________________________________
The task description of your work item is displayed in the lower part of the
screen. Afterwards end that session.
To complete this work item, click on the "Complete processing of step"
button in the "This Work Item Has To Be Completed Explicitly" dialog box.
Why was this additional dialog box displayed?
________________________________________________
1-5-1 Insert your task "Change documents for material" as the new first step in
your workflow.
Call the Workflow Builder.
Your workflow template is displayed.
Integrate the task directly after the step "Workflow started".
Accept the question about the workflow <-> task container binding. This
point will be covered later.
As the agent of this step, choose the "expression" &_WF_INITIATOR&.
On the "Outcomes" tab page for "Step executed", enter a text, for example
"Change documents displayed".
Exit the screen and activate your workflow again.
Unit: Tasks
Topic: Basics for Task Definition
1-1 Familiarize yourself with the different tasks in the SAP workflow concept.
1-1-1 List all the task types that you can create by default in Release 4.6, along
with their abbreviation and their usage methods.
SAP EASY ACCESS -> Tools Business Workflow Development
Definition Tools Tasks/Task Groups.
Double-click "Create".
Choose the F4 Help for the "Task type" field:
TS Standard task, stand-alone or as a step in a workflow
WS Workflow template, stand-alone or as a subworkflow
TG Task group
Task AF_approve
1-2 Define the two tasks as standard tasks. Do not enter a work item text yet.
Task Blank
Abbr: Z##_TS_1
Method Display_Changes
Position your cursor on the task highlighted in light green and choose:
Task Blank
Choose the "Create" button.
On the "Basic data" tab page, enter the following information:
Abbr: Z##_TS_2
Method Display
Answer "Yes" to the prompt "Transfer missing elements from the object
method?".
Position your cursor on the task highlighted in light green and choose:
Task Blank
On the "Search and Find: Tasks" screen, enter your group number, for example
Z20*, and choose the "Find" button.
Provide input data by choosing Task Input data (or the "Input data" button).
In the "Initialize Container" dialog box, use the input help to enter your material T-
BBD##.
In the SAP Easy Access menu, choose Tools -> Business Workflow ->
Development -> Definition Tools -> Tasks/Task Groups.
Double-click "Change".
On the "Task: Maintain" screen, enter your task number and choose Task ->
Change, or the "Change" button.
1-4-1 In the "Execution" frame, set the "Confirm end of processing" flag. This
changes the runtime behavior of the work item for this task.
1-4-2 Change the work item text. The work item text appears in the recipient's
worklist.
On the "Basic data" tab page, enter your text, for example "Group##:
Display changes of material", in the "Work item text" field.
Position your cursor after the word "material" and choose the "Insert
variables" button.
In the "Please Choose an Expression" dialog box, choose the "Switch
display: Technical name/Description" button to display the description of
the expression.
Click on the plus sign next to your object type. It is displayed as
Y##MARA or as BUS1001_Groupnr_## or it is after _WI__OBJECT_ID.
Double-click the "Material" field.
The value &_WI_OBJECT_ID.MATERIAL& has been inserted after your
work item text "Display changes of material".
(Note: The & sign is a placeholder for the variable.)
Make sure that there is at least one space before the first '&' sign and one
space after the second '&' sign.
Again, make sure that there is at least one space before the first '&' sign and
one space after the second '&' sign.
1.4.5 Test the task "Change documents for material" again. Open another session
and go to the Business Workplace.
Write down your work item text:
________________________________________________
The task description of your work item is displayed in the lower part of the
screen. Afterwards end that session.
To complete this work item, click on the "Complete processing of step"
button in the "This Work Item Has To Be Completed Explicitly" dialog box.
Why was this additional dialog box displayed?
You have set the "Confirm end of processing" flag.
Return to the SAP Easy Access menu by choosing the "Back" button
(green arrow).
1-5-1 Insert your task "Display changes" as the new first step into your workflow.
In the SAP Easy Access menu , choose:
Tools -> Business Workflow -> Development -> Definition Tools ->
Workflow Builder.
Your workflow template is displayed.
On the "Workflow Builder - Change" screen, select the event "Workflow
started".
Field Names
Outcome Name
The material number was already provided as an initial value at the task
level.
Path: Tools -> Business Workflow -> Development -> Definition Tools ->
Tasks/Task Groups.
Double-click "Change".
Choose the "Standard tasks" tab page and specify your standard tasks using the
F4 Help.