java.util.EmptyStackException at ProcessDefinitionUtil.getBpmnModel

Hi Team,

During migration to Flowable v6 from Activiti v5 I have faced the following problem:

at java.util.Stack.peek(
at org.flowable.engine.impl.context.Context.getFlowable5CompatibilityHandler(
at org.flowable.engine.impl.util.Flowable5Util.getFlowable5CompatibilityHandler(
at org.flowable.engine.impl.util.ProcessDefinitionUtil.getBpmnModel(

Here is the link to the simple project with BpmnModelTest which reproduces the problem.

It happens on actual 6.1.0-SNAPSHOT version; if I use 6.0.1 release it works.
Could you please have a look?

Thank you

Hi Alexander.

Similar issue is: How can get the id of the next activity with the id of current activity?
6.1.0-SNAPSHOT requires to call getBpmnModel method inside a command.


Thanks Martin, it solved my problem.

Hi Alexander,

On the RepositoryService there’s also a getBpmnModel available. You should use that method instead of using the ProcessDefinitionUtil class, because that’s an internal class that can only be used inside a Command.

Best regards,


Hi Tijs, thanks it works fine in this way.