Loop Through Multiple Records In A Workflow

9 February 2025

User wants to loop through multiple records in workflow which are returned after execution of query .

Solution : A Vanilla Business Service  can be used to loop through records in a workflow 

Business Service SIA BC Utility Service
MethodName BCNextRecord

  Input Arguments:

Business Component Name Name of BC for which you want to loop records.
Forward Only Value will be “Y” if you want to loop records in Forward Only Mode.
From First Value will be “Y”, which should be read from Process Property, and in the Output of the BS , the Process Property needs to be changed to “N” so that the looping occurs.
Search Specification Search Specification if any.

 Output Arguments:

Row Id Row Id returned by the Search Spec
Process Property Used in “From First” needs to be updated to “N”

 Sample: 

  1. Query Records:- This step uses the “SIA BC Utility Service” as explained above
  2. IsRecord?:- Decision point which checks the value of “Siebel Operation Object Id” and routes the flow.
  3. Process Records:- Any Operation you want to perform on the record 

Note :The BS will raise an error if no record is found in the stated query

Tags