Camunda Async Service task gets stuck

I have uploaded a workflow with async before/ after service task. But its gets stuck at the task.

I do not see any issue when workflow with synchronous service task is uploaded.

Can someone point out what configuration I could be missing?

I appreciate your help. Thanks

I am using wildfly and below are the settings for camunda in my standalone-full.xml-

    <subsystem xmlns="urn:org.camunda.bpm.jboss:1.1">
        <process-engines>
            <process-engine name="mymachine" default="true">
                <datasource>java:jboss/myds</datasource>
                <history-level>full</history-level>
                <properties>
                    <property name="jobExecutorAcquisitionName">
                        default
                    </property>
                    <property name="isAutoSchemaUpdate">
                        false
                    </property>
                    <property name="authorizationEnabled">
                        true
                    </property>
                    <property name="jobExecutorDeploymentAware">
                        true
                    </property>
                    <property name="jobExecutorActivate">
                        true
                    </property>
                    <property name="historyCleanupBatchWindowStartTime">
                        00:01
                    </property>
                    <property name="jobExecutorAcquireByPriority">false</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">
                            15
                        </property>
                    </properties>
                </job-acquisition>
            </job-acquisitions>
        </job-executor>
    </subsystem>

It’s likely come configuration issues with the Job Executor.
This is a really great blog post on potential issues and solutions. Hopefully that will help you.

Hi @jayshrin,

it depends how you deployed the process model. If you deployed it from the modeler, the job wasn’t picked up because of the jobExecutorDeploymentAware setting.

I’ve written more on this recently here: Process Stuck in Start

Hope this helps, Ingo

Thanks for your reply.
Tried these two things-

  1. I tried deploying it to the REST service without using modeler and got the same result of the async task getting stuck.

  2. When I set jobExecutorDeploymentAware to false in standalone-full.xml and didnt deploy the process[ so its using the one from the above deployment], it fails to load the delegate class.
    Stack trace-
    org.camunda.bpm.engine.ProcessEngineException: ENGINE-09008 Exception while instantiating class ‘com.iti.myproject.server.workflow.QueueJobsCCS’: ENGINE-09017 Cannot load class ‘com.iti.myproject.server.workflow.QueueJobsCCS’: com.iti.myproject.server.workflow.QueueJobsCCS from [Module “org.camunda.bpm.camunda-engine:main” from local module loader @33e5ccce (finder: local module finder @5a42bbf4 (roots: C:\myproject12308mysql\wildfly\modules,C:\myproject12308mysql\wildfly\modules\system\layers\base))]
    at org.camunda.bpm.engine.impl.util.EngineUtilLogger.exceptionWhileInstantiatingClass(EngineUtilLogger.java:81)
    at org.camunda.bpm.engine.impl.util.ClassDelegateUtil.instantiateDelegate(ClassDelegateUtil.java:53)
    at org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior.getActivityBehaviorInstance(ClassDelegateActivityBehavior.java:111)
    at org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior$1.call(ClassDelegateActivityBehavior.java:67)
    at org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior$1.call(ClassDelegateActivityBehavior.java:64)
    at org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.executeWithErrorPropagation(AbstractBpmnActivityBehavior.java:110)
    at org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior.execute(ClassDelegateActivityBehavior.java:64)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute$2.callback(PvmAtomicOperationActivityExecute.java:60)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute$2.callback(PvmAtomicOperationActivityExecute.java:49)
    at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.continueIfExecutionDoesNotAffectNextOperation(PvmExecutionImpl.java:1988)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:41)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:30)

Thanks for the recommendation.
I’ll take a look and if I find something I’ll let you know

@Niall: As per the link I checked act_ru_job table and found that the LOCK_EXP_TIME_ , LOCK_OWNER_and DUE_DATE_ are empty for the tasks in act_ru_job table. So looks like the job acquisition is not picking up the job. I will try to enable logging and update you on findings.

1 Like