Proper way to set or update JBPM6 Process Variables

前端 未结 2 1160
刺人心
刺人心 2021-01-28 00:29

I am trying to set the process variable but getting below error

java.lang.IllegalStateException: Process instance 10[SampleBusinessProcess] is disconnected.
at          


        
2条回答
  •  天涯浪人
    2021-01-28 01:00

    I can't comment on the previous answer so I'm posting this answer.

    The quick and dirty way I found (inspired from previous answer) is:

    public void setProcessInstanceVariables(long processInstanceId, Map variables) {
        kieSession.execute(new SetProcessInstanceVariablesCommand(processInstanceId, variables));
    }
    

    Thanks a lot Kris Verlaenen!

提交回复
热议问题