Hii guys, I need to understand How the Job Executor work into Homogeneous environment (https://docs.camunda.org/manual/7.6/user-guide/process-engine/the-job-executor/#cluster-setups )
My Environment:
Node A with Process Application X
Node B with Process Application X
Process Application contains a cycle triggered by timer. During the cycle I insert a Service Task Y.
Test Scenario:
Start an instance of Application X calling Node A
Start an instance of Application X calling Node B
during the tests, I note that the Service Task runs always on Node B
Could you please help me to understand?
Regards,
Luca
Markus
April 12, 2017, 7:03am
2
Hi Luca,
could you please clarify what you mean by “cycle” and “During the cycle I insert a Service Task Y.”.
A Job Executer in a homogenous cluster aquires jobs from database and locks them on database. So it is ensured that job is not executed on both nodes.
Which Job Executor of Node A and B aquires the job is not guaranteed.
If you need this, JobExecutor must be deploymentAware and Process Application X on Node A and B must have different names for their deployments.
Bets regards,
Markus
I attached my BPMN diagram. Service Task is Service Task Y. Each 2 minutes the Service Task will be started.
Markus
April 12, 2017, 8:36am
4
Hi Luca,
In a homogenous cluster there is no guarantee on which Node Service Task is executed.
I think it is hazard that it is always executed on node B.
Could you post the configuration of your job executor pls.
Best regards,
Markus
<subsystem xmlns="urn:org.camunda.bpm.jboss:1.1">
<process-engines>
<process-engine name="default" default="true">
<datasource>java:jboss/datasources/ProcessEngine</datasource>
<history-level>full</history-level>
<properties>
<property name="jobExecutorAcquisitionName">
default
</property>
<property name="isAutoSchemaUpdate">
true
</property>
<property name="authorizationEnabled">
false
</property>
<property name="jobExecutorDeploymentAware">
true
</property>
</properties>
<plugins>
<plugin>
<class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
</plugin>
<plugin>
<class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
</plugin>
<plugin>
<class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
</plugin>
</plugins>
</process-engine>
</process-engines>
<job-executor>
<core-threads>3</core-threads>
<max-threads>5</max-threads>
<queue-length>10</queue-length>
<job-acquisitions>
<job-acquisition name="default">
<properties>
<property name="lockTimeInMillis">
300000
</property>
<property name="waitTimeInMillis">
5000
</property>
<property name="maxJobsPerAcquisition">
3
</property>
</properties>
</job-acquisition>
</job-acquisitions>
</job-executor>
</subsystem>
I would like this behavior:
My Environment:
Node A with Process Application X
Node B with Process Application X
Test Scenario:
Start an instance of Application X calling Node A (instance ABC)
The Service Task executed on Node A
Start an instance of Application X calling Node B (instance XYZ)
The Service Task executed on Node B (two instances: ABC, XYZ)
Kill the Node B
The Service Task will never be performed more. Why?
Could you please help to understand the behaviour?
Regards,
Luca
Markus
April 13, 2017, 9:20am
7
Please try this:
<property name="jobExecutorDeploymentAware">
false
</property>
instead of true.
If I understand you correct you want to achieve that Service Task is executed one Node A or Node B and that it is not important that it is a specific node.
So if you set jobExecutorDeploymentAware to false the jobExecutor will not make a difference if it is allowed top execute the Service Task or not.
Could you test this pls.
Best regards,
Markus