questions regarding processing of System-Queue-DefaultEntry
Let's say I created a System-Queue-DefaultEntry item for a work object using method "Queue-For-Agent". An agent of mode "Standard" is specified to handle the queue item.
In the agent activity, work object is updated using "Property-Set".
Question 1, will "Standard" mode agent queue functionality automatically save the work object? Or do I have to explicitly use "Obj-Save" in agent activity in order to save the updated WO?
"Standard" mode agent queue functionality handles transactional processing automatically such as getting lock on WO, Commit/Rollback, release lock. If Commit fails, rollback will executed, I believe.
Question 2, if Rollback is executed by agent queue functionality, will the agent queue functionality retry processing of the queue item automatically (assuming MaxAttempts has not been reached) until MaxAttempts is reached?
Question 3, if certain error condition is noticed/met in agent activity, how to tell the "agent queue functionality" so that it will do one of the following:
a) mark the queue item as broken, do not retry
b) keep retrying until MaxAttempts is reached, and then mark the queue item as broken
1. Yes, if you want changes to be persisted you would need to do an obj-save (deffered).
2. That would be my anticipation.
3. To implement the requirement mentioned I would suspect you have the trap the exception in the activity and then based on conditional logic modify pyAttempts or myMaxAttempts on the associated queue record.
Question #2 - no if the Standard Agent needs to do a rollback, it will move the item into Broken-Process.
Question #3 - I'd need to do some research, but my understanding is that most errors result in a Broken-Process queue item. Retry is something that happens if the EstablishContext activity is unable to establish that context. The SLA agent for instance manages that such that if it can't get the lock, it retries every 15 minutes until it gets it.