JBoss Community

Re: signal event doesn't work from REST API

created by Rudi Fisher in jBPM - View the full discussion

Thank you Tihomir and Maciej, now it works work me. Correct solution was to take the latest version od designer (http://people.redhat.com/tsurdilo/designer/master)

 

Tihomir, I was already using designer from this master repository but my version was from 13.1.2012 (from maven pom) and after your post I saw there is a new version from 27.1.2012. I took it and start my tests from zero (new deployment of process from eclipse to guvnor repo) and after retest everything is working. It seems this last version fix some problem about signals as you wrote (at least in BPMN export I see differences in value of element signalRef). Thanks.

 

Maciej, after retest all forms of calling signal is working from Eclipse and also at server (from CommandDelegate class):

ksession.getProcessInstance(new Long(executionId)).signalEvent("Yes", "YesValue");

ksession.signalEvent("Yes", "YesValue", new Long(executionId));

ksession.signalEvent("Yes", "YesValue");

 

I'm attaching current BPMN export of correct process from designer, maybe this helps someone.

 

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

<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.omg.org/bpmn20" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" id="_MVI7QUp0EeGJ6vd3uFYRmQ" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" expressionLanguage="http://www.mvel.org/2.0" targetNamespace="http://www.omg.org/bpmn20" typeLanguage="http://www.java.com/javaTypes">

  <bpmn2:itemDefinition id="_xItem"/>

  <bpmn2:process id="com.sample.test" drools:packageName="demo" name="Test" isExecutable="true">

    <bpmn2:property id="x" itemSubjectRef="_xItem"/>

    <bpmn2:startEvent id="_1" name="Start">

      <bpmn2:outgoing>_1-_11</bpmn2:outgoing>

    </bpmn2:startEvent>

    <bpmn2:eventBasedGateway id="_2" name="Split" gatewayDirection="Diverging">

      <bpmn2:incoming>_11-_2</bpmn2:incoming>

      <bpmn2:outgoing>_2-_3</bpmn2:outgoing>

      <bpmn2:outgoing>_2-_4</bpmn2:outgoing>

    </bpmn2:eventBasedGateway>

    <bpmn2:intermediateCatchEvent id="_3" drools:boundaryca="false" name="event">

      <bpmn2:incoming>_2-_3</bpmn2:incoming>

      <bpmn2:outgoing>_3-_9</bpmn2:outgoing>

      <bpmn2:dataOutput id="_3_event" name="event"/>

      <bpmn2:dataOutputAssociation id="_MVI7Q0p0EeGJ6vd3uFYRmQ">

        <bpmn2:sourceRef>_3_event</bpmn2:sourceRef>

        <bpmn2:targetRef>x</bpmn2:targetRef>

      </bpmn2:dataOutputAssociation>

      <bpmn2:outputSet id="_MVI7Qkp0EeGJ6vd3uFYRmQ">

        <bpmn2:dataOutputRefs>_3_event</bpmn2:dataOutputRefs>

      </bpmn2:outputSet>

      <bpmn2:signalEventDefinition id="_MVI7REp0EeGJ6vd3uFYRmQ" signalRef="Yes"/>

    </bpmn2:intermediateCatchEvent>

    <bpmn2:intermediateCatchEvent id="_4" drools:boundaryca="false" name="event">

      <bpmn2:incoming>_2-_4</bpmn2:incoming>

      <bpmn2:outgoing>_4-_10</bpmn2:outgoing>

      <bpmn2:dataOutput id="_4_event" name="event"/>

      <bpmn2:dataOutputAssociation id="_MVI7Rkp0EeGJ6vd3uFYRmQ">

        <bpmn2:sourceRef>_4_event</bpmn2:sourceRef>

        <bpmn2:targetRef>x</bpmn2:targetRef>

      </bpmn2:dataOutputAssociation>

      <bpmn2:outputSet id="_MVI7RUp0EeGJ6vd3uFYRmQ">

        <bpmn2:dataOutputRefs>_4_event</bpmn2:dataOutputRefs>

      </bpmn2:outputSet>

      <bpmn2:signalEventDefinition id="_MVI7R0p0EeGJ6vd3uFYRmQ" signalRef="No"/>

    </bpmn2:intermediateCatchEvent>

    <bpmn2:exclusiveGateway id="_5" drools:dg="" name="Join" gatewayDirection="Converging">

      <bpmn2:incoming>_10-_5</bpmn2:incoming>

      <bpmn2:incoming>_9-_5</bpmn2:incoming>

      <bpmn2:outgoing>_5-_6</bpmn2:outgoing>

    </bpmn2:exclusiveGateway>

    <bpmn2:scriptTask id="_6" name="Script" scriptFormat="http://www.java.com/java">

      <bpmn2:incoming>_5-_6</bpmn2:incoming>

      <bpmn2:outgoing>_6-_8</bpmn2:outgoing>

      <bpmn2:script>System.out.println("x=" + x);</bpmn2:script>

    </bpmn2:scriptTask>

    <bpmn2:endEvent id="_8" name="End">

      <bpmn2:incoming>_6-_8</bpmn2:incoming>

      <bpmn2:terminateEventDefinition id="_MVI7SEp0EeGJ6vd3uFYRmQ"/>

    </bpmn2:endEvent>

    <bpmn2:scriptTask id="_9" name="Script" scriptFormat="http://www.java.com/java">

      <bpmn2:incoming>_3-_9</bpmn2:incoming>

      <bpmn2:outgoing>_9-_5</bpmn2:outgoing>

      <bpmn2:script>System.out.println("Executing Yes");</bpmn2:script>

    </bpmn2:scriptTask>

    <bpmn2:scriptTask id="_10" name="Script" scriptFormat="http://www.java.com/java">

      <bpmn2:incoming>_4-_10</bpmn2:incoming>

      <bpmn2:outgoing>_10-_5</bpmn2:outgoing>

      <bpmn2:script>System.out.println("Executing No");</bpmn2:script>

    </bpmn2:scriptTask>

    <bpmn2:scriptTask id="_11" name="Script" scriptFormat="http://www.java.com/java">

      <bpmn2:incoming>_1-_11</bpmn2:incoming>

      <bpmn2:outgoing>_11-_2</bpmn2:outgoing>

      <bpmn2:script>System.out.println("Executing starts.");</bpmn2:script>

    </bpmn2:scriptTask>

    <bpmn2:sequenceFlow id="_11-_2" sourceRef="_11" targetRef="_2"/>

    <bpmn2:sequenceFlow id="_2-_3" sourceRef="_2" targetRef="_3"/>

    <bpmn2:sequenceFlow id="_2-_4" sourceRef="_2" targetRef="_4"/>

    <bpmn2:sequenceFlow id="_9-_5" sourceRef="_9" targetRef="_5"/>

    <bpmn2:sequenceFlow id="_10-_5" sourceRef="_10" targetRef="_5"/>

    <bpmn2:sequenceFlow id="_5-_6" sourceRef="_5" targetRef="_6"/>

    <bpmn2:sequenceFlow id="_6-_8" sourceRef="_6" targetRef="_8"/>

    <bpmn2:sequenceFlow id="_3-_9" sourceRef="_3" targetRef="_9"/>

    <bpmn2:sequenceFlow id="_4-_10" sourceRef="_4" targetRef="_10"/>

    <bpmn2:sequenceFlow id="_1-_11" sourceRef="_1" targetRef="_11"/>

  </bpmn2:process>

  <bpmndi:BPMNDiagram id="_MVI7SUp0EeGJ6vd3uFYRmQ">

    <bpmndi:BPMNPlane id="_MVI7Skp0EeGJ6vd3uFYRmQ" bpmnElement="com.sample.test">

      <bpmndi:BPMNShape id="_MVI7S0p0EeGJ6vd3uFYRmQ" bpmnElement="_1">

        <dc:Bounds height="30.0" width="30.0" x="25.0" y="65.0"/>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="_MVI7TEp0EeGJ6vd3uFYRmQ" bpmnElement="_2">

        <dc:Bounds height="40.0" width="40.0" x="232.0" y="60.0"/>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="_MVI7TUp0EeGJ6vd3uFYRmQ" bpmnElement="_3">

        <dc:Bounds height="30.0" width="30.0" x="318.0" y="25.0"/>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="_MVI7Tkp0EeGJ6vd3uFYRmQ" bpmnElement="_4">

        <dc:Bounds height="30.0" width="30.0" x="318.0" y="105.0"/>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="_MVI7T0p0EeGJ6vd3uFYRmQ" bpmnElement="_5">

        <dc:Bounds height="40.0" width="40.0" x="505.0" y="60.0"/>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="_MVI7UEp0EeGJ6vd3uFYRmQ" bpmnElement="_6">

        <dc:Bounds height="48.0" width="80.0" x="582.0" y="56.0"/>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="_MVI7UUp0EeGJ6vd3uFYRmQ" bpmnElement="_8">

        <dc:Bounds height="28.0" width="28.0" x="835.0" y="65.0"/>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="_MVI7Ukp0EeGJ6vd3uFYRmQ" bpmnElement="_9">

        <dc:Bounds height="48.0" width="80.0" x="389.0" y="16.0"/>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="_MVI7U0p0EeGJ6vd3uFYRmQ" bpmnElement="_10">

        <dc:Bounds height="48.0" width="80.0" x="389.0" y="96.0"/>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="_MVI7VEp0EeGJ6vd3uFYRmQ" bpmnElement="_11">

        <dc:Bounds height="48.0" width="80.0" x="102.0" y="57.0"/>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNEdge id="_MVI7VUp0EeGJ6vd3uFYRmQ" bpmnElement="_11-_2">

        <di:waypoint xsi:type="dc:Point" x="142.0" y="81.0"/>

        <di:waypoint xsi:type="dc:Point" x="252.0" y="80.0"/>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="_MVI7Vkp0EeGJ6vd3uFYRmQ" bpmnElement="_2-_3">

        <di:waypoint xsi:type="dc:Point" x="252.0" y="80.0"/>

        <di:waypoint xsi:type="dc:Point" x="333.0" y="40.0"/>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="_MVI7V0p0EeGJ6vd3uFYRmQ" bpmnElement="_2-_4">

        <di:waypoint xsi:type="dc:Point" x="252.0" y="80.0"/>

        <di:waypoint xsi:type="dc:Point" x="333.0" y="120.0"/>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="_MVI7WEp0EeGJ6vd3uFYRmQ" bpmnElement="_9-_5">

        <di:waypoint xsi:type="dc:Point" x="429.0" y="40.0"/>

        <di:waypoint xsi:type="dc:Point" x="525.0" y="80.0"/>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="_MVI7WUp0EeGJ6vd3uFYRmQ" bpmnElement="_10-_5">

        <di:waypoint xsi:type="dc:Point" x="429.0" y="120.0"/>

        <di:waypoint xsi:type="dc:Point" x="525.0" y="80.0"/>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="_MVI7Wkp0EeGJ6vd3uFYRmQ" bpmnElement="_5-_6">

        <di:waypoint xsi:type="dc:Point" x="525.0" y="80.0"/>

        <di:waypoint xsi:type="dc:Point" x="622.0" y="80.0"/>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="_MVI7W0p0EeGJ6vd3uFYRmQ" bpmnElement="_6-_8">

        <di:waypoint xsi:type="dc:Point" x="622.0" y="80.0"/>

        <di:waypoint xsi:type="dc:Point" x="849.0" y="79.0"/>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="_MVI7XEp0EeGJ6vd3uFYRmQ" bpmnElement="_3-_9">

        <di:waypoint xsi:type="dc:Point" x="333.0" y="40.0"/>

        <di:waypoint xsi:type="dc:Point" x="429.0" y="40.0"/>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="_MVI7XUp0EeGJ6vd3uFYRmQ" bpmnElement="_4-_10">

        <di:waypoint xsi:type="dc:Point" x="333.0" y="120.0"/>

        <di:waypoint xsi:type="dc:Point" x="429.0" y="120.0"/>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="_MVI7Xkp0EeGJ6vd3uFYRmQ" bpmnElement="_1-_11">

        <di:waypoint xsi:type="dc:Point" x="40.0" y="80.0"/>

        <di:waypoint xsi:type="dc:Point" x="142.0" y="81.0"/>

      </bpmndi:BPMNEdge>

    </bpmndi:BPMNPlane>

  </bpmndi:BPMNDiagram>

</bpmn2:definitions>

Reply to this message by going to Community

Start a new discussion in jBPM at Community