WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,12 @@ protected void executeBoundaryEvents(List<BoundaryEvent> boundaryEvents, List<Ex

while (boundaryEventsIterator.hasNext() && boundaryEventExecutionsIterator.hasNext()) {
BoundaryEvent boundaryEvent = boundaryEventsIterator.next();
if (!(boundaryEvent.getBehavior() instanceof BoundaryEventRegistryEventActivityBehavior)) {
if (CollectionUtil.isEmpty(boundaryEvent.getEventDefinitions())
|| (boundaryEvent.getEventDefinitions().get(0) instanceof CompensateEventDefinition)) {
continue;
}
}
ExecutionEntity boundaryEventExecution = boundaryEventExecutionsIterator.next();
ActivityBehavior boundaryEventBehavior = ((ActivityBehavior) boundaryEvent.getBehavior());
LOGGER.debug("Executing boundary event activityBehavior {} with execution {}", boundaryEventBehavior.getClass(), boundaryEventExecution.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,11 @@ public void testCompensateNestedSubprocess() {

}

@Test
@Deployment
public void testTwoBoundaryEventAndFirstIsCompensation() {
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("compensateProcess");
assertThat(processInstance).isNotNull();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
xmlns:flowable="http://flowable.org/bpmn"
typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://www.flowable.org/processdef">

<process id="compensateProcess">

<startEvent id="start"/>
<sequenceFlow sourceRef="start" targetRef="user"/>
<userTask id="user"/>
<boundaryEvent id="compensate" attachedToRef="user">
<compensateEventDefinition />
</boundaryEvent>
<boundaryEvent id="error" attachedToRef="user">
<errorEventDefinition errorRef="myError"/>
</boundaryEvent>

<sequenceFlow sourceRef="user" targetRef="end"/>
<endEvent id="end"/>
</process>

</definitions>