1 Reply Latest reply on Dec 12, 2011 6:35 AM by Demian Calcaprina

    How to read external parameters from within a process?

    Umar Ashfaq Newbie

      Here's my code that starts a process:

      StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();  
      Map<String, Object> params = new HashMap<String, Object>();
      params.put("doctorsDecision", "L1"); ksession.startProcess("MyProcess", params);

      And here's how I expect this variable to be available in MyProcess. This is the Action of one of my script tasks in MyProcess:

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

      Is this the right way to access external variables from within a process?




      When I run my application, the process definition is never added to knowledge base because jBPM doesn't seem to recognize doctorsDecision variable. How can I tell jBPM that this variable is external and it's value will be provided on runtime? I am using BPMN2 files.