I’m trying to add a condition in a When rule so that execution is allowed only when the logic is triggered by a Queue Processor (for example, pyProcessSLA). I’ve already handled the condition for user actions based on access groups, and I now need help implementing the Queue Processor (background execution) check. Simply put, how do I detect when the processing is happening via a Queue Processor?
All Queue Processor processing happens under a background requestor, not a browser (user) requestor.
- Queue Processors run using a Background (BATCH) requestor
- User actions run under BROWSER requestors
- Services run under SERVICE requestors
Use this condition in the when rule:
@StringEquals(tools.getRequestor().getRequestorType(), “BATCH”)
Also, check if there is any out of the box when rule that does the same.
@String.equalsIgnoreCase(pxRequestor.pxReqType, “BATCH”)
I modified this and tried but its not helping me
I tried this and it worked!! Thanks for your quick help!
