Execution doesn't get out from External Task,

Hi Everyone,
When i am executing my Process and when the execution passes through one of my external Task, the process execution gets stuck there, there is no error, no warning, nothing.
The execution doesn’t flow to the next task.

I checked if there is something wrong in my External Task, by adding end listeners to my external task, and tried printing logs there, I was able to able to print logs.

The external Task Code:

ExternalTaskClient client = ExternalTaskClient.create().baseUrl("http://" + PROCESS_ENGINE_URL + "/rest")
              TopicSubscriptionBuilder testSubscriptionBuilder = client.subscribe("eventConfiguration")
                 .handler((externalTask, externalTaskService) -> {
                    logger.info("External Service(Event Configuration)  Started " + new Date());

                }); client.start();

@satyaram413 you can refer this example:

public class ExternalTaskServiceWorker {

  private Gson gsonParser;

  private ExternalWorkerConfiguration externalWorkerConfiguration;

  public void handleExternalTasks() {
    log.info("Initialzing the ExternalTaskServiceWorker with configuration:{}", externalWorkerConfiguration);

    ExternalTaskClient externalTaskClient = ExternalTaskClient.create()
            requestContext -> requestContext.addHeader("Authorization", externalWorkerConfiguration.getAuthorization()))

    TopicSubscription topicSubscription = externalTaskClient.subscribe(externalWorkerConfiguration.getTopicName())
        .handler((externalTask, externalTaskService) -> {

          String compensatedActivity = externalTask.getVariable("compensatedActivity");
          if (StringUtils.hasText(compensatedActivity)) {
            compensatedActivity = compensatedActivity + "," + externalTask.getActivityId();
          } else {
            compensatedActivity = externalTask.getActivityId();

          TenantActivationStatus tenantActivationStatus = TenantActivationStatus.builder()
              .servicesList(Arrays.asList("Inventory service", "Order Management service", "Payments Service"))

          JsonValue activationStatusValue = ClientValues.jsonValue(gsonParser.toJson(tenantActivationStatus));

          Map<String, Object> variables = new HashMap<>();
          variables.put("tenantActivationStatus", activationStatusValue);
          variables.put("compensatedActivity", compensatedActivity);

          externalTaskService.complete(externalTask, variables);

          // externalTaskService.extendLock(externalTask, newDuration);
          // externalTaskService.handleBpmnError(externalTask, errorCode);
          // externalTaskService.handleFailure(externalTask, errorMessage, errorDetails, retries,
          // retryTimeout);

          log.info("ExternalTask {} with businessKey {} completed!!!", externalTask.getId(),


    log.info("ExternalTaskServiceWorker has subscribed to the topic {} sucessfully", topicSubscription.getTopicName());


Did you check the worker logs?

Hi @aravindhrs,
The above code was working in a standalone Camunda Tomcat Deployment, but we moved to microservices recently, since then we are facing this issue. I will check the solution you mentioned.

Yes @aravindhrs.
I have kept logs after the external completion, and they work fine.

Before, did you deploy and run the external workers in the tomcat/wildfly?

No, I used to deploy my services war in tomcat and run external worker as a independent jar, this jar can make connection with my Process ENgine, so it would listen to the topics, that i have mentioned in bpmn task.

So if I understood correctly, the process application deployed war was now changed to microservice architecture right?

Yes @aravindhrs, Exactly

@satyaram413 did you enabled “jobExecutorActivate=true” ? Have you tried the above mentioned external task worker?

@aravindhrs, where do i enable jobExecutorActivate=true, as i am not use tomcat to do that, how can i enable this option in microservices.
2. Having dependency issues @aravindhrs, working on it, will post the output.

Thanks much

In application.yml

    enabled: true
      enabled: true
1 Like

Also, did you enabled deploymentAware=true when process application is deployed as war?

Are using shared database?

@aravindhrs, previously when we were using standalone approach to deploy wars, we have disabled jobExecutorDeploymentAware, but that didn’t create any issues. The reason why we had to disable it, because we were having few issues while using timer event.

yes, it should be disabled in your case.

Would this configuration do,
enabled: true
enabled: true
enabled: false

Yeah. Make sure the indentation.

1 Like

Sorry for the delayed response @arvindhrs,
The solution you suggested worked.

Thanks much Arvindh.