how to find out if a process threw error event
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2012 01:20 PM
Hi,
I have a subprocss with error boundary event. In the event when a BPMNError is thrown, error boundary event is activated and the subprocess is cancelled.
Is there a quick way (direct API) to find out if process went through happy path (no error event) vs the case when an error event was thrown?
Thanks,
I have a subprocss with error boundary event. In the event when a BPMNError is thrown, error boundary event is activated and the subprocess is cancelled.
Is there a quick way (direct API) to find out if process went through happy path (no error event) vs the case when an error event was thrown?
Thanks,
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2012 06:34 AM
You could leverage the history for this, I can think of two approaches:
- Use a different end-event for your process in happy-path and stuff-hit-the-fan-path. You can use minimal history level to inspect "endActivity" on the historicProcessinstance.
- Set history level high enough to have HistoricActivities available… You should inspect all the activities for the process-instance to see if the error-related stuff is in there.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2012 08:38 PM
Thanks frederikheremans.
As always, very useful reply.
I thought there might be quicker/direct way to do this. Neverthless, your solution is good.
As always, very useful reply.
I thought there might be quicker/direct way to do this. Neverthless, your solution is good.
You could leverage the history for this, I can think of two approaches:
- Use a different end-event for your process in happy-path and stuff-hit-the-fan-path. You can use minimal history level to inspect "endActivity" on the historicProcessinstance.
- Set history level high enough to have HistoricActivities available… You should inspect all the activities for the process-instance to see if the error-related stuff is in there.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2012 06:57 PM
Hi frederikheremans,
I am trying your suggested approach (1st). I have two different end events.
In my test class:
public class Test extends PluggableActivitiTestCase {
// start process
// wait to be complete
List<HistoricProcessInstance> processHistory = historyService.createHistoricProcessInstanceQuery().processInstanceId(pid).list();
for (HistoricProcessInstance history : processHistory ) {
System.out.println("history" + history.getEndActivityId());
}
}
In the above test case, I am always getting end activiti id as null.
Is it because I am running unit test? When is endActivity set?
Thanks,
pdt
I am trying your suggested approach (1st). I have two different end events.
In my test class:
public class Test extends PluggableActivitiTestCase {
// start process
// wait to be complete
List<HistoricProcessInstance> processHistory = historyService.createHistoricProcessInstanceQuery().processInstanceId(pid).list();
for (HistoricProcessInstance history : processHistory ) {
System.out.println("history" + history.getEndActivityId());
}
}
In the above test case, I am always getting end activiti id as null.
Is it because I am running unit test? When is endActivity set?
Thanks,
pdt
Thanks frederikheremans.
As always, very useful reply.
I thought there might be quicker/direct way to do this. Neverthless, your solution is good.You could leverage the history for this, I can think of two approaches:
- Use a different end-event for your process in happy-path and stuff-hit-the-fan-path. You can use minimal history level to inspect "endActivity" on the historicProcessinstance.
- Set history level high enough to have HistoricActivities available… You should inspect all the activities for the process-instance to see if the error-related stuff is in there.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2012 07:11 PM
Please ignore my previous reply.
I needed to set cancelActivity="true" on the error boundary event.
pdt
I needed to set cancelActivity="true" on the error boundary event.
pdt
