Process level Exception Handling in BPM12c

With the release of BPM12c, it is possible to handle process level transactions with more controlled user actions. In BPM11.1.1.7, event subprocess was used to catch all business and system exceptions but the transaction can't be resumed back to the activity where it failed or skip the failed activity in BPM flow and proceed further. This was a major feature in BPM10gR3 where using Process Exceptions, we have more control over BPM instances.
Post release of BPM12c, when an exception occurs while running a process flow we can choose to retry running the flow object that caused that process flow or to move the process instance to the next flow object in the main process flow.
We can define this by setting a specific value to the predefined variable 'action'. 
The available values for the action predefined variable are:

1. BACK
If the exception is caught and we want to retry the failed activity in BPM process flow, we can use back value in Script task to achieve the same. 
To assign this value to the action predefined variable use the string ”back”. 


2. SKIP
In order to move the instance to next activity if an exception occurs, we can use skip value in Script task.
To assign this value to the action predefined variable use the string ”skip”.

Retry Failed BPM instance

Following are the steps to configure and use Event sub-process to retry failed BPM instances: 

1.  Define one BPM process with set of activites - Human Task, Service Task, etc. Also, define business exceptions named - RetryException, under Business Catalog component in BPM project structure.
2. Drag Event Sub-process to the BPM process.
3. Right click on start activity and navigate to 'Implementation' tab.
4. Select 'Implementation type' as 'Error' and check 'Recoverable error' checkbox.
5. Select 'Type' as 'RetryException'.
6. In Data Assocation tab, map 'errorInfo' with process data object defined to hold exception details.
7. Add a script task in the same event subprocess.
8. Open Implementation tab of Script task and add the below data mapping.
action="back";
9. Deploy and test the BPM application.
10. Once the event sub-process catches the exception,  Step(8) will retry and move back BPM instance to the activity where it failed.

Skip Failed BPM instance 

Following are the steps to configure and use Event sub-process to skip the activity where BPM instance failed and move it to next activity: 

1. Define one BPM process with set of activites - Human Task, Service Task, etc. Also, define business exceptions named - SkipException, under Business Catalog component in BPM project structure.
2. Drag Event Sub-process to the BPM process.
3. Right click on start activity and navigate to 'Implementation' tab.
4. Select 'Implementation type' as 'Error' and check 'Recoverable error' checkbox.
5. Select 'Type' as 'SkipException'.
6. In Data Assocation tab, map 'errorInfo' with process data object defined to hold exception details.
7. Add a script task in the same event subprocess.
8. Open Implementation tab of Script task and add the below data mapping.
action="skip";
9. Deploy and test the BPM application.
10. Once the event sub-process catches the exception,  Step(8) will skip the current activity where BPM instance failed and move to the next activity defined the process flow.
This is my first blog to cover process level exception handling in BPM12c. I will add more blogs to cover new features in BPM12c which were part of BPM10gR3. Hoping that this post will be useful to Oracle BPM developers.

I have developed one Proof of Concept for the Exception handling and it can be found here.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Abhishek Mittal

Search

Categories
Archives
« March 2015
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today