Annotation Type QueryMethod


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface QueryMethod
    Indicates that the method is a query method. Query method can be used to query a workflow state by external process at any time during its execution. This annotation applies only to workflow interface methods.

    Query methods must never change any workflow state including starting activities or block threads in any way.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String name
      Name of the query type.
    • Element Detail

      • name

        java.lang.String name
        Name of the query type. Default is method name.

        Be careful about names that contain special characters. These names can be used as metric tags. And systems like prometheus ignore metrics which have tags with unsupported characters.

        Default:
        ""