External Task - Spring Boot property configuration - Migration

Hi @jonathan.lukas
When I am working on migration from Camunda 7.19 to 8.3
I have one external task which is running in Spring boot.
Now Do I need to change anything in the external task application ?
Because now engine-rest is not available.
So what is the change required from my side as a external task?
I done successfully my Bpmn file and now topic is pointing to task-definition type

Or I need to change this to jobworker to make it work or I am missing something?

external task yml file (Camunda 7).
camunda.bpm.client:
base-url: http://localhost:8080/engine-rest
subscriptions:
studentOnboarding:
process-definition-key: main-process
include-extension-properties: true
variable-names: studentName

Hi Guys,
Anyone can help me on this ?

Hello @vinothkumar ,

I know from other posts you are using the adapter. This one comes with an adapter for external tasks as well, but you will have to bring your properties config to the annotation.

I hope this helps

Jonathan

@jonathan.lukas
Can you plz share some sample. I tried with above config which I mentioned . But unfortunately it is giving below error. As we are not using the engine.

Error message:
org.camunda.bpm.client.impl.EngineClientException: TASK/CLIENT-02001 Request 'POST http://localhost:8080/engine-rest/external-task/fetchAndLock HTTP/1.1’ returned error: status code ‘404’ - message: null

Hello @vinothkumar ,

you will have to remove the external task client spring boot starter dependency.

Jonathan

@jonathan.lukas
Can you please give me some good example.

If I remove that, all my external task code will have the compiler error.

Example:
import org.camunda.bpm.client.spring.annotation.ExternalTaskSubscription;
import org.camunda.bpm.client.task.ExternalTask;
import org.camunda.bpm.client.task.ExternalTaskHandler;
import org.camunda.bpm.client.task.ExternalTaskService;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Component
@ExternalTaskSubscription(“studentOnboarding”)
public class StudentOnboardingHandler implements ExternalTaskHandler {
@Override
public void execute(ExternalTask externalTask, ExternalTaskService externalTaskService) {
System.out.println(“External Task Executed Successfully”);
System.out.println(“Process Definition ID:”+externalTask.getProcessDefinitionId());
externalTaskService.complete(externalTask);
}
}

Hi @jonathan.lukas ,
Can you plz give some example with github

Hi @vinothkumar,

as there is no example available right now, I will try to create one later this week.

Please be patient.

Hope this helps, Ingo

Thanks a lot @Ingo_Richtsmeier ,
We are exposing the migration option for our existing projects. Its helps a lot if you could notify here once you done it. Thanks.

Hi @Ingo_Richtsmeier ,
Any luck on this ?

Hi @vinothkumar,

not yet. But hopefully until this week ends.

Hope this helps, Ingo

Thanks @Ingo_Richtsmeier

Hi @Ingo_Richtsmeier ,
any luck on this with examples ?

Hi @vinothkumar,

I’m just finished. You can find the example on this branch until we merge it into the code base.

If you later get a 404 from the link, navigate to the example folder of the main branch.

Hope this helps, Ingo

1 Like

Thanks @Ingo_Richtsmeier ,
I will look into this and utilize the same.

Hi @vinothkumar,

after merging the branch into the main codebase, you can find the examples here: camunda-7-to-8-migration/example at main · camunda-community-hub/camunda-7-to-8-migration · GitHub

Cheers, Ingo