5. Container in a Workflow Edit Material Master transaction (basic view) Change documents Material: My_part Old Material: Original_part New_part Event Container: Creator Object Workflow Container: ZBUS1001 Initiator Task Container: WI_Object_Id Role Container: Org-Object Event Step
6.
7. Using Containers Event Task Role Role container Method Event container Method container Workflow Work item container Task container Workflow container
8.
9.
10. Possible Binding Directions Method Role Role parameter container Task Work item container Task container Workflow Workflow container Event Event parameter container Method parameter container
11. Demo Example: Binding Definition (1) Reference to object of type “notification of absence” Submit notification of absence Notification of absence created Approve notification of absence approved rejected Send mail mail sent Resubmit for approval ? no Revise notification of absence ? Complete workflow no Delete notification of absence Workflow completed deleted yes Yes revised Workflow container
12. Demo Example: Binding Definition (2) Reference to object of type “notification of absence Workflow container Submit notification of absence Notification of absence created Approve notification of absence approved rejected Send mail mail sent Resubmit for approval ? no Revise notification of absence ? Complete workflow no Delete notification of absence Workflow completed deleted yes Yes revised
13. Demo Example: Binding Definition (3) Person submitting notification of absence Reference to object of type “notification of absence Submit notification of absence Notification of absence created Approve notification of absence approved rejected Send mail mail sent Resubmit for approval ? no Revise notification of absence ? Complete workflow no Delete notification of absence Workflow completed deleted yes Yes revised Workflow container
14. Binding and Containers Workflow container _WF_Initiator MATERIAL Changed_by Event Container _EVT_CREATOR _EVT_OBJECT Role container ORG_OBJECT ‘ Change’ Task container _WI_Object_Id _WI_Actual_Agent _WI_Object_Id Z_changed_by ‘ Display’ Task container superior of... event Change material Display material Material changed Material displayed
17. SAP Workflow Course PwC Consulting TM refers to the management consulting services businesses of the member firms of the worldwide PricewaterhouseCoopers organisation. 2001 PricewaterhouseCoopers. All rights reserved.
Editor's Notes
There are several containers in a workflow: Workflow container, work item container/task container, role container, method container, event container. Containers are used for field values and object references. Containers are required to store information in a standard data structure. During runtime: The user who is editing the material master is known to the workflow as the event creator and later on as the workflow initiator. The ‘role resolution' in this example is supposed to search for the superior of a given user. The material master is flowing from container to container. First it is the event object. Then it is stored as ZBUS1001 in the workflow container. At last it is known to your single step task as the WI_Object_Id.
Containers are the table-like data structure used in the various definition and execution components of SAP Business Workflow. Containers are used for field values and object references. Containers are required to store information in a standard data structure. The task container always contains an element which can take the reference to the object to be processed in the respective single-step task (_WI_Object_ID) may contain an element which can take the result of the underlying object method (_WI_Result) The workflow container contains an element which can take the reference to the object(s) to be processed in the workflow always contains an element which can take the user name of the “initiator” of the current workflow (_WF_Initiator)
The task container always contains an element which can store the reference to the object to be processed in the respective single-step task ‘_WI_Object_ID'. Furthermore it contains the element ‘_WI_Actual_Agent', this agent has actually completed the work item. For synchronous task with a defined result parameter, there is the ‘_WI_Result' element, which can store the result of the underlying object method. The workflow container always contains an element which can store the user name of the “initiator” of the current workflow ‘_WF_Initiator'. For most workflows you have to create new elements in the workflow container. To do this you can either go along with the SAP proposals, or you can create your own. For example you have to provide for a storage element for the main object of your process. The event container always contains an element which can take the (object) reference to the object whose change of status is announced via the event ‘_EVT_Object'. It also always contains an element containing the user name of the party responsible for the change of 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 The method container contains elements which are import and export parameters in connection with the method execution.
Standard data structure used in the various definition and execution components of SAP Business Workflow. The table-like structure of containers is used for taking values (constants) and object references for control and monitoring purposes for the workflow process and the execution of work items. Container definition - Description of the elements to be stored in the container, using element name, description and data type reference. Data type of container element known at definition time! This information can be used for validation and consistency checks, for example. Container elements are prepared at their definition by stating a data type reference for taking a field value or an object reference. Container instance - Table-like runtime structure from container definition. The name of an element is entered in a line together with its value. The data type of this value must be in accordance with the data type reference established at definition.
Binding definition - Definition of modeling and assignment rules implemented at runtime for transferring the data in one container to another container assigning values to container elements Binding definition is always integrated into the definition of the current workflow component. Binding definition is always performed 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.
Binding between the workflow container (one per workflow definition) and the event containers of the triggering event. Example: Workflow Container <== Event Container Initiator <== &_EVT_CREATOR& vacation_request <== &_EVT_OBJECT& Binding between the workflow container (one per workflow definition) and the role container of a task. Example: Role Container <== Workflow Container OrgManagement object <== &_WF_INITIATOR& Binding between the workflow container (one per workflow definition) and the task container of a task. Example: Task Container <== Workflow Container Notif. of absence <== & vacation_request&
Element in the workflow container : vacation_request (notification of absence) The element is created with a data type reference to the object type FORMABSENC. Design question for this workflow: Where is an object of this type coming from and which steps will use it?
The object “vacation request” for this workflow is delivered into this process by the triggering event. The object reference is stored in the workflow container as a “notification of absence”. The following steps will require this object as input to their task container.
If the role resolution of a workflow step requires an import parameter, then those values have to be provided from the workflow container.
There are two customer created elements in the workflow container: Material is based on business object BUS1001. Changed-By is based on the ABAP dictionary field WFSYST-AGENT. The EVENT will deliver information into the workflow container. From the container of the CHANGE task, the workflow container will receive the actual agent who has executed the task. The ‘Z_changed_by' can be used as a variable in the work item text of the display task. The workflow initiator is used as input for the ‘find supervisor' role. The supervisor of the initiator is supposed to work on this step.
The workflow container is the central point for all data within the workflow. If the data is not in the container, then the workflow does not know about this. There are different ways to get data into the workflow container From the container elements of a triggering event. From a container operation step. From the export parameters or results of a task. The container of a task could receive data at start time from the workflow container. When the task is finished, it could receive result information from a synchronous method. The terminating event of a task could also deliver data into the task container. The container operation can change data in the workflow container. The step deadline functionality can read day or time data from the workflow container. The role resolution for the Step-Responsibility requires input from the workflow container.