Exp 0008
Exp 0008
Containers
Contents:
Containers
Container bindings
SAP AG 1999
SAP AG 1999
SAP AG
C
o
ur
seO
ve
r
vi
ew C
o
nt
ai
ner
s 8
I
ntr
odu
ct
i
on R
o
ut
i
ng
C
u
st
omi
zin
g D
e
ad
li
nes
W
o
rk
f
lo
wDe
f
in
it
i
on E
v
en
ts
B
u
si
nes
sOb
j
ect
B u
i
lde
r W
o
rk
f
lo
wWi
zar
ds
T
as
ks W
o
rk
f
lo
wa
nd
th
eI
nte
rn
et
M
o
ni
tor
i
nga
nd
An
al
ysi
s A
p
pe
nd
i
x
SA
PA
G1
99
9
SAPAG1999
SAPAG
Role container
Org. object _WF_INITIATOR
SAP AG 1999
User Jones changes the material master P-100 and therefore triggers the event
‘old_material_changed’.
The event triggers the workflow "Change material master".
In the event container, the object reference and the person who triggered the event are transferred
from the event.
The variable for the person who triggered the event is _EVT_CREATOR, the variable for the object
reference is _EVT_OBJECT.
Both values are transferred from the event container into the workflow container.
The person who triggered the event becomes the workflow initiator (_WF_INITIATOR).
The object reference variable depends on the object used.
The workflow container variables are available throughout the workflow runtime.
The task containers are created from the workflow container.
Caution: The task containers do not know your variables
Each task container must be provided from the workflow container.
In each task container there is a variable _WI_OBJECT_ID for the object reference.
The task recognizes the object reference, because the object type must be specified when defining
the task.
The changed material master flows from container to container as follows:
First it is an event object, then it is stored as ZBUS1001 in the workflow container, and from there
enters the different task containers.
SAP AG 1999
Binding definition - Definition of modeling and assignment rules introduced at runtime for
- Transferring the data from one container to another container
- Assigning values to container elements.
The workflow container is on the left hand side in the Workflow Builder.
When defining the tasks, choose the "Container" button for the task definition.
The binding definition is always executed with reference to the elements of a container. This means
that an expression is assigned to the container element or the container element is assigned to an
expression.
At definition time the system automatically generates a proposal for the required bindings.
Each binding generated must be checked for correctness.
When entering the task, choose the "Binding" buttton to find the binding between the workflow and
task containers in the workflow step.
For the binding to the role container, choose the button "Binding" in the box "Agent".
In the workflow basic screen, the binding from the event to the workflow container is on the
"Triggering events" tab page.
Task
Task Workflow
Workflow
SAP AG 1999
The upper part of the screen shows the binding from the workflow container into the task container.
The lower part of the screen shows the binding from the task container back into the workflow
container.
Not all container elements are visible by default. You can use the "Show lines" icon to make them
visible for processing.
Use the input help (F4) for values.
Workflow task
The task container always contains an element that can store the reference to the object to be
processed in the respective single-step task (_WI_Object_ID). It also contains the element
"_WI_Actual_Agent". This is the agent who actually executed the work item. For synchronous tasks
with a defined result parameter, the ‘_WI_Result' element can store
the result of the underlying object method.
The workflow container always contains an element that can store the user name of the “initiator”
of the current workflow (_WF_Initiator). For most workflows you have to create a new element in
the workflow container. To do this you can either go along with the SAP proposals, or you can create
your own element. For example, you have to provide a storage element for the main object of your
process.
The event container always contains an element that can store the (object) reference to the object
whose change of status is announced using the event '_EVT_Object'. It also always contains an
element with the name of the user responsible for changing the status of the object ('_EVT_Creator').
The role container contains the elements required as input in connection with the role resolution to
be run at runtime.
If a default role is defined for the entry, the binding can also begin from the entry in the role.
The method container contains elements which are import parameters in connection with the
method execution.
Notification of
absence created
“notification of absence”
Reference to object type
Approve notification
of absence
approved rejected
Change notification
of absence ?
Send mail
No Yes
Delete notification
mail sent of absence
deleted revised
Yes
Re-submit
for
No approval ?
Workflow
Complete
container
workflow
Workflow
completed
SAP AG 1999
Notification of
absence created
“notification of absence”
Reference to object type
Change notification
of absence
approved rejected
Change notification
of absence ?
Send mail
No Yes
Delete notification
mail sent of absence
deleted revised
Yes
Re-submit
for
No approval ?
Complete
workflow
Workflow
Workflow container
completed
SAP AG 1999
Notification of
absence created
“notification of absence”
Reference to object type
of absence
approved rejected
Change notification
of absence ?
Send mail
No Yes
Delete notification
mail sent of absence
deleted revised
Yes
Re-submit
for
No approval ?
Complete
workflow
Workflow
Workflow container
completed
SAP AG 1999
If the role resolution of a workflow step requires an import parameter, then those values have to be
provided from the workflow container.
Binding
Workflow container -> Role container
&_WF_INITIATOR& -> &ORG_OBJECT&
_EVT_CREATOR
_EVT_OBJECT
Workflow
container ‘CHANGE’ Task
container
_WI_Actual_Agent
Change MATERIAL
material
Role container
Material changed Changed_by
Superior Display ORG_OBJECT
of.. material
Material displayed ‘DISPLAY’ Task
container
_WI_Object_Id
Z_changed_by
SAP AG 1999
Value from
Self- order
defined; transferred
object from the
reference event
to customer
SAP AG 1999
Container elements can also be specifically provided by a workflow step. This involves the container
operation step.
Container operations are necessary, for example, if you want to execute a secondary method in
addition to the main method.
The binding entered in the workflow step usually only provides the main method.
Secondary methods must be provided using a container operation with valid values.
If it does not already exist, you must first create the object reference in the workflow container.
For example, you can create an element CUSTOMER in the workflow container that refers to the
object type KNA1 (customer).
You must then insert the container operation step into the workflow.
Your workflow processes a customer order.
In the container operation you provide the Customer element with the ordering party value
(ORDERINGPARTY) from the order (Element CUSTOMERORDER) in the workflow container
Caution:
The customer number (database key field) must not be transferred.
You must enter the reference to the whole object "ordering party" (object reference).
Workflow container
From the container elements of the triggering event
From the export parameters or results of a task
From a container operation step
By entering initial values
Task container
From a terminating event
From method parameters
By entering initial values
SAP AG 1999
How containers are assigned values at runtime is shown in workflow runtime reporting.
Task container:
Display work item (type W) that belongs to the task
Goto ,Technical work item display
Extras Container
Workflow container:
Display work item (Type F), that represents the whole workflow to which the task belongs
Goto - Technical work item display
Extras Container
The simplest way to view the type F work item (workflow work item):
From the work item display, go to the log and double click the highest level.
The workflow work item is displayed.
SAP AG 1999
Unit: Containers
When you create your own workflow, you also have to think about the
data flow. Within a workflow, data is transferred from one container to
the next. You prepare this data flow by defining the binding between
different containers.
1-1 Familiarize yourself with containers in the SAP Workflow system at runtime.
1-1-2 Name at least 2 possible ways to reach the starting point for a runtime
evaluation of a workflow or a task container?
____________________________________________
____________________________________________
1-1-3 You have a work item in your worklist. How do you display the associated
task container?
____________________________________________
1-1-5 You see a particular workflow container. Who is the initiator of this
workflow?
____________________________________________
1-1-6 Looking at the work item for your "Z##_T_1" task, where could you have
used an imported container element?
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
When you create your own workflow, you also have to think about the
data flow. Within a workflow, data is transferred from one container to
the next. You prepare this data flow by defining the binding between
different containers.
1.2 After the “Display material change documents” task, insert the “Display material
master” task
1.3 Name the manager of your organizational unit as the agent for this step.
Choose this person using their position.
1-4-1 How does the first task know which material to work with?
1.5 Activate the workflow and choose the “Test” button in the Workflow Builder.
In the first step, the change documents are displayed to the workflow initiator.
After the first step has been processed, the manager BC601-MGR## receives a
work item to display.
If you are executing the test as a manager, you will immediately see the material
displayed.
Otherwise, change to a mode in which you are registered as a manager, and execute
the work item to be sure that your material was correctly transferred. If you have
problems executing the work item, use “Refresh” in the inbox of your
organizational chart.
Until now you have created and tested a workflow. You now want to edit,
save, and release some of the workflow runtime data and additional user
data in your own document. The SAP Workflow development
environment provides the following document processing functions for
doing this.
Enter a new step description for each of the starting points “Step
executed” or “Document could not be created”.
1-2-3 Which element was created from new in the Workflow Container?
1-2-4 Insert a new activity after the starting point “Step executed”
This involves the activity “Edit document”, task
TS71007944.
All tasks for processing document templates can be found in
the task group TG71000004.
Check the binding in both directions.
The agent is the user BC601-MGR##.
1.3 Activate and test your workflow
Unit: Containers
1-1 Familiarize yourself with containers in the SAP Workflow system at runtime.
1-1-1 The workflow components with their own containers are:
Workflow
Task
Event
Role
Object method
1-1-4 After you have started the “Work item selection” report, select Type 'F'
on the “Selection Report for Work Items” screen. Then choose
Program Execute, or choose the “Execute” button
to start the report. Finally, position the cursor on your type F work item,
and choose
Goto Container.
1-1-6 Looking at the work item for your "Z##_T_1" task, where could you
have used an imported container element?
Task description
Notification text
Condition Editor
Secondary methods
Container operation
SAP EASY ACCESS -> Tools -> Business Workflow -> Development ->
Definition Tools -> Workflow Builder
Your workflow template is displayed.
1.7 After the “Display change documents of material” task, insert the task “Display
material master”
Double-click the undecided task after your task “Change documents for
material”, and choose the “Activity” button
Enter TS as the task and the number of your single step task “Display material
master”. Use the input help (F4) if you no longer know the number
1.8 Name the manager of your organizational unit as the agent for this step.
Choose this person using their position.
The task “Display change documents” knows the material from the initial value
entered in the single-step task.
It does not know it from the workflow container
In the workflow container, you must select the variable for the material object. It
can be the variable &MATERIAL_GROUP_##&
or &Zmara##&
Because the workflow is not yet started with events, you must ensure that the
workflow container variable is filled correctly from the first task onwards.
1.10 Activate the workflow and choose the “Test” button in the Workflow Builder.
Return to the screen “Workflow Builder zwf_test_## change”, and choose the
icon “Create and activate runtime version”
Then choose the “Test” icon
Execute the workflow template
In the first step, the change documents are displayed to the workflow initiator.
After the first step has been processed, the manager BC601-MGR## receives a
work item to display.
If you are executing the test as a manager, you will immediately see the material
displayed.
Otherwise, change to a mode in which you are registered as a manager, and execute
the work item to be sure that your material was correctly transferred.
If you have problems executing the work item, use “Refresh” in the inbox of your
organizational environment.
To do this, choose the following in the “Business Workplace” screen:
Settings -> Workflow settings -> Refresh organizational environment
Enter the number of your material workflow. If necessary, use the input help
(F4) to find this number.
Under “Copy”, enter the abbreviation “Zdocu_##”, Description “Document
template Group 20”.
1-1-1 Create a new document template
Return to the task menu and choose
“Change task”.
The workflow number has already been entered.
Choose the “Change” icon and start the Workflow Builder using the
“Workflow Builder” icon .
To insert the variables, position the cursor in the desired place and select
the appropriate variable from the variable display on the left hand side of
the Workflow Builder.
1.1.3 Save the template
Return to the Workflow Builder standard display.
The system will ask if you want to save the template.
Save it under 'ZDOC_##'.
The document template is visible in the navigation area under document
templates.
1.2.3 Which element was created from new in the Workflow Container?
Select the outcome “Step executed” for the activity you have just created.
Choose the “Create” button and then choose “Activity”.
Enter the task TS71007944 (Edit document).
All tasks for document templates are in the task group TG71000004.
Check the binding in both directions. The workflow container variable is
&WF_DOCUMENT_0001&
In the Workflow Builder, choose the icon “Create and activate runtime version”