Access Java delegates from standalone webapp

Hey,
I’m getting the following error when starting a process from the standalone webapp:
Unknown property used in expression: ${testDelegate}. Cause: Cannot resolve identifier ‘testDelegate’

I’m running 2 separate embedded engines with a shared database:

  • engine1: Process Application which contains process definition and Java delegates
  • engine2: Standalone webapp for using the Camunda webapps (Cockpit, Tasklist)

Obviously engine2 can’t access the Java delegates.
Is it possible to register the delegates with engine2?

Or do I have to bundle the webapps into Process Application in order to use the same engine?

Thanks in advance and best regards,
Thorsten

Hi Thorsten,

Using a shared engine and process applications would avoid this issue. If you want to avoid using a shared engine, the most common pattern is to work with asynchronous continuations to make sure the class is only ever accessed on engine1. Let’s assume the case of the following process model:

Completing task A triggers task B which relies on a Java class. If you complete the task on engine2 it fails with the mentioned exception. To make this work, you can declare the asyncAfter attribute task A. Then, make sure that the job executor is enabled on engine1 and disabled on engine2. This way, the responsibility of execution will be handed over from engine2 to engine1.

Cheers,
Thorben

Hi Thorben,

thanks for the reply!

In case I want to bundle the webapps in my application, do you have any hint about what’s the easiest way to go?

Best regards,
Thorsten