Process engine variable scope

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 ?