Is there any way to execute a single Service-REST synchronous and asynchronously based on a condition?
My requirement is if its a Consumer A execute synchonous and if its Consumer B execute asynchronously. The reason behind this is Consumer A send a request to create a single case and consumer B sends a request to create around
1. Make the decision before reaching pega service test. Creating two Service rules in Pega one sync and on async. You make the decision on the client side if possible.
2. Make the decision in the service activity if the condition is pega specific. You configure the service rest as async but you can call API to queue requests within the service activity based on your logic.
Depends on business use case, how the external system is looking for the response from pega for customer B. if they are looking for the all case#'s then user has to wait for some time ,as it takes significant time to create multiple cases and respond back to the user (customerB). if they looking for the reference# behalf of the request then we can respond back to them by sending queue item id, but later they can request for the data based on reference #(QueueID).
how can we return the queue item id when we queue to the Standard Agent ?
>> After execution of Queue-For-Agent method , pyItemID value getting populated on queue page.
he Standard Agent process the item it will remove the queue item from the data base.
>> To keep the queue records upon success execution ,just set .pyRetainOnSuccess='true' on queue page before Queuing the record.