Process application with shared process engine

Hi,
i need help with loading of beans for shared process engine.

I have this situation:

We have 2 servers: Admin and Background server. On admin server we have a war file of camunda with Cockpit,Tasklist plugins.
On background server we have process application as a jar file with shared process engine.
The application context is looking like this:

    <context:component-scan base-package="com.workflow.service" />
    
    <bean id="dataSource"
        class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
        <property name="targetDataSource">
            <bean id="DatabaseName" class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiName" value="java:comp/env/jdbc/ProcessEngine"/>
              </bean>
        </property>
    </bean>

    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource" />
    </bean>


  <!-- bind the process engine service as Spring Bean -->
  <bean name="processEngineService" class="org.camunda.bpm.BpmPlatform" factory-method="getProcessEngineService" />

  <!-- bind the default process engine as Spring Bean -->
  <bean name="processEngine" factory-bean="processEngineService" factory-method="getDefaultProcessEngine" />

  <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService"/>
  <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService"/>
  <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService"/>
  <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService"/>
  <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService"/>

  <!-- bootstrap the process application -->
  <bean id="processApplication" class="org.camunda.bpm.engine.spring.application.SpringServletProcessApplication" />

  <bean id="oneService" class="com.workflow.service.OneDelegateService" />    
  <bean id="twoService" class="com.workflow.service.TwoDelegateService" />    

In meta-inf folder I have put processes.xml, but i quess it is useless, because BPMN files are deployed on admin server.
In pom.xml file i have put these dependencies:

<dependency>
            <groupId>org.camunda.bpm</groupId>
            <artifactId>camunda-engine</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.camunda.bpm</groupId>
            <artifactId>camunda-engine-spring</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.camunda.bpm</groupId>
                    <artifactId>camunda-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

And finally error issue is like this: property not found “oneService” , i have debuged it and i found that beans are not loaded. I have tried to use component scan or via bean tag in application context.
Can u please help me with this?

Thanks for help.

BR

Lukas P.

Hi Lukas,

can you please share your process (BPMN).

Regarding to

did the error occur on background or admin server?

Greetings,
Philipp

Hi Phillip,
thanks for reply, i have solve it today, now i am totally know how shared process engine works :slight_smile:

Thanks again and wish u rest of the day

Lukas P.

Hi Lukar,

How did u solve it? Appreciate your answer. Any Camunda support can answer ASAP?

1.We have many service tasks with many java delegates and we want Spring based Process Application of shared process engine to be deployed inside wildfly only once with multiple bpmns files like around 100 bpms.
2. All the bpm files will be deployed to Camunda engine via rest api’s.

How does process.xml would look like? and I can’t have multiple process.xml and I can’t keep all bpmn’s inside the war file as it keep changing via rest api’s.

How to solve this?

Note: we have 100 bpms file deployed via admin rest api’s and only one War file with many java delegates.

How?
Could you please describe the solution