Some concerns on Pega Wait behavior

Some concerns on Pega Wait behavior, please correct me if my understanding is incorrect.

Below is from our practice.

Assume a flow includes 3 parts that run in sequence.

1st part: Part A,

2nd part, Wait Shape,

3rd part: Part B

  1. Part B will be run under different role with Part A, until next assignment in Part B reached

Part A may be run under a real operator role, but Part B will be run under SLA agent role

So, some actions in Part B, e.g. connect to out app via a API that need user token, will not work.

  1. Part B will be run under different context with Part A, until next assignment in Part B reached

e.g. if the Wait Shape waits a child case completed, then, some steps in Part B will be run under context of child case instead of current case context of Part A.

Do you think this is reasonable from Pega app developer (like me) view point?

Once I insert a Wait shape btw Part A & Part B, then Part B has to be changed as role/context change.

Above features of Pega like that Pega just design it in consideration of how Pega can easy to realize it, instead of how Pega app developer easy to understand and develop.

@MaxonL16591286

Yes, your understanding is mostly correct. In Pega, when a flow has a Wait shape, the steps after the Wait (Part B) are often processed by a background agent instead of the user, so if you have actions that need the user’s token (like calling an external API), they may fail. Also, if the Wait is waiting for a child case to finish, the next steps might run under the child case context, not the original one. This can cause confusion for developers because the role and context change silently after the Wait. So yes, from a developer’s view, it may feel like extra effort is needed just because a Wait shape was added. Pega could make this easier to understand or give warnings to avoid unexpected issues.