Hi, I’m looking at the example given in the JavaDocs for the WorkflowInterface annotation. I’ll quote it here:
public interface A {
@SignalMethod
a();
aa();
}
@WorkflowInterface
public interface B extends A {
@SignalMethod
b();
@SignalMethod // must define the type of the inherited method
aa();
}
@WorkflowInterface
public interface C extends B {
@WorkflowMethod
c();
}
@WorkflowInterface
public interface D extends C {
@QueryMethod
String d();
}
public class CImpl implements C {
public void a() {}
public void aa() {}
public void b() {}
public void c() {}
public String d() { return "foo"; }
}
The text below the code says:
When
CImplinstance is registered with theWorkerthe following is registered:
- d query method
The d() query method is declared with the @QueryMethod annotation in interface D. The CImpl class implements interface C, which extends interfaces B and A, but not D. Class CImpl defines a method d() but without a @QueryMethod annotation. Why is d() registered as a query method if CImpl implements an interface that neither declares a @QueryMethod annotated method d() nor extends an interface that does?