cancel
Showing results for 
Search instead for 
Did you mean: 

signalEventReceived not working during debugging

apavlenk0
Champ in-the-making
Champ in-the-making
Hi,
I was faced with strange issue.
I use intermediateCatchEvent and try to test it


String processInstanceId = runtimeService.createExecutionQuery()
                .processInstanceBusinessKey("businessKey").singleResult().getProcessInstanceId();

Execution execution = workflowRuntimeService.createExecutionQuery()
                .processInstanceId(processInstanceId)
                .signalEventSubscriptionName("subscriptionName")
                .singleResult();

runtimeService.signalEventReceived("subscriptionName", execution.getId());


this code works but if I stop execution (using debugger) and then start it again signal wouldn't work.

How does signalEventReceived method works? Is there any restriction for using it?
3 REPLIES 3

trademak
Star Contributor
Star Contributor
What do you mean with "signal wouldn't work". What happens?
Could you include your process definition?

Best regards,

apavlenk0
Champ in-the-making
Champ in-the-making
Hi, thank you for your reply

I cannot include all process definition, here is part with signal

<code>
<definitions id="definitions"
             targetNamespace="http://activiti.org/bpmn20"
             xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:activiti="http://activiti.org/bpmn">

    <signal id="signal" name="subscriptionName" />

    <process id="process1" name="process1">


        <serviceTask id="st1" name="st1" activiti:expression="#{…}" />
        <sequenceFlow sourceRef="st1" targetRef="signal1"/>

        <intermediateCatchEvent id="signal1">
            <signalEventDefinition signalRef="signal" />
        </intermediateCatchEvent>
        <sequenceFlow sourceRef="signal1" targetRef="st2"/>

        <serviceTask id="st2" name="st2" activiti:expression="#{…}" />
        <sequenceFlow sourceRef="st2" targetRef="finished" />

        <endEvent id="finished"/>
    </process>

</definitions>
</code>

When I say "signal wouldn't work" I mean that serviceTask (id="st2") wouldn't executed

apavlenk0
Champ in-the-making
Champ in-the-making
Question is no longer relevant,
found problem in

<code>
<serviceTask id="st2" name="st2" activiti:expression="#{…}" />
</code>

method that was called in activiti:expression contained an error.