Aysnc boundary event not trigger


#1

I am using Camunda as an Embedded engine where the application is running in more than one node with a common database (Oracle 11g). JDBCBatchProcessing has been set to false as we had a locking issue.
The default config for job-executor in spring properties is like this.

#Camunda JobAware execution
camunda.bpm.job-execution.enabled=true
camunda.bpm.job-execution.deployment-aware=false

And we have a requirement to generate the models dynamically using fluent API. The process instance has asynchronous timer boundary events for user tasks. But unfortunately, they have not been trigger at all.

The model is like this.

Order-1234-planning.bpmn (6.9 KB)

Am I missing some configuration which will make the job executor work? Any help would be highly appreciated. Thanks!


#2

In the startup logs I can see that the jobexecutor is already active.

2019-08-01 11:27:52,616 [INFO] [application] [main] [o.c.b.s.b.s.e.JobExecutorStartingEventListener] - job executor is already active


#3

Hi @Imranullah_Mohammed

There are two things that I noticed.
1 . The two boundary events do have different classes specified as their listener. Is this the desired configuration?
2. The two user tasks do not have any form elements defined. Might it be, that the process ends immediately after starting and that there is no chance, that the boundary events can be triggered?

(PS: I guess if you are using boundary events, you should also consider modelling an outgoing sequence flow out of these events. Just adding a boundary event with a Listener is not really readable and not considered best practice. Maybe you can add the call of the Java class to a ServiceTask that follows the boundary events.)

Regards
Michael


#4

@MichiDahm,
Sorry when for question 1: I edited the fully qualified name, I made a mistake.
for question 2: The user tasks are completed using the task API, so they are not completed instantly.

I choose to have a listener event because I am generating the models using the fluent API and having an end shape is tangling up the diagram and make it more unreadable. So I decided to have an event listener instead.


#5

Noticed one more thing, the job gets locked ACT_RU_JOB table with some interesting values REV_ > 3 sometimes and RETRIES remain 3 always. So making me think that the job gets locked but never gets executed.


#6

Turned on debug and this is what I got:
2019-08-07 10:05:09,632 [DEBUG] [o-f] [JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor]] [o.c.b.e.jobexecutor] - ENGINE-14022 Acquired 0 jobs for process engine ‘default’: []
2019-08-07 10:05:09,632 [DEBUG] [o-f] [JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor]] [o.c.b.e.jobexecutor] - ENGINE-14011 Job acquisition thread sleeping for 59997 millis
2019-08-07 10:05:15,391 [WARN] [o-f] [springCloudBus.anonymous.aS7r5P8DTP2J-6iquTfUvQ-119] [o.s.a.r.l.SimpleMessageListenerContainer] - Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect
2019-08-07 10:05:15,391 [INFO] [o-f] [springCloudBus.anonymous.aS7r5P8DTP2J-6iquTfUvQ-119] [o.s.a.r.l.SimpleMessageListenerContainer] - Restarting Consumer@1cdd66ef: tags=[{}], channel=null, acknowledgeMode=AUTO local queue size=0
2019-08-07 10:05:15,394 [INFO] [o-f] [springCloudBus.anonymous.aS7r5P8DTP2J-6iquTfUvQ-120] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [localhost:5672]
2019-08-07 10:05:22,528 [WARN] [o-f] [springCloudBus.anonymous.aS7r5P8DTP2J-6iquTfUvQ-120] [o.s.a.r.l.SimpleMessageListenerContainer] - Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect
2019-08-07 10:05:22,528 [INFO] [o-f] [springCloudBus.anonymous.aS7r5P8DTP2J-6iquTfUvQ-120] [o.s.a.r.l.SimpleMessageListenerContainer] - Restarting Consumer@52587571: tags=[{}], channel=null, acknowledgeMode=AUTO local queue size=0
2019-08-07 10:05:22,530 [INFO] [o-f] [springCloudBus.anonymous.aS7r5P8DTP2J-6iquTfUvQ-121] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [localhost:5672]

Select * from ACT_RU_JOB;

124ed1ee-b923-11e9-b3e8-005056aa3e3c 1 timer 1 1242eb0c-b923-11e9-b3e8-005056aa3e3c 1236dd17-b923-11e9-b3e8-005056aa3e3c Order-1234-planning:1:113aa292-b923-11e9-b3e8-005056aa3e3c Order-1234-planning 3 8/8/2019 9:53:09.366000 PM timer-transition sla-Task-1 1135c090-b923-11e9-b3e8-005056aa3e3c 1 113aa293-b923-11e9-b3e8-005056aa3e3c 0 1 8/7/2019 9:53:09.366000 AM
1255fde3-b923-11e9-b3e8-005056aa3e3c 1 timer 1 1255fde1-b923-11e9-b3e8-005056aa3e3c 1236dd17-b923-11e9-b3e8-005056aa3e3c Order-1234-planning:1:113aa292-b923-11e9-b3e8-005056aa3e3c Order-1234-planning 3 8/8/2019 9:53:09.413000 PM timer-transition sla-Task-2 1135c090-b923-11e9-b3e8-005056aa3e3c 1 113aa296-b923-11e9-b3e8-005056aa3e3c 0 1 8/7/2019 9:53:09.413000 AM
125847dd-b923-11e9-b3e8-005056aa3e3c 1 timer 1 125847db-b923-11e9-b3e8-005056aa3e3c 125847d8-b923-11e9-b3e8-005056aa3e3c Order-1234-execution:1:116caf1c-b923-11e9-b3e8-005056aa3e3c Order-1234-execution 3 8/8/2019 9:53:09.428000 PM timer-transition sla-Task-3 114b446a-b923-11e9-b3e8-005056aa3e3c 1 116caf1d-b923-11e9-b3e8-005056aa3e3c 0 1 8/7/2019 9:53:09.428000 AM
126910cc-b923-11e9-b3e8-005056aa3e3c 3 timer 8/7/2019 3:04:09.072000 PM 37b69059-6980-4b5a-ac36-54d3b4393792 1 126910ca-b923-11e9-b3e8-005056aa3e3c 126910c7-b923-11e9-b3e8-005056aa3e3c Order-1234-configure:1:118ba8d9-b923-11e9-b3e8-005056aa3e3c Order-1234-configure 3 8/7/2019 9:53:39.538000 AM timer-transition sla-Task-4 117d50f7-b923-11e9-b3e8-005056aa3e3c 1 118ba8da-b923-11e9-b3e8-005056aa3e3c 0 1 8/7/2019 9:53:09.538000 AM

The task is the one, it gets locked but never gets processed. There is no entry in the EXCEPTION_MSG_


#7

Hi @Imranullah_Mohammed,

User Task are meant to be completed by user interaction and in your scenario user interaction is not required . In that case change User Task to service Task Type.

In your design you are waiting for 36 hours to trigger the boundary event. Once that time is elapsed boundary event flow will be triggered.


#8

The user tasks are completed using a different front end application which makes REST calls to complete the User tasks.


#9

This issue was solved, we were on oracle version 11 even though the jdbcBatchProcessing and deployment aware properties were set properly the job executor (Spring Job Executor) was not picking up the case. Then we upgraded our oracle version to 12.1.0.2 and without any code change the Asynchronous events started working.