Segregate irreversible business transactions

Hi community!

I am looking for a clean way to segregate irreversible business transactions in our case life cycle. In particular, I want to prevent the OOTB Pega case rollback mechanism from returning to a step before an irreversible transaction.

As an example, consider a fully automated account opening process, where (1) the account is being created in an external system and (2) the card for this account is being ordered through a 3rd party system. Both these transactions are irreversible and not idempotent, i.e. one cannot rerun the process without creating another account or ordering another card.

For some scenario, however, it happens that (due to some error) Pega’s rollback mechanism returns to the last step in the case life cycle where data has been commited to the data base. This can be any stage in the process, as early as KYC for instance.

Contrary to what most Pega devs I talked to (me included) have believed until now, there is no commit to the data base when a stage changes, let alone process or even sub-process transitions.

So, a common workaround to establish such a ‘checkpoint’ in the process has become to introduce a Wait step as an artificial assignment with the shortest waiting period possible. It works but is a poor representation of the business process in which no wait is required at all. It just has all the benefits: all data is commited without violating Pega’s principle of NOT introducing explicit commits since this can and most likely will interfere with the process engine.

Now, one could say let’s hand this over to a background process by using a queue processor to perform the account opening or card order as an immediate assignment in a parallel process. The overall process, however, would have to wait for the assignment to be completed in order to continue, since the account number would be a prerequisite for ordering the card. So we’re not actuallly talking parallell processing as such.

I have tried blueprinting this generic example in the latest Pega version and tasked the AI assistant to solve the puzzle. It suggested performing the assignment ‘automatically’ which is not of great help, unfortunately since there is no such functionality. Instead, this would eventually lead us to the queue processor approach mentioned earlier.

I am curious how you are handling such a universal requirement in your processes, any response and idea is highly appreciated :grinning_face: