flowable / flowable/flowable-engine

Signal expression not working in event subprocess start signal event

Open
#2,905 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
7h 8m
Merged PRs (30d)
2

Description

I am trying to use a signal expression referencing a variable from the parent process in the start event element of an event subprocess but it fails since the line of code below passes null instead of the parent execution context:

[ProcessInstanceHelper, line 382](https://github.com/flowable/flowable-engine/blob/d7e726a3845709552f01f4d09cf06ee1f8faeeae/modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/ProcessInstanceHelper.java#L382)

```
diff --git a/modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/ProcessInstanceHelper.java b/modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/ProcessInstanceHelper.java
index f00caa7f39..862febb833 100644
--- a/modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/ProcessInstanceHelper.java
+++ b/modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/ProcessInstanceHelper.java
@@ -379,7 +379,7 @@ public class ProcessInstanceHelper {
signalExecution.setEventScope(true);
signalExecution.setActive(false);

- String eventName = EventDefinitionExpressionUtil.determineSignalName(commandContext, signalEventDefinition, bpmnModel, null);
+ String eventName = EventDefinitionExpressionUtil.determineSignalName(commandContext, signalEventDefinition, bpmnModel, parentExecution);

EventSubscriptionEntity eventSubscription = (EventSubscriptionEntity) processEngineConfiguration.getEventSubscriptionServiceConfiguration()
.getEventSubscriptionService().createEventSubscriptionBuilder()

```

When I changed it to pass the parentExecution as the last parameter everything works as expected. Is there a reason for it to be null?

This change is similar to the code for message start event in the method right above this method.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.