major
minor
When the application is started for the first time, workflows that are stored in the ".../src/main/webapp/WEB-INF/workflow" folder are automatically uploaded.
Extension:
If a new version of these files is delivered during a re-deployment, these workflows should be updated automatically when the new version is initially started, similar to the role profiles(#28931).
Implementation
A hash of the content is saved for each workflow. If the content changes, the workflow is reloaded.
DataMigration
When booting, the hashes of the workflows already imported are updated. The workflow is not updated! If this is desired, the saved value "loaded" in a migration must first be replaced by a hash that does not correspond to the current file:
- Create migration file with the migration processor {{{
<update-tl-properties property="initial-workflow.<resource>" value="<wf-name>:XXX" /> }}}
- where <resource> is the name of the resource below "/WEB-INF/workflow/" in which the initial WF is defined. For example, if the WF is defined in the file "/WEB-INF/workflow/Ticketsystem.bpml.xml", <resource> is Ticketsystem.bpml.xml.
- where <wf-name> is the name of the WF as specified in the file. If none is specified here, then it is the name of the file bit to the first ".". So the name for the WF in "/WEB-INF/workflow/Ticketsystem.bpml.xml" is ticket system.
- "XXX" stands for the "old hash". As the file has a hash != XXX, the WF is updated,
Test
- In the demo, adapt the workflow Ticketsystem.bpml.xml after the first start and restart the application
- Expectation: The workflow Ticketsystem.bpml.xml is re-imported.