Activity worker deployment with Spring boot application

Hi,

If I have a workflow(QueueA) with an activity(QueueB) which is making call to an external application (Ext_App). This external application is basically another application being developed by me only where I am planning to have the worker(polling on QueueB) to be deployed in the same external application(Ext_App). Is this the right approach or any problems I might face?

You can have both application communicate via Temporal server. The “orchestration” app that hosts the workflow can just host the workflow itself. Your ext application can host the activity and the activity worker.
There shouldn’t be issue with your workflow invoking an activity on a different task queue (used by your second app).
Take a look at this sample, hope it helps.

Thanks, it clarifies. Just to confirm - E.g If the ext application which is hosting the activity and activity worker is exposing a service, and if the same activity is making a call to service of the same ext application, there should not be any issue…right?

I don’t understand the question fully maybe, but would assume that code in your activity implementation can interact with the application its deployed in. Would help to see your idea visually to understand better.

Yes, above assumption is correct, same was my query. Thanks a lot for the clarification.

I created a sample, and it works fine, when the workflow and the workers are in the same springboot app, when i tried to have the worker in another springboot app, the ui shows that the worker is running, the task is scheduled, the task-queue is the same, yet the worker is not picking the task. What can be the reason of that?

I see one difference:
// register the java workflow
worker.registerWorkflowImplementationTypes(SimpleWorkflowImpl.class);
in the other app there is no workflow registered.

Do I need to register the workflow in the first app, where the activity starts, as a worker? Like this:
worker.registerWorkflowImplementationTypes(Module1WorkFlowImpl.class);

Can you give a bit more info about your two apps? Your worker app has to have the workflow impl (can include as a dependency lib) as it has to register it with the worker.
App that is responsible for starting the executions can only have the workflow interface
or if not possible can start executions using untyped stub.

Do I need to register the workflow in the first app, where the activity starts, as a worker?

Do both apps register workers? Does the activity run on same task queue as the workflow? If so the app that hosts the worker needs to have both the workflow impl and activity registered.