BPMN files in Process application war file

Hi Lukas,

I hope I can clarify some things.

  1. Process models are indeed persisted as BLOBs in the database (check the table ACT_GE_BYTEARRAY). Once deployed, the process engine only loads the BPMN files from there.
  2. Why is the process engine not able to resolve beans, etc. when executing a process? The process engine maintains a registry mapping deployments to process applications. If the registry does not contain an entry for a certain deployment, then the process engine is not be able to resolve resources from a process application for it. APIs related to that are ManagementService#registerProcessApplication and ManagementService#unregisterProcessApplication.
  3. Now, why does your process application need to contain the BPMN files in order for bean resolution to work, when you have already deployed them before? In general, it does not have to. However, then the process engine cannot automatically maintain the registry of which deployment is complemented by which process application. If the models are included in the process application, then the process engine determines during application deployment that there is already an existing process deployment for these models and registers the process application automatically.

In essence, if you want your process application to be registered for existing deployments, either include those BPMN resources in the application to trigger automatic registration or register the process application manually by using ManagementService#registerProcessApplication.

Cheers,
Thorben

1 Like