You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens because the TestWorkflowImpl class implements two interfaces, TestWorkflow and EcmWorkflow
both having the same "@WorkflowMethod() process" method, since the first extends the second.
The workflow name, in both cases is, "EcmWorkflow::process" so two @WorkflowMethod() are found when cycling on the implemented interfaces even if there is only one!!
The question: is this a wanted behaviour or a bug?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi :-)
I'm trying to build a generic way for starting workflows.
The idea is to have a common interface (EcmWorkflow) that defines all common methods, ie:
and then extends it with the "real" workflows, for example
and
When i try to build the worker with
the exception
java.lang.IllegalStateException: EcmWorkflow::process workflow type is already registered with the worker
is thrown by
POJOWorkflowImplementationFactory#addWorkflowImplementationType:152
that is called by
worker.registerWorkflowImplementationTypes(TestWorkflowImpl.class);
during worker's creation.
This happens because the TestWorkflowImpl class implements two interfaces, TestWorkflow and EcmWorkflow
both having the same "@WorkflowMethod() process" method, since the first extends the second.
The workflow name, in both cases is, "EcmWorkflow::process" so two @WorkflowMethod() are found when cycling on the implemented interfaces even if there is only one!!
The question: is this a wanted behaviour or a bug?
Enzo
Beta Was this translation helpful? Give feedback.
All reactions