Posted: 24 Apr 2017 14:16 EDT Last activity: 9 May 2017 11:16 EDT
Agents parallel processing
Hi Team, We have a requirement to enable one standard agent on multiple nodes to achieve parallel run and improve performance for case creation and also we have a requirement to make the process sequential if updates are for same case, that needs to be processed sequential in the order we received. Currently we are running agent in only one node which is causing the delay in case creation. Any suggestions to handle this without much of customization to the existing code.
Hiw many nodes are there in your application? As it is standard agent hence you should be able to go to each node in SMA and enable the same agent. Then this agent will run in more than one nodes parallelly and improve performance. For same case, the processing will be sequential because of the mechanism standard agents follow. Standard agent does not start executing the activity right away. Rather it first looks for an item in the queue, once an item(The Case) is found in queue, it will own the lock and start processing. Hence I believe, for your application also, one case will be queued once only for the same agent. Hence the same agent will not try to process the same case twice. If, there are two different agents, trying to access the same case, then definitely the second agent will fail to get the lock of the case as it is locked by another agent and it will go back to the queue.
External system will send request to create the WO. there would be a case where we would get some updates from external system before the WO gets created. So first agent should process the WO creation and then the update request.
I am thinking about the case where the agent on node1 picks the request to create WO and agent on node2 picks the request to process the update request. I am worried what if the node2 agents performs faster then node1 agent which is still in the process of creating the WO.
As per your explanation about the situation, what i understood is, once you get the request from the External system ,it will queue for the particular agent, and agent will pick the request from queue and create the Work object.
if my understanding is correct, you can inculde the update of request after work object creation, then whole process done by one particular agent for one request.Then node2 agent can pick the another request from queue for next work object creation.
I do not think the item will be queued before the Work Object is created. Then what the agent will queue and why standard agent is required. I rather think first one agent will create the Work Object and queue that for another agent to be updated.
correct me if I am wrong. But if my understanding is correct, then also the approach I provided should work. Firstly while creating the object there will not be a chance of conflict and while updating, different queue items will be picked up by different agents.
Is maintaining the order is required? Order might not be maintained. But, you are queuing the same work object you created. Hence each of them will be updated according to the order they have been queued. If any of the item is failed, then it can again be sent back to the queue for reprocess. In Queue-For-Agent method of the activity make sure to specify the maxAttempts parameter. The agent will try the same item for those many times before sending it to the Broken Queue Item List.