Am creating a test process flow where in I place a intermediate signal catch event and then a user task and using a springboot application am trying to send a signal event back to the process so that once the signal is caught the user task is created, but the logic for signal send in java works correctly and the executions is picked out correctly but the process flow does not move forward. Any reasons, the signal subscription is on the process instance level and created on the process and inherited by the signal catch event.
sample Springboot rest controller code -
@PostMapping(“/signal/{piid}/{signalCode}”)
public void sendSignal(@PathVariable String piid,@PathVariable String signalCode){
Execution execution = runtimeService.createExecutionQuery().processInstanceId(piid).signalEventSubscriptionName(signalCode).singleResult();
runtimeService.signalEventReceived(signalCode,execution.getId());
}
thanks,
Vivek
Hi @vivekananth.t
If you change the signal scope from “Process Instance” to “Global” it will work.
Regards,
Simon
thanks Simon, but am guessing make the scope global will mean that other process instances will also receive the notification, i want to limit to either one or many process instances based on business key query, is there any way to achieve this?
No, if you send the signal event as you have written in your initial post, then only the process instance with id = piid will catch your signal event.
Execution execution = runtimeService.createExecutionQuery().processInstanceId(piid).signalEventSubscriptionName(signalCode).singleResult();
runtimeService.signalEventReceived(signalCode,execution.getId());
Regards,
Simon
Ok thanks Simon will definitely try this out.

Hi team, i am trying to use signal logic my process . but my signal event not working my spring boot application . Let me know , if will need to configuration any setting in signal event . how do identify the signal working or not in the table level or log level . i am using 7.0.0.M1 version
i am struck with this issue last one week . but i am not able find any solution . because when i was going to check signal name in runtime service it return 0 count only
List executions = runtimeService.createExecutionQuery()
.signalEventSubscriptionName(“TASK_DONE(CREDIT_CHECK)”)
.list();
Send signal from code:
runtimeService.signalEventReceived(“TASK_DONE(CREDIT_CHECK)”);
Process BPMN file:
<?xml version="1.0" encoding="UTF-8"?>
<signal id="signalCreditCheck" name="TASK_DONE(CREDIT_CHECK)" />
<process id="Process1" name="The Process">
<startEvent id="theStart"/>
<sequenceFlow id="flow0" sourceRef="theStart" targetRef="subProcess"/>
<subProcess id="subProcess">
<startEvent id="theStartSubProcess" >
</startEvent>
<sequenceFlow id="sequence_fork_flow" sourceRef="theStartSubProcess" targetRef="service_fork"/>
<parallelGateway id="service_fork" />
<sequenceFlow id="sequence_all_task_flow" sourceRef="service_fork" targetRef="allTasks"/>
<serviceTask id="allTasks"
name="Evaluate Required Tasks ( ALL )"
flowable:delegateExpression="${requiredTaskAll}"/>
<!-- TASK_APPLICABLE(CREDIT_CHECK) -->
<sequenceFlow id="sequence_credit_check_excluse_flow" sourceRef="allTasks" targetRef="credit_check_yes_or_no_exclusive">
<extensionElements>
<flowable:executionListener event="end" delegateExpression="${stageStartListener}"/>
</extensionElements>
</sequenceFlow>
<exclusiveGateway id="credit_check_yes_or_no_exclusive"></exclusiveGateway>
<sequenceFlow id="sequence_credit_check_no_flow" sourceRef="credit_check_yes_or_no_exclusive" targetRef="theEndCreditCheckNo">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${isCreditCheck == 'N'}]]></conditionExpression>
</sequenceFlow>
<endEvent id="theEndCreditCheckNo"/>
<sequenceFlow id="sequence_credit_check_yes_flow" sourceRef="credit_check_yes_or_no_exclusive" targetRef="credit_check_deal_approval_fork">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${isCreditCheck == 'Y'}]]></conditionExpression>
</sequenceFlow>
<parallelGateway id="credit_check_deal_approval_fork" />
<sequenceFlow id="sequence_credit_check_signal" sourceRef="catchSignalCreditCheck" targetRef="credit_check_deal_approval_fork">
</sequenceFlow>
<intermediateCatchEvent id="catchSignalCreditCheck" name="TASK_DONE(CREDIT_CHECK)">
<!-- signal event definition -->
<extensionElements>
<flowable:executionListener event="start" delegateExpression="${startSignal}"></flowable:executionListener>
</extensionElements>
<signalEventDefinition signalRef="signalCreditCheck"/>
</intermediateCatchEvent>
<sequenceFlow id="sequence_credit_check_flow" sourceRef="credit_check_deal_approval_fork" targetRef="CREDIT_CHECK"/>
<userTask id="CREDIT_CHECK" name="TASK_APPLICABLE(CREDIT_CHECK)">
<extensionElements>
<flowable:taskListener event="create" delegateExpression="${taskCreateListener}"></flowable:taskListener>
<flowable:taskListener event="complete" delegateExpression="${taskCompleteListener}"></flowable:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="sequence_credit_check_end" sourceRef="CREDIT_CHECK" targetRef="theEndCreditCheckYes"/>
<endEvent id="theEndCreditCheckYes"/>
</subProcess>
</process>