Interface WorkflowCaller

All Superinterfaces:
Comparable<WorkflowCaller>
All Known Implementing Classes:
ImmutableWorkflowCaller

public interface WorkflowCaller extends Comparable<WorkflowCaller>
Represents a caller in the yWorkflow system. A caller is typically a user, system, or service that interacts with workflow instances. The caller identity is used for access control, audit trails, and determining available capabilities.

WorkflowCaller instances are immutable and can be compared for equality and ordering. They support both named callers (with a specific identity) and anonymous callers.

Since:
1.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final WorkflowCaller
    An empty caller instance with an empty string value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new anonymous WorkflowCaller instance with no identity.
    caller(String caller)
    Creates a new WorkflowCaller instance with the specified caller identity.
    Returns the optional string value representing the caller's identity.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Field Details

    • EMPTY

      static final WorkflowCaller EMPTY
      An empty caller instance with an empty string value.
  • Method Details

    • value

      Optional<String> value()
      Returns the optional string value representing the caller's identity.
      Returns:
      an Optional containing the caller identity if present, empty for anonymous callers
    • caller

      static WorkflowCaller caller(String caller)
      Creates a new WorkflowCaller instance with the specified caller identity.
      Parameters:
      caller - the caller identity string
      Returns:
      a new WorkflowCaller instance
    • anonymous

      static WorkflowCaller anonymous()
      Creates a new anonymous WorkflowCaller instance with no identity.
      Returns:
      a new anonymous WorkflowCaller instance