How to abort a transaction from BPM based on condition

I am trying to Abort a transaction from BPM. The internal customer would like to abort an Job Adjustment transaction based on a condition. When the user click the Adjustment button, the Method “Erp.JobAdjustment” is called. The Raise Exception would only abort the BPM but not the current method.

Based on a BPM DataForm, the user will clicks yes/no and BPM will raising an exception, this works ok. The Terminate on Error is checked. But this does not abort the JobAdjustment method being called.

Are you using a pre- or post-processing BPM? Raise Exception should stop the method from being called if you’re using a pre-processing BPM.

I am using pre-processing, BO: JobAdjustment, Method: PreCommitSubcontractAdj

Its not. I tried rising the exception after the START block without any condition in between and it still would not abort the method.

So, technically the Raise Exception is stopping the PreCommitSubcontractAdj, but after that is stopped, the actual CommitSubcontractAdj is called and runs.

You will need to put the BPM on CommitSubcontractAdj to stop that method from running.

1 Like

Fantabulous it worked. Thank you.