2 Replies Latest reply on Aug 7, 2014 2:46 AM by redbees

    How can I get a value from Task in jBPM

    redbees

      The problem is I want to get a value from jBPM after calculate but I don't know how.

      Example:

      My script task:

      Capture.PNG

      System.out.println("jBPM running ...");

      kcontext.setVariable("result", 7);

       

      The question is how can I get the value of result from Java:

      public static void startJbpmModel(String methodName, int num) {

        int result = 0;

        KnowledgeBase kbase = readKnowledgeBase();

        StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

        ksession.startProcess("pics");

      // how can I get the value from here ?

        }

      Thank you for any suggestion, and I'm very new in jBPM so my apology if I bother your time.