JBoss Community

Re: JBPM 5.4.0-Final: Human Task variables mapping persistence problem.

created by Sandra Renaud in jBPM - View the full discussion

Hello,

 

To access your variables you should use :

/**

           * Return the WorkflowProcessInstance associated to a Task

           * This instance allow to access the map of variables

           * @return WorkflowProcessInstance managed

           */

          public WorkflowProcessInstance getWorkflowProcessInstance(long processInstanceId){

                    return (WorkflowProcessInstance)kSession.getProcessInstance(processInstanceId);

          }

kSession is a StatefullKnowledgeSession

 

then you access your process variable like this : getWorkflowProcessInstance(task.getProcessInstanceId()).getVariable("formObject");

 

Regards,

Reply to this message by going to Community

Start a new discussion in jBPM at Community