Professional Documents
Culture Documents
Session 2 - Containers
Session 2 - Containers
It’s the location/variables to store/hold the data. It can be simple variables, structure , even objects of any
class. Elements required in the workflow are declared in the workflow container.
1. Workflow container
2. Task container
3. Method container
4. Rule container
Binding
Exchange of data can be done through binding between two different container. Data can be flowed from
event container to workflow container , from workflow container to method container and so on.
Project : Here we will first learn how to create container elements and then one example to demonstrate
how to store data into database or how to interact with backend from Workflow.
In the initial tab provide the initial value which means we can assign any default value to the
container elements.
Now the variable /container element has got created and placed in left panel of Workflow
container.
RC on the undefined step and select create button. We are going to create one step called
User decision step.
Choose the User decision step from list of steps. This step is basically a dialog step which
requires user interaction to take the action. The action will be specified at design time. Once
this step is executed at run time one dialog work-item gets generated and get placed in user
inbox .
In title section provide the title which will be nothing but the subject line of the mail. We can
dynamic value set in subject by having & symbol placed in the title section. Once &1 is
placed , provide the binding of the container element in parameter section which will be
holding the dynamic value at run time .
Provide the agent who will be receiving the work-item in his/her inbox. Here workflow
initiator is being choosen so that the person who initiates the workflow will receive the
workitem. Also provide the action which you want the user to take.
Click on save button hence it will ask to provide abbreviation. It is to identify the worklfow
from list of workflows.
Once saved workflow gets created with one user decision step and two branches ( Approve
and Reject).
Provide the abbreviation and object category as ABAP Class and object type as class
Name and provide the method to save the salesorder.
Now check the binding -> The flow of data should be from Task container to Method
container. i.e. the sales order which is approved should flow from Task container to method
container so that the method can take that data and save the same into database. Drag and
drop the elements to perform the binding.
Now flow the data from Workflow container to Task container. Thus the flow would be done
w.r.t Binding. ( worklfow container -> Task container -> Method container).
Now the activity step has got added in the approve branch.
Ow test the Workflow by clicking on Test button present beside the Activate button.Provide
the salesorder value.
Now go to SBWP , where the workitem will be present. Now execute the workitem.
Now look into the database , the record would have got stored into databse.
Go to SWIA to see the graphical log.
Now we understood how to flow the container element through binding and how the workflow interact
with Databse table.