Signal specific execution after Event-based Gateway
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2015 04:25 AM
Hi all,
I need to implement something similar to the following example reported in the Activiti user guide:
http://www.activiti.org/userguide/#eventBasedGatewayExample
I could have several processes waiting for a signal, but what I need is send a signal only to a specific execution.
I tried to use this statement
but I got this exception
I need to implement something similar to the following example reported in the Activiti user guide:
http://www.activiti.org/userguide/#eventBasedGatewayExample
I could have several processes waiting for a signal, but what I need is send a signal only to a specific execution.
I tried to use this statement
runtimeService.signalEventReceived("alert", executionId);
but I got this exception
org.activiti.engine.ActivitiException: Execution '12501' has not subscribed to a signal event with name 'alert'.
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2015 06:09 AM
I have omitted that I need send a signal starting from a processInstanceId.
So I've solved in this way:
<java>Execution execution = runtimeService.createExecutionQuery()
.signalEventSubscriptionName("alert")
.processInstanceId(processInstanceId)
.singleResult();
runtimeService.signalEventReceived("alert", execution.getId());</java>
So I've solved in this way:
<java>Execution execution = runtimeService.createExecutionQuery()
.signalEventSubscriptionName("alert")
.processInstanceId(processInstanceId)
.singleResult();
runtimeService.signalEventReceived("alert", execution.getId());</java>
