The new Oracle BPM 12c SKIP / BACK feature has some interesting facets that are not commonly known. This describes what it can be used for as well as three cautions to be aware of when using it.
Use Cases for SKIP / BACK
The new Oracle BPM 12c SKIP / BACK feature greatly assists exception handling in a processes. Although Oracle BPM 11g was able to catch exceptions in processes, once caught in an error event subprocess the only option was then to exit the process. Oracle BPM 12c’s SKIP / BACK gives us some essential functionality we have needed in the product. It not only catches exceptions thrown in a process in an Error event subprocess, but now you are able to:
- Set the “action” predefined variable to either “skip” or “back” to send the instance back to the point in the process where the exception occurred (“back”) or to send the instance back to the activity after where the exception occurred (“skip”).
- What is not commonly known is that after the exception is thrown and when the instance is in the event subprocess, variable information can be set in the event subprocess. When the instance is returned to the process, the process payload’s information is changed as well.
To download an Oracle BPM 12c project that demonstrates this new capability click here. Oracle ACE Associate Antonis Antoniou has written an excellent blog post that takes you through the steps needed to create a project with SKIP / BACK: “Oracle BPM 12c Advanced Error Handling and Recovery - Part 1”.
Three Cautions When Using SKIP / BACK
SKIP / BACK is a powerful new feature, but there are three things you need to be aware of when using it.
- As Antonis mentions in his blog, be very careful when using the BACK action. If the original problem has not been corrected that caused the exception to occur in the main process, an infinite loop can easily occur between the work item instance in the process main process and the event subprocess.
- Because this feature is similar to a feature in Oracle BPM 10g, there is a misunderstanding about its capability in 12c. SKIP / BACK can only be used in processes that have an event subprocess that begins with a Start Error event. Do not attempt to use this feature with processes that have an event subprocess that begins with a Start Message event. If the Start Message event is non-interrupting, the SKIP or BACK simply has no effect and the work item instance will behave as if it had not been set.
In the case where the Message Start event is interrupting, just like the non-interrupting case – the SKIP or BACK simply has no effect and the work item instance will behave as if it had not been set. The instance will be interrupted from the main process and will continue only in the Start Message event subprocess.
- Do not place event subprocesses with Error Start events in the same process that also has an event subprocesses with a Message Start event. As shown in the anti-pattern below, after an exception occurs (1 below), if a SKIP or BACK is thrown from the Error event subprocess, instead of being returned to the main process the instance is instead incorrectly sent to the event subprocess with the Message Start event (2 below).
The new Oracle BPM 12c SKIP / BACK exception handling is an essential new feature. We all just need to be aware of the cautions listed here before using it on a project.
Join the Conversation
Hello, how do catch system errors? For example, BindingFault, RemoteFault,etc.
I used catch all system exceptions option, but the event subprocess never start..
The only way I know of to catch these types of exceptions is to use a policy like you would with a BPEL process.
Hope this helps,