cancel
Showing results for 
Search instead for 
Did you mean: 

Throwing BPMNError does not end process instance properly

bcampeau1
Champ in-the-making
Champ in-the-making
Hello,

In one of our workflow, there is a task that can throw a Bpmn error for a business validation.  I have added a bounderyErrorEvent on the sub-process where it can occur.

When the Bpmn Error is thrown, the process is stopped as we want… but even if my BounderyErrorEvent is pointing to an End Event, the process instance is not ended properly. 


This call   List<HistoricProcessInstance> procHist = historyService.createHistoricProcessInstanceQuery().unfinished().list();

will return this process instance forever!

How can i end properly a process on a Bpmn error?

Regards
6 REPLIES 6

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Ben,

Could you create jUnit test?
https://forums.activiti.org/content/sticky-how-write-unit-test
as an example use :
org.activiti.examples.bpmn.event.error.BoundaryErrorEventTest

Regards
Martin

I have a unit test ready to be sent,  but i can't attach it here.

And the link to jira in the how-to-write-unit-test post is not working anymore!!

How can i send you the unit test?

OK nvm,  created a bug in activiti.atlassian.net

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Ben,

And the link to jira in the how-to-write-unit-test post is not working anymore!!
I checked it -> works fine for me.

How can i send you the unit test?
Fork the project https://github.com/Activiti/activiti-unit-test-template and add the link.

bug - https://activiti.atlassian.net/browse/ACT-4211
I am going to have a look on it.

Regards
Martin

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Ben,

issue resolved -> There was a problem in the process model.
https://activiti.atlassian.net/browse/ACT-4211?focusedCommentId=16700&page=com.atlassian.jira.plugin...

Regards
Martin

bcampeau1
Champ in-the-making
Champ in-the-making
OK thanks for taking time to check this.


Finally, i found a way to make my case works.

Thing is, when i added a sequence to the end event, i was having the error : already taking a transition!  My Bpmn error was occuring in a mutli-instance sub-process in async. 

I realized the sequencial property was set to false!!  by setting it to true, i got rid of the "already taking a transition" error and now my process is ending properly.

Thanks