Unable to activate a JobWorker in camunda-spring-boot-starter 8.8.2?

I am using c8run 8.8.2 with camunda-spring-boot-starter 8.8.2
And I defined the JobWorker as follows:

@Service
@Slf4j
public class ReminderEmailJob {
@JobWorker(type = “reminderEmailListener”, autoComplete = true)
public void handleJobReminderEmailListener() {
    log.info(“############## ReminderEmailJob #############”);
   } 
} 

I am using security with Open ID Connect with camunda.client.enabled=false

and my custom camunda client configuration is as follows:

@Configuration 
public class CamundaClientConfig {

@Bean 
public CamundaClient camundaClient() {
  CamundaClientBuilder builder = CamundaClient.newClientBuilder();
  builder.credentialsProvider(new BearerTokenCredentialsProvider());
  builder.restAddress(URI.create("http://localhost:8080"));
  builder.grpcAddress(URI.create("http://localhost:26500"));
  builder.preferRestOverGrpc(false); 
  builder.defaultJobWorkerTenantIds(List.of("<default>")); 
  builder.defaultJobPollInterval(Duration.ofMillis(100));
  builder.defaultJobWorkerMaxJobsActive(32);
  builder.defaultJobWorkerName("default"); 
  builder.defaultJobTimeout(Duration.ofMinutes(5));
  builder.defaultJobWorkerStreamEnabled(false); 
  return builder.build();
 }
}

When running my application, and the workflow reaches for the job worker step, the job worker is never getting called, and no error is thrown in operate and no errors in the app log or camunda log also.
so what configuration am I missing to activate the job worker?

See if this one helps your troubleshooting.

It turns out the Job Workers don’t work with User Flow (User Bearer/Access Token)
when using authentication.method=oidc
but the authentication should be done through client credentials as follows:

camunda.security.authentication.method=oidc
camunda.client.grpc-address=http://localhost:26500
camunda.client.rest-address=http://localhost:8080
camunda.client.prefer-rest-over-grpc=false
camunda.client.auth.client-id=my-connectors-client-id
camunda.client.auth.client-secret=my-connectors-client-secret
camunda.client.auth.token-url=https://my-idm-server/connect/token

So I ended up making a separate springboot application for the job workers and using the above configuration, and it worked just fine.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.