I'm facing a problem with a workflow that goes to the event queue, meanwhile the object is deleted and then the WF is released from the event queue in Error. The WF is based on the BO BUS2032 (sales order).
Here are the steps:
1-Sales order created or changed --> event generated --> WF linked to that event goes to event queue
2-Meanwhile the WF is the event queue waiting to be released, the sales order is deleted
3-The WF is released from the event queue but in ERROR status (this is because the BO instance does not exist anymore)
In this scenario, is there a way to end the WF with CANCELLED status instead of ERROR? is there anyy FM or exit you know ehere I can check if the BO still exists once the WF is released from the event queue?