Workflow to process multiple rows
There’s no standard loop construction (For/While/Do) in Siebel Workflow, but there are still a couple of ways to have a Workflow Process handle multiple rows.
Update Operation
For a simple update to a child entity use a Siebel Operation. When a Workflow Process has a Business Object then a Siebel Operation Update step defined for a child Business Component will update all records that are children of the selected record in the Primary Buisiness Component. The update can be filtered to specific records by specifying a SearchSpec on the Update.
This technique can be expanded through the use of Runtime Events: define an Event on the child BusComp to catch a simple update operation and trigger further processing of the record.

Bear in mind that for this to work then the Object Id process property must specify a valid record in the Primary Business Component. Also, watch out for this gotcha if you’re trying to dynamically update a field.
Sub Process SearchSpec
An alternative way to process more complicated actions is to call a sub-process for multiple rows. In this case a Workflow Process is defined as normal to act on a single record specified through the Object Id. Then to have this workflow run for multiple rows, define a new ‘wrapper’ workflow and add a Sub Process step to call the original process. To this Sub Process step add the Input Argument SearchSpec, supplying a search specification through the Value in the normal way.
When the wrapper workflow is executed, the SearchSpec is applied to the primary Business Component of the sub-process and the child workflow is run once for each row returned.

6 comments August 6th, 2008