Ending a process

Sometimes, in loops, we might want to immediately end a business process before it has finished. BPEL provides the <exit> activity to immediately terminate a process instance that is executing. Often, we use <exit> in conditional branches, where we need to exit a process when certain conditions are not met.

The <exit> activity ends the current business process instance and no fault and compensation handling is performed.

The syntax is very simple and is shown as follows:

<exit/>

Get WS-BPEL 2.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.