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.
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.
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
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.