Signal Event not working when we are trying to catch using delegateExpression

Hi team , i am facing some problem in signal logic . i have tried below steps . but signal not working .
Kindly guide me what i have done in wrong in this bpmn file

  1. create the subprocess and call service task
  2. The service has send signal using method " runtimeService.signalEventReceived(signal.getEventKey(), variables);"
  3. The same signal catch the next level using delegateExpression . but that one not working

BPMN File :

<?xml version="1.0" encoding="UTF-8"?>

<signal id="signalCreditCheck" name="TASK_DONE(CREDIT_CHECK)" />


<process id="OrderServiceProcess" name="The Order Task Service 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}"/>
        <sequenceFlow id="sequence_all_document_flow" sourceRef="allTasks" targetRef="allDocuments"/>
        <serviceTask id="allDocuments"
                     name="Evaluate Required Documents ( ALL )"
                     flowable:delegateExpression="${requiredDocumentAll}"
        />


        <!-- TASK_APPLICABLE(CREDIT_CHECK) -->
        <intermediateCatchEvent id="catchSignalCreditCheck" name="TASK_DONE(CREDIT_CHECK)">
            <!-- signal event definition -->
            <signalEventDefinition signalRef="signalCreditCheck"
                                   flowable:delegateExpression="${startSignal}"/>
        </intermediateCatchEvent>
        <sequenceFlow id="sequence_credit_check_excluse_flow" sourceRef="catchSignalCreditCheck" targetRef="credit_check_yes_or_no_exclusive"/>
        <!-- <sequenceFlow id="sequence_credit_check_excluse_flow" sourceRef="allDocuments" targetRef="credit_check_yes_or_no_exclusive"/> -->
        <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"/>
        
    </subProcess>
</process>

Hey @poongunran,

It is not working for you because you are sending a global signal. You need to use runtimeService.signalEventReceived(signal.getEventKey(), executionId, variables) to send the signal to the execution with the id executionId.

Cheers,
Filip

@filiphr : Thanks for the input . it’s work fine now .

Hi @filiphr : i am facing one more problem . The error is " was updated by another transaction concurrently"

<?xml version="1.0" encoding="UTF-8"?> PT40S PT2S

Actually , i have process this BPMN file 5 times with different input variables . i got this error in “billing_timer” section

Hey @poongunran,

I think it would be better if you create a different post for your other problem. The error you are getting is a normal behavior when you have things running in parallel and trying to change the same thing from different transactions. You need to make sure that you are modeling this properly.

Cheers,
Filip