diff --git a/modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/ContinueProcessOperation.java b/modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/ContinueProcessOperation.java index 3be9e830b77..52473bfd92e 100644 --- a/modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/ContinueProcessOperation.java +++ b/modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/ContinueProcessOperation.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.stream.Collectors; import org.flowable.bpmn.model.Activity; import org.flowable.bpmn.model.BoundaryEvent; @@ -360,11 +361,8 @@ protected List createBoundaryEvents(List boundar // The parent execution becomes a scope, and a child execution is created for each of the boundary events for (BoundaryEvent boundaryEvent : boundaryEvents) { - if (!(boundaryEvent.getBehavior() instanceof BoundaryEventRegistryEventActivityBehavior)) { - if (CollectionUtil.isEmpty(boundaryEvent.getEventDefinitions()) - || (boundaryEvent.getEventDefinitions().get(0) instanceof CompensateEventDefinition)) { - continue; - } + if (!isExecutableBoundaryEvent(boundaryEvent)) { + continue; } // A Child execution of the current execution is created to represent the boundary event being active @@ -389,6 +387,7 @@ protected List createBoundaryEvents(List boundar protected void executeBoundaryEvents(List boundaryEvents, List boundaryEventExecutions) { if (!CollectionUtil.isEmpty(boundaryEventExecutions)) { + boundaryEvents = boundaryEvents.stream().filter(this::isExecutableBoundaryEvent).collect(Collectors.toList()); Iterator boundaryEventsIterator = boundaryEvents.iterator(); Iterator boundaryEventExecutionsIterator = boundaryEventExecutions.iterator(); @@ -401,4 +400,14 @@ protected void executeBoundaryEvents(List boundaryEvents, List