Queue method to invoke an activity from another activity
Queue method to invoke an activity asynchronously, can be an alternate to SpinOff a flow. However few configurations are required with "Queue" which are not required with "SpinOff" in flows.
When using "Queue" to invoke an activity, the activity is invoked by the master agent in the context of "Batch" requestor's access group. So, the default context is setup using the access group "PRPC:Agents". In order to make the system locate the activity which is queued, either update this access group to access your application or update the requestor type "Batch" to have access to your application's access group.
Note: If there are multiple applications are hosted on the same Pega Instance, then changing the requestor type to access your application specific access group, might impact other applications, hence it’s not suggested in that setup.
As an alternate, use the method "Queue-For-Agent" to invoke an activity configured in Standard / Advanced agent where access control is handled in the custom Agent instance and not at the broader level.
Keep up to date on this post and subscribe to comments
- Activity method Queue vs Queue-For-Agent
- Use Queue Method to call an activity
- queue method in activities
- conditionally start parent agent (Allocator Advanced agent) only after all the allocated sub agents(standard agents) complete of their tasks using queue for agent method or activity in pega
- conditionally control execution of parent agent only after all the allocated sub agents using queue for agent method or activity complete of their tasks in pega