JBoss Community

How to change the param value dynamically?

created by mariaprabudass Edwin in jBPM Development - View the full discussion

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....

Reply to this message by going to Community

Start a new discussion in jBPM Development at Community