I found the idea nice but I saw a flaw in implementation of that idea.I was not sure what I felt was right or wrong so as usual decided to put in front of you guys, so that you can verify whether my observation was correct or not.
This post talks about using SIA BC Utility Service BS (only available for SIA applications) to loop through multiple records in a workflow , which is quite valuable information and worth sharing but I didn’t find the example as useful as the idea of using this business service.
The workflow in the example is designed as shown below
- In the first step it uses SIA BC Utility Service BS to query a BC and as an output gets total number of records returned and also it gets the Row Id of record as an output.
- In second step it check a process property to see if any record is returned or not and if a record is returned then it moves to third step.
- Third step calls a Custom Business Service and passes the row id as input argument to perform some validation and set line item status.
This particular step (Set Line Item Status) caused my alarm bells to ring because, it means that Custom Business Service will take Row Id as input argument and pretty obviously it will query again on the BC using that Row Id and then do whatever it is suppose to do.
I think if there is no way to avoid custom business service then I don’t see a need to have two additional steps in workflow and increase unnecessary overhead. According to me a better solution will be to call the Custom Business Service directly and perform the initial query also in custom business service and save an extra query on BC (performed by vanilla SIA BC Utility Service).
Using SIA BC Utility Service BS would make sense if we could some how avoid this custom BS call and do our validation and set field value in workflow only. If we cannot avoid custom script then I don’t think there is any need to complicate things.
But I would like to get your input from you guys also, so I am putting this question out there to experts:
Do you concur with me that putting extra 4-5 lines of script (Querying and looping) will not have that much of an impact and might actually have less overhead.
Do you think otherwise and believe that approach mentioned in example is the right way to go?
What do you think ?
It makes sense to remove additional steps and do everything in Custom Script. (63%, 30 Votes)
The example is perfect and this is the way it should. (27%, 13 Votes)
I don't know what you are talking about. (10%, 5 Votes)
Total Voters: 48
Waiting for your responses and replies.