Batch processing is integral part of any development and is must in cases involving escalations,auto-assignments or bulk emailing. Siebel provides multiple ways to do batch processing but one to choose depends on the requirment at hand. Lets consider an escalation scenario which involves SR reassignment to Manager when commit time is reached if it is not closed. The two possible approaches to achieve this are:
1 - Workflow Policies with Batch Mode set to True
2 -Workflow Process Batch Manager component
It can be real dilemma which one to use as they say "you always have choice of selecting action but not the consequence". Both approaches have its own advantages. Lets discuss each of them.
Workflow Policy with Batch Mode
1 - Create a Workflow Policy as following based on "Service Request" object with condition
Status <> Closed
Commit time >= Current
Set the batch mode to True. Specify the action which will run the workflow to reassign SR.
2 - We need to schedule a task on server to execute a batch file or script which executes server manager command lines to execute workmon to run in batch
mode.
Workflow Process Batch Manager
1- Create a Repeating Job for component WorkflowProcess Batch Manager.
2 - Set the SearSpec parameter to "[Status] <> Closed AND [Commit Time] >= Today()"
3 - Set the Workflow Process name to the desired workflow which is used to reassign SR
Technically either of them could be used to perform the desired escalation but me inherently being an follower of KISS(Keep it Short and Simple) principle will go for second option as it is easy to manage Workflow Process batch manager Job as compared to the batch Policies. However, if we have to execute a sequence of action apart from run process then batch workflow policies should be considered. Batch workflow policies are also quite handy in sending consolidated email for multiple requests.
Please feel free to put your thoughts across which one should be used for the cause.
1 comment:
Precisely!! KISS works for me as well ;). For the above given example second option should be the preferred one, simply because of the lesser maintenance.
One case where Batch Policy wins over Repetitive Batch Manager is consolidation. Going through the bookshelf one can find how Batch Policy can be used to consolidate emails and send them at once. Essentially a call center head can avoid 100 emails everyday for order approval and can have one email with all order details. Remember for a call center rep spamming is a big problem his life runs on emails. So we should avoid every insignificant emails.
And for Workflow Batch Manager, It's the Mr Quick Fix for production goofups, Fresh implementation data fixing. I have come across a no. of scenarios where initial data loaded is messed up e.g. Accounts dont have the last activity dates, predefaults are not there for new columns etc etc or Some code is failing in production which fails to update certain fields. Now as workflows can be imported and Client side BS are handy. We can assure the data to be there at least the next day for the time being(e.g. using a search spec of updated yesterday). Some times next release can be 6 months ahead, this can really safe the face.
And the big one performance. Batch Manager would win this by margins. Remember Batch Manager is separate component it does not invoke Workflow Process Manager tasks it runs the workflow on its own that too on multiple threads. So if one is expecting large volumes say 100k everyday I believe batch manager should be the choice.
Post a Comment