quarkiverse / quarkus-temporal

Temporal (https://temporal.io/) is a developer-first, open source platform that ensures the successful execution of services and applications.
https://docs.quarkiverse.io/quarkus-temporal/dev
Apache License 2.0
3 stars 1 forks source link

Workflow interface without implementation #63

Closed rmanibus closed 2 weeks ago

rmanibus commented 3 weeks ago

The current implementation only works if both the workflow interface and the implementation are present in the same project.

More realistically in a real life project, worker code and client code would most likely be split in two different containers, and the client might not be aware of existing implementation.

constraints on the client code:

rmanibus commented 3 weeks ago

at the very least, this limitation should be mentioned in the doc

melloware commented 3 weeks ago

I think @tmulle ran into this same thing when he was building his microservices so yes at the very least a WARNING in the docs

tmulle commented 3 weeks ago

Yes, that is why I have a common module that has the Activity interfaces in it that I can share between my workflow implementations. In my setup, I use what they call "remote activity workers".

This way each microservice is it's own "Activity" implementation. I just need to make the interfaces available to the Workflow implementation itself.

My workflow interfaces and implementations live in their respective services. I don't separate out the interface from the implementation. I suppose you could, but I don't have a need for that.

If you did, you could do the same thing and put them in a common module and make sure you built a Jandex on them so they are available in other modules?

I do this for some other beans that I keep in separate modules but need them in my workflows.