We have 2 Flowable servers. 1 Production and 1 development.
These are normal tomcat servers that have the war files deployed.
Depending on the server the variables used in flows will be different.
For example in development the rest calls to sap should go to the sap development server.
In production the rest calls need to go to the production server.
I would like to set these variables on the server so they are accessible in the flows as a variable.
Ideally these are saved in a properties file or in an “bean xml” file.
Like I mentioned in the referenced post you can already do this by using Spring properties / beans and reference these in JUEL expressions. Or are you looking for something different?
That isn’t correct: you are fetching a variable, but trying to call an expression.
You’d need a regular service task with an expression, like this: expression="${printer.PrintMessage()} to invoke the spring bean. No need to set these beans as variables, having a different implementation in a different environment will already allow you to change behaviour.
If I understand correctly I cannot invoke the spring bean from a script task?
Is there any way of declaring “server variables” and accessing them from a script task?
Some prosa:
What I like about a script task is that you don’t need a server reboot when changing some code.
Another advantage is that the script task is versioned together with the BPM drawing.
The “http call” task made this extra powerful since complex logic can be written outside of Flowable and can thus be easily modified.