[jboss-user] [jBPM] - Sharing variables across jbpm processes

Richard Evans do-not-reply at jboss.com
Fri May 25 07:20:37 EDT 2012


Richard Evans [https://community.jboss.org/people/r3vans] created the discussion

"Sharing variables across jbpm processes"

To view the discussion, visit: https://community.jboss.org/message/737909#737909

--------------------------------------------------------------
Hello there.
I want to define in one place a setting that is used as input to timer events in many processes. The value will change from environment to environment so I want to localise it.

I guess that global variables should work...

I defined the setting in the timer 
 - Timer Delay: #{statusPollInterval}

I then tried to set the global variable.
  - kSession.getGlobal.set("statusPollInterval", "2s") didn't seem to work
  - kRuntime.setGlobal.set("statusPollInterval", "2s") gave me an *unexpected global* message
 - The following spring config also give unexpected global.
<drools:script>
<drools:set-global identifier="statusPollInterval">
<bean class="java.lang.String">
<constructor-arg value ="2s"/>
</bean>
</drools:set-global>
</drools:script>


Q1. Is a global variable the best approach for shared settings like this?
Q2. If so, what am I doing wrong? Do I have to declare the global in a drools:resource? 

I have searched previous discussions on globals but have not managed to get the answer. I am new to jbpm so would be grateful for anywone with the patience to assume little prior knowledge.
My configuration is currently all in spring config.

Many thanks,
Richard
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/737909#737909]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120525/8fa0661c/attachment.html 


More information about the jboss-user mailing list