2 Replies Latest reply on Feb 11, 2015 11:32 AM by zach laniado

    Issue with signal event in jbpm 6.1.0.Final

    Soumya Bose Newbie

      I am trying signalling event in jbpm 6.1.0.Final. In my bpmn I have one intermediate signal throw event and another one for catching that signal (signal start event)..Upon starting the process signal start event node catching the thrown signal properly but while printing the output process variable that is associated with the signal, it is printing the signal name instead of signal value that is associated from the process variable. While debugging the code of StartEventHandler I can see in the following method we are putting signal name instead of signal value that was associated from process variable.

       

      protected void readDataOutput(org.w3c.dom.Node xmlNode, StartNode startNode) {

               String id = ((Element) xmlNode).getAttribute("id");

              String outputName = ((Element) xmlNode).getAttribute("name");

              dataOutputs.put(id, outputName);

          }

       

      Attaching my bpmn file that I am testing with. Following is my junit test case -

       

      @Test

          public void testIntermediateEvent() {

              RuntimeManager manager = createRuntimeManager("SampleMessageEvent4.bpmn");

              RuntimeEngine engine = getRuntimeEngine(null);

              KieSession ksession = engine.getKieSession();

              KieRuntimeLogger log = KieServices.Factory.get().getLoggers().newThreadedFileLogger(ksession, "test", 1000);

       

              // start a new process instance

              Map<String, Object> params = new HashMap<String, Object>();

              params.put("processVar1", "value 1");

              ProcessInstance processInstance = ksession.startProcess("SampleMessageEvent4", params);

             

              log.close();

              manager.disposeRuntimeEngine(engine);

              manager.close();

          }

       

      Upon executing the above test case I am getting following output in console -

       

      process started

      processVar2 :: Signal_2_Output

       

      In 'processVar2' I am getting the signal name instead of associated value.

       

      <bpmn2:dataOutput id="DataOutput_1" itemSubjectRef="_ItemDefinition_855" name="Signal_2_Output"/>

       

      Please advise if I am missing anything or there is any known issue within jbpm for this.