33 Responses to “Siebel – SIA BC Utility Service – Loop multiple records”
Leave a Reply
You must be logged in to post a comment.
This is a vanilla business service which provides an extensive functionality that can be used at the BC level for performing the tasks like querying and invoking a BC method. It is very useful as it provides many powerful features that can not be done through Siebel operation. One of the methods it supports is, “BCNextRecord”.
This method is used to query the records in the BC. Unlike Siebel Operation, this method provides the feature of searching the records sequentially in the queried records. It has the following arguments:
i) Business Component Name :- This argument requires the Business component name on which the query has to be made.
ii) Forward Only :- This argument specifies the mode of execution.
iii) From First :- This argument specifies that the query needs to be run from first record in the BC.
iv) Row Id :- This is an output argument that gives the row id of the record.
v) Search Specification :- This argument takes the search specification on the basis of which the query is executed.
vi) Total :- This argument is an Input/Output and gives the total records found in the query.
vii) Total Field :- This argument receives the fields of the BC in which the query is to be executed.
But there is a main disadvantage of using this BS is that if it does not find any record in the stated query, it raises an error.
Illustration of this BS by an example
To make the working clear of this Business Service, the following workflow is made that query a BC using this
In the above figure, there is a workflow “Vanilla BS Workflow” which is used to elaborate the use of this BS. In this example, the workflow is made to query on the “Order Entry – Orders” BC. The BS must be provided with certain input arguments and on the basis of which the query is executed on the mentioned BC and flow is further taken on the basis of the query results. The processing of this workflow can be given step by step as follows:
1. Query Records :- This step uses the “SIA BC Utility Service” which is called for executing a query on the BC. This service, in this WF, is used to query on the “Order Entry – Orders” BC. The arguments provided to the BS are:
i.) Business Component Name :- This argument takes the literal value for the BC on which the query needs to be run. The value provided in this WF is “Order Entry – Orders”.
ii.) From First :- This argument is mapped with the process property and it executes the query from the first record in the BC. Here, it is mapped with the WF process property “ExecuteQuery” which has the default string set as ‘Y’. This WF process property is to be set as to control the functioning of the BS
iii.) Search Specification :- This argument takes the search specification by which the query will be run. In this WF, the search specification is given as “[Status] <> ‘Completed’ AND [Price List] IS NOT NULL AND [Agreement Name] IS NOT NULL”.
i.) Row Id :- This output argument is mapped with the “Siebel Operation Object Id” WF process property that will store the Row Id of the record found in the Query.
ii.) Total :- This output argument is mapped with the “RecFound” WF process property that will store the total number of records found in the query.
iii.) ExecuteQuery:- This output argument has the literal value set to ‘N’ which was ‘Y’ in the input.
2. IsRecord? :- This is a decision point which checks the value of “Siebel Operation Object Id” and routes the flow accordingly. This decision point actually checks if the record found in the query. If the record exists, then it moves to the “Set Line Item Status” step otherwise the flow will end.
3. Process Records :- We are using a Siebel vanilla Subprocess step to process the data from different fields from each of the records one by one. It could be anything as per the business requirements, eg. sending outbound XMLs through B2B.
i.) Header Id (example) :- This argument takes the value from the “Siebel Operation Object Id” and on the basis of this, the status will be set on the corresponding line item according to the code in the BS.
And, also many other field values from step (1) as per the business requirement.
i.) Message :- This is an output argument that gives the error message that occurs in the BS. It is mapped with the “Error Message” process property of the WF.
4. Error Handling: Subprocess :- This is a subprocess which is called to catch an exception and to log the error in the “Error Logs” BC. The WF steps are connected to this subprocess. This subprocess have the following arguments:-
i.) Error Message:- This argument takes the value from the “Error Message” process property of the WF and on the basis of this, the error will be logged in the custom BC named as “Error Logs” BC.
ii.) WF Name :- This argument takes the literal value of the WF name itself. The value passed in the property is “Vanilla BS Workflow”.
So, in this way, this BS will work. Keep using it!!!!!!
You must be logged in to post a comment.