1 Reply Latest reply on Jan 27, 2014 2:38 AM by Jocelyn Duc

    How to process message start parameters?

    Jocelyn Duc Novice

      Hello,

       

      I am trying to get working a process starting with a Message Event.

       

      public void testImplicit() {
            KieSession ksession = createKnowledgeSession("message.bpmn2");
             
            Map<String, String> m = new HashMap<String, String>();
            m.put("name", "myName");
            m.put("request", "myRequest");
             
            ksession.signalEvent("Message-StartProcessMessage", m);
      }
      
      

       

      With this code, my process is starting. The next node is a script task which is printing the given parameters in the console

       

      System.out.println("x: " + x);
      
      

       

      The process:

      • Variables: x

       

      The message-start node:

      • Output: Result
      • OutputAssociations: Result->x

       

      Currently, the script node is printing

      x: Result
      
      

       

      I am expecting a HashMap but Result seems to be a String and I am unable to typecast it, so i can't get the name and the request. I am working on jBPM 6.0.0

       

      Thank you for your help

       

      Jocelyn