JBoss Community

Re: How to get a list of process variable (name and value) from the processInstance object?

created by byungwoojun in jBPM - View the full discussion

I figured it out myself:

 

===

 

 

 

 

 

org.jbpm.workflow.instance.node.WorkItemNodeInstance wn = (org.jbpm.workflow.instance.node.WorkItemNodeInstance)event.getNodeInstance();

 

 

 

 

 

if (wn.getWorkItem() != null) {

 

#       for (String key : wiParamList.keySet()) {

            System.out.println("param key: " + key.toString());

            System.out.println("param value: " + wiParamList.get(key));          

 

        }

    }



    Map<String,Object> wiResultList = wn.getWorkItem().getResults();

 

 

 

 

    if (wiResultList != null ) {

       

for (String key : wiResultList.keySet()) {

            System.out.println("result key: " + key.toString());

            System.out.println("result value: " + wiResultList.get(key));

       }

    }

}

    Map<String,Object> wiParamList = wn.getWorkItem().getParameters();

    if (wiParamList != null ) {

 

Reply to this message by going to Community

Start a new discussion in jBPM at Community