1 Reply Latest reply on Dec 7, 2011 6:12 PM by Demian Calcaprina

    Change process variable from domain specific (WorkItemHandler)

    Sam D. Newbie


      I have defined a global process variable VAR_X and a new WorkItemHandler.

      I would like to ask how can set a value to my VAR_X inside my WorkItemHandler and then, of course, impact the global variable?



        • 1. Re: Change process variable from domain specific (WorkItemHandler)
          Demian Calcaprina Master

          Hi Sam,


          You have to:

          -Define VAR_X as input of the node. Something like this:


          You give it a name to use inside the workItem.


          -You can get the variable from work item parameters.

          public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {






          - Define VAR_X as output of the node.

          It is similar to the input


          - Put this variable in the result map

          Map<String, Object> results = new HashMap<String, Object>();

                                                            results.put("VAR_X", var)


          You can see that you are not directly accessing to the global variables.. you have inputs and outputs of each task..