Skip to content

Commit efd8797

Browse files
authored
Merge pull request #236 from ProcessMaker/bugfix/FOUR-27709
FOUR-27709: ABE does not work correctly when a parallel gateway is part of the flow
2 parents 7bb56c6 + f99c7b0 commit efd8797

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ProcessMaker/Nayra/Bpmn/Models/EventDefinitionBus.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public function registerCatchEvent(CatchEventInterface $catchEvent, EventDefinit
5252
if (!$match) {
5353
return;
5454
}
55+
$targetCatch = $sourceEventDefinition->getProperty('target_catch_event_id');
56+
if ($targetCatch && $catchEvent->getId() !== $targetCatch) {
57+
return;
58+
}
5559
if ($catchEvent instanceof StartEventInterface && $sourceEventDefinition->getDoNotTriggerStartEvents()) {
5660
return;
5761
}
@@ -60,6 +64,10 @@ public function registerCatchEvent(CatchEventInterface $catchEvent, EventDefinit
6064
} else {
6165
$instances = $this->getInstancesFor($catchEvent);
6266
foreach ($instances as $instance) {
67+
$targetInstance = $sourceEventDefinition->getProperty('target_instance_id');
68+
if ($targetInstance && $instance->getKey() !== $targetInstance) {
69+
continue;
70+
}
6371
$callable($eventDefinition, $instance, $token);
6472
}
6573
}

0 commit comments

Comments
 (0)