I am new to Temporal and I have order application implementation where there is workflow(microservice) and there are various activities(microservices) which are invoked from the workflow service as shown below.
Problem:
- Is this right expectation to have shared activity, if yes then how do I register activities? ( I get error if I do as below on same queue for all activities associated with a WF in a namespace)
microservice 1.1
Worker worker = factory.newWorker("OrderQueue");
worker.registerWorkflowImplementationTypes(Workflow1.class, Workflow2.class, ChildWorkflow.class );
microservice 1.2
Worker worker = factory.newWorker("OrderQueue");
worker.registerActivitiesImplementations(activity<1&2>, activity3);
shared microservice 1.3
Worker worker = factory.getWorker("OrderQueue");
worker.registerActivitiesImplementations(activity4);
- Is it right expectation to have WF and Activities in different services at all? If yes then how to perform unit testing on standalone activities? since I don’t get WF implementation class in standalone activity.