-
1. Re: Set ProcessVariables on a running processInstance over RemoteAPI -jBPM 6.0.1
salaboy21 Aug 22, 2014 12:34 PM (in response to samboy_05)Can you try that in jbpm 6.1.0.Final? to see if that's available there?
By the way.. why do you want to set the process variables from outside the process? that's supposed to be something internal that the activities inside the process will change.
HTH
-
2. Re: Set ProcessVariables on a running processInstance over RemoteAPI -jBPM 6.0.1
samboy_05 Aug 25, 2014 7:16 AM (in response to salaboy21)salaboy21 , Thanks for your quick response ,
However , as per my experience , most of the processes I have made are not totally deterministic in nature , lets take an XOR node after a human task . The human when completing the task , provides the decision based on which the XOR fork will determine the path the process flow takes.
In such cases I have to supply an external variable to the process. Do I have a choice ?
PS : There is no explicit way described to set the variables , can use Execute Calls instead ??
-
3. Re: Set ProcessVariables on a running processInstance over RemoteAPI -jBPM 6.0.1
samboy_05 Aug 26, 2014 2:07 PM (in response to samboy_05)Got it running .
public Object execute(Command<?> command){ CommandBasedStatefulKnowledgeSession session = (CommandBasedStatefulKnowledgeSession)ksession; return session.execute(command); } public void setProcessVariables(Long processInstanceID, String key, Object value) { Map<String,Object> hashMap = new HashMap<>() ; hashMap.put(key, value); SetProcessInstanceVariablesCommand setVariables = new SetProcessInstanceVariablesCommand(processInstanceID,hashMap); try{ execute(setVariables); }catch(Exception ex){ log.error(ex); } }