I’m looking for an event, that is fired after deploying a process respectively after finishing the initial deployment of resources in the class path.
BpmnParseListeners, that can be set via
setCustomBpmnParseListeners in the
ProcessEngineConfiguration, but they got only triggert after parsing, but before deployment.
I also found
Deployers, that can be set via
setCustomPostDeplyers in the
ProcessEngineConfiguration, but they seem to run within the same transaction as the deployment, so I’m not able to find any deployment resources /
BpmnModelInstance (tried via
Since we want adjust the caching of the latest process definitions, we really need the just deployed
BpmnModelInstances (not the
ProcessDefintionEntity, but the
In what way do you want to customize process definition caching? Based on that, we may suggest a proper solution.
we extended the existing BpmnInstanceCache to a two level caching:
- 1st level contains only the latest versions of process definitions
- 2nd level contains a limited amount of older process definition versions
Since way more process definitions (in different versions) are in use than the normal caching could handle with existing resources that way of caching suited best for us and is working fine.
Now we want to prefill the cache with the latest versions on application start up, and that is the point we are struggling now, because there is no event that fits for the (transactionally) finished deployment of process definitions.
How do you determine which definitions to add to the cache? In general, you can annotate a method in your process application with
@PostDeploy which will be invoked after the deployment has been made and committed.
That sounds like what we would need, if we would use @ProcessApplication, but unfurtunately we don’t use it.
Now we managed it to use
setCustomPostDeployers together with Springs
TransactionSynchronizsationManager to execute the our code after the db commit of the deployments.