02-07-2017 06:45 AM
My workflow has 50 constant data values rather create these variables for each instance, Is there a way to define them as constants at process definition level or so? So those will be used by process instances under that process definition.
02-07-2017 09:41 AM
Could you give more info on where you want to access the constants from? If you are utilising them from inside a service task then you could put them in your Java class. You can also add custom beans to resolve values in your BPMN at runtime from expressions.
Note Activiti Enterprise has Data Models that allow you to store constants inside a related DB table, but you will not have that if you are using the Community engine. See this blog post for more info on this feature.
02-08-2017 09:30 AM
The way I handle things like this i to create a properties file in my deployment bar file.
You can then reference this as a "resources" associated with the specific deployment.
In Activiti Enterprise (and Activiti 6) it is a little more difficult as Proces App's don't allow for ad hoc files to be added to the App.
Another option is to add a classpath resource but this will have a different lifecycle to the process app and could be problematic if the contained data is unique per process (as is often the case).
Greg
bp3
Explore our Alfresco products with the links below. Use labels to filter content by product module.