From 7bb194066f3332711cd71141f71b7d2953a5cd72 Mon Sep 17 00:00:00 2001 From: Joram Barrez Date: Tue, 3 Dec 2013 15:59:10 +0100 Subject: [PATCH] ACT-1869: Document signal event scope --- .../src/en/chapters/ch07b-BPMN-Constructs.xml | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/userguide/src/en/chapters/ch07b-BPMN-Constructs.xml b/userguide/src/en/chapters/ch07b-BPMN-Constructs.xml index 23040f8514..3fa9110400 100644 --- a/userguide/src/en/chapters/ch07b-BPMN-Constructs.xml +++ b/userguide/src/en/chapters/ch07b-BPMN-Constructs.xml @@ -291,6 +291,7 @@ RuntimeService.signalEventReceived(String signalName, String executionId);
Querying for Signal Event subscriptions + It is possible to query for all executions which have subscribed to a specific signal event: List<Execution> executions = runtimeService.createExecutionQuery() @@ -298,9 +299,31 @@ RuntimeService.signalEventReceived(String signalName, String executionId); .list(); We could then use the signalEventReceived(String signalName, String executionId) method - to deliver the signal to these executions. + to deliver the signal to these executions. +
+
+ Signal event scope + + By default, signals are broadcasted process engine wide. This means that you + can throw a signal event in a process instance, and other process instances with different process definitions + can react on the occurence of this event. + + + However, sometimes it is wanted to react to a signal event only within the same process instance. + A use case for example is a synchronization mechanism in the process instance, if two or more activities are + mutually exclusive. + + + To restrict the scope of the signal event, add the (non-BPMN 2.0 standard!) scope attribute + to the signal event definition: + +<signal id="alertSignal" name="alert" activiti:scope"processInstance"/> + The default value for this is attribute is "global". + +
+
Signal Event example(s) -- GitLab