HI, I’m trying to understand how to put a job for a topic and the listener would pick it up without an actual camunda engine.
I want that the @ExternalTaskSubscription will get called.
Thanks for the help.
HI, I’m trying to understand how to put a job for a topic and the listener would pick it up without an actual camunda engine.
I want that the @ExternalTaskSubscription will get called.
Thanks for the help.
Hello @Oron_Cohen ,
I hope this doc will give you a good understanding on how the external task pattern works:
You have put the spring-boot way of external task subscription here. Maybe it would help you to get a basic understanding is you check out the pure-java way first:
The spring-boot-starter basically wraps the java worker and handles creation of client and subscription using properties and annotated beans.
I hope this helps
Jonathan
@jonathan.lukas, thanks for the info, I didn’t see examples of the tests in the links.
I’m trying to understand how to do behavioural tests and mock the job itself so I can test that the listener and the business logic will work as expected.
Hello @Oron_Cohen ,
if the requirement is to test the behaviour without bootstrapping an engine, you could call the bean from your test method using mocked ExternalTask and ExternalTaskService objects.
This can help you verifying the behaviour.
Jonathan
Hi @jonathan.lukas, I can do that, but I wanted the external client engine to work with some mockup Camunda engine and put jobs there, is it possible?
That’s how I can illustrate the full Camunda client test.
Hello @Oron_Cohen ,
by using the embedded process engine test, you can spin up an engine. There, you would unit-test the process. As soon as you reach an external task, you could then invoke the handler function for it.
The only bit that is missing then is to bridge the objects provided by the Java API of the engine to ExternalTask and ExternalTaskService.
I am not aware of an implementation of this use case. Is this something you would like to share as soon as it is drafted?
Jonathan