Multiple process engine with different DB

Hello,
I am novice to use camunda platform and i am working with camunda community version 7.15.0 on wildfly 22 and openjdk 11.
I have compiled two very similar applications which contain the same named “MyEjb extends JavaDelegate”, and both bpmn invoke this by delegateExpression ${myEjb}
I want these two applications to run on two different engines connected to two different DB.
Is it possible to do this with the community version or i need the enterprise version?
NB.: I’m not setting up any tenants, it’s a problem?

In my standalone.xml i’ve

defaultEngine → DB_GENERICS (h2)
engineAppA → DB_A ( postgres)
engineAppB → DB_B (postgres)

AppA

    • pom.xml
    • AppA.ear
        • AppA.war
        • pom.xml
        • src / main /
            • java
                • MyEjb.java
            • resources
                • AppA.bpmn
                • META-INF / processes.xml ( engineAppA)
                  AppB
    • pom.xml
    • AppB.ear
        • AppB.war
        • pom.xml
        • src / main /
            • java
                • MyEjb.java
            • resources
                • AppB.bpmn
                • META-INF / processes.xml ( engineAppB)

Hi @Giuseppe_Infurna
Welcome to the forum.
You mentioned:

This seems to indicate that they’re completely independent of one another so there’s not likely to be any problem here at all.
Is there a problem that you’re expecting from this setup?

HI @Niall ,
So, when i tried with only one ear on one engine, everything worked fine.
when i tried with two ears and two engines i got the error

ENGINE-16004 Exception while closing command context: Unknown property used in expression: $ {myEjb}. Cause: Cannot resolve identifier ‘myEjb’: org.camunda.bpm.engine.ProcessEngineException: Unknown property used in expression: $ {myEjb}. Cause: Cannot resolve identifier ‘myEjb’ …

I cleaned up both DBs and restarted wildfly and everything worked.

Oh, sorry i misunderstood - you’re deploying two engines to a wildfly container?
Is there a reason that you don’t want to use a single engine?
Also is myEJB exactly the same in each deployment?

The idea is to have the same process but with separate db one for each client.
So I thought about cloning the process and renaming the ids for each client
<bpmn: process id = “processA” name = “processA”> for customer A
<bpmn: process id = “processB” name = “processB”> for customer B

The logic (myEjb) is the same for all clients.

You could probably move the common EJB code and have it available on the Wildfly server for all applications to access

Being two separate ears why should camunda have trouble finding the correct javaDelegate (ejb)?
How does camunda to be find javaDelegate by identifier?

I found the problem. The archive-name in processes.xml was the same for both ear, when deploying a new version of ear, camunda struggles to associate the correct process with its archive.
Solution: I removed archive-name in processes.xml so that camunda uses applicationName instead of archive-name in act_re_deployment.