JBoss Community

Using Globals defined from Action Editor -> Globals Editor

created by Ava Huxley in jBPM - View the full discussion


My variable is defined as the following in Globals editor:


// define your globals here: e.g. global java.util.List myList

global java.util.List myList


Then in the Texual Editor, java Dialect is used and the myList is initialized, then it is access using:

     myList = new java.util.LinkedList<String>();

     myList.add("Item1");

     myList.add("Item2");

     System.out.println("kcontext.getVariable(myList)=" + kcontext.getVariable("myList"));


Result is strange to me: kcontext.getVariable(myList)=null


Can you please explain the purpose of this Globals and how to use it correctly? ... Thanks!

Reply to this message by going to Community

Start a new discussion in jBPM at Community