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&...]