2 Replies Latest reply on Feb 8, 2012 4:07 AM by sebb

    How to change the param value dynamically?

    mariaprabudass Edwin Newbie

      Hi all,

       

      I am new for jbpm. I have passed boolean value to the variable name "qcapproval". I used constraints in bpmn diagram, in that if the variable qcapproval == true the process end. otherwise (that is qcapproval == false) process continue. But I need to change the variable value as true dynamically. Because if i set the variable false loop continues. I need to stop the process in the particular stage. So i need to change the variable value as true dynamically. Kindly advise me. I have attached my code below.

       

      Code:--    

       

       

                  StatefulKnowledgeSession ksession = createKnowledgeSession("Print.bpmn");

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

                  params.put("qcapproval", false);

                  TaskService taskService = getTaskService(ksession);

                  ProcessInstance processInstance = ksession.startProcess("com.tnq.workflow.jobflow.Print.bpmn", params);

                  assertProcessInstanceActive(processInstance.getId(), ksession);

       

      Thanks for looking into this....