# Process engine variable scope

**URL:** https://forum.flowable.org/t/process-engine-variable-scope/193
**Category:** Flowable Engine
**Created:** [January 10, 2017, 2:58pm UTC](https://forum.flowable.org/t/process-engine-variable-scope/193 "2017-01-10T14:58:45Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![pieterclaeys](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/pieterclaeys/32/608_2.png) [@pieterclaeys](https://forum.flowable.org/u/pieterclaeys)
#### Post date: [January 12, 2017, 8:40am UTC](https://forum.flowable.org/t/process-engine-variable-scope/193/3 "2017-01-12T08:40:43Z")

</div>

Hi, my 2 cents on this:  
system-wide variables or process-definition variables are definitely something very useful.  
The question could be even made more generic into “how could I create some custom ‘getter’ methods that can be used in JUEL expressions; where these ‘getter’ methods return data from a datasource which is not the flowable process variables?”

So for example, applied to system global variables, that would mean

- You have to create your own datasource to store the system settings (use file, any relational DB, or Mongo, whatever)

- You have to create a library with static getter functions . Under the hood, the getter functions do the calls to the datasource. For example, create a method that retrieves a String Value given a Key as string .

- Then, one would create a JUEL expression, for example setting the property with value ${MyOwnSystemsettingsLibrary.getStringValue(“funkyWebserviceURL”)}

Though not being a developer myself, my little toe feels that addressing other datasources could be quite tricky. Limiting the scope to getters would definitely reduce headaches of multi-datasource transactions. The user guide talks about using Beans in chapter 4.6 (${myBean.doSomething(myVar, execution)}) ; but I guess it wouldn’t be that simple ?

---

_[View the full topic](https://forum.flowable.org/t/process-engine-variable-scope/193)._
