Posted on Apr. 09, 2009 08:38 AM
Multiline element is an array type element which can contain more than one record or instance during runtime. One typical example would be the association between material master with purchase or sales order document, where one material master can be used as item in multiple purchase or sales order documents. In this case, purchase order or sales order will be created as multiline attribute of material master business object.
How do we handle multiline element?
1. Without Block Step
a) Create a multiline element in workflow container to store multiline attribute from the business object.
b) Create container operation step to assign multiline attribute from the business object
c) Go to Miscellaneous tab of the activity step where you want to process the multiline element, and register your multiline element over there as shown below:
d) In the binding section of the control tab of the step where you want to process the multiline element, drag and drop the new workflow container element which is created (automatically) from the previous step and bind it to the proper task container element.
2. With Block Step
a) Create a multiline element in workflow container to store multiline attribute from the business object. Please refer to the step 1a) above.
b) Create container operation step to assign multiline attribute from the business object. Please refer to the step 1b) above.
c) Create a block step and register multiline element in Parallel Processing tab. This tab will come out if you have set the block type to 'P ParForEach'.
d) Don't forget to do the proper binding between your workflow container element and step/task container element.
e) In the step where you want to process multiline element, drag and drop the new element created from the block step and bind it with the proper task container.
3. How to use multiline element for agent assignment?
Instead of one user receive multiple work items; you want multiple users to receive a particular work item.
You can use both techniques discussed above to do the same. The only different is that you need place the multiline element in the expression of the agent, instead in the binding of your workflow and task.
Multiline agents without block step
Multiline agents with block step
4. Notes on the block step
If you change the block step type to 'S ForEach' from type 'P ParForEach' for the above scenario, then the work item will NOT be created parallelly in the agents' workplace, but rather it will be created in the agent workplace one at a time. Once all the steps in the block have been executed, just the next work item will be created in the next agent's workplace. You can use this block step with multiline agent attribute for example to perform dynamic approval scenario, where number of approvers will be know only at runtime, NOT at design time.
Life is beautiful! Let's make it meaningful and colorful!