问题
Is it possible to load BPMN XML from a database in Camunda rather than having the XML in files in with the web app?
We want to be able to dynamically add new workflows rather than deploy a new WAR with the definitions the idea is add to the database and notify the webapp there are new definitions.
How this makes sense!
Thanks, Scott.
回答1:
Camunda stores the model/deployment versions in the DB. Bundling the file in the deployment is just one way of (auto) deploying a process model.
If auto deployment is enabled and the model has changes then the process model will be deployed as a new version to the database during startup.
"isScanForProcessDefinitions: if this property is set to true, the classpath of the process application is automatically scanned for deployable resources. Deployable resources must end in .bpmn20.xml, .bpmn, .cmmn11.xml, .cmmn, .dmn11.xml or .dmn." https://docs.camunda.org/manual/latest/user-guide/process-applications/the-processes-xml-deployment-descriptor/
At any (run)time you can deploy a new model version via REST or Java API (RepositoryService). For instance you can use the Camunda modeler to deploy a new version: https://docs.camunda.org/get-started/quick-start/deploy/ or for instance curl or postman.
Also see:
https://docs.camunda.org/manual/latest/webapps/cockpit/deployment-view/ https://docs.camunda.org/manual/latest/user-guide/process-engine/process-versioning/
来源:https://stackoverflow.com/questions/63692725/camunda-load-bpmn-xml-from-database