JBoss Community

Re: Sharing variables across jbpm processes

created by Mauricio Salatino in jBPM - View the full discussion

Hi Richard? Where are you trying to do:

kSession.getGlobal.set("statusPollInterval", "2s")

kRuntime.setGlobal.set("statusPollInterval", "2s")

 

That syntax is not even Java :)

 

if you have access to the Knowledge Session you just do: ksession.setGlobal("statusPollInterval", "2s");

 

If you don't have access, for example inside a process itself, you can use the kcontext object to access the knowledge runtime

kcontext.getKnowledgeRuntime().setGlobal("statusPollInterval", "2s");

 

That should work inside the processes and the rules.

 

Cheers

Reply to this message by going to Community

Start a new discussion in jBPM at Community