Long-running JavaDelegate - disadvantages?

Hi @mikepii

the article you are referreing is quite old and in the meantime the patterns have improved a lot.

If you run a JavaDelegate for 10 minutes/days, the engine will keep a database connection open for 10 minutes/days. The db-admins usually start to complain if it’s more than 30 sec.

Have a look at Bernds post, especially the last chapter about use cases: https://blog.camunda.com/post/2015/11/external-tasks/. And Tassilo showed the way to use your (long running) business logic in the external task java client: https://blog.camunda.com/post/2018/04/camunda-external-task-client-java-010-alpha2-released/. The first version of the java client has been released last week.

There is no need to subclass AbstractBpmnActivityBehavior any more.

Cheers, Ingo

1 Like