Worker tries to pick up wrong flow

WvdL
Fri, 24 Nov 2023 13:43:18 +0000
Community Support

Hi,

Im in the situation that a workers keeps polling a ‘wrong’ flow.
Both are on same namespace, how to avoid/fix this?

WorkflowClientOptions.newBuilder()
                .setNamespace(NAMESPACE_MANUAL_TASKS)
                .build();

Application: DOG
worker config:

        Worker worker = factory.newWorker(DRIVER_TASK_QUEUE);

        worker.registerWorkflowImplementationTypes(DetermineDriverWorkflowImpl.class);
        worker.registerActivitiesImplementations(determineDriverActivities.toArray());

Application: MASS
worker config

        Worker worker = factory.newWorker(MANUAL_TASK_QUEUE);

        worker.registerWorkflowImplementationTypes(ManualTaskWorkFlowImpl.class);
        worker.registerActivitiesImplementations(manualTaskActivities.toArray());

Application: MASS log

WARN 147944 --- [ANUAL_FLOWS": 1] i.t.i.replay.ReplayWorkflowTaskHandler   : Workflow task processing failure. startedEventId=6, WorkflowId=DRIVER-ea04e67f-1b2c-4659-ae6e-783369a71018, RunId=8c681a01-cbc4-4b44-ac3e-fcbd9eaeee4d. If seen continuously the workflow might be stuck.

java.lang.Error: Unknown workflow type "DetermineDriverWorkflow". Known types are [ManualTaskWorkFlow]
	at io.temporal.internal.sync.POJOWorkflowImplementationFactory.getWorkflowDefinition(POJOWorkflowImplementationFactory.java:240) ~[temporal-sdk-1.20.1.jar:na]

3 posts - 2 participants