Class Context

java.lang.Object
io.iworkflow.core.Context

@Immutable public abstract class Context extends Object
  • Constructor Details

    • Context

      public Context()
  • Method Details

    • getWorkflowStartTimestampSeconds

      public abstract Long getWorkflowStartTimestampSeconds()
    • getStateExecutionId

      public abstract Optional<String> getStateExecutionId()
      Returns:
      the StateExecutionId. Only applicable for state methods (waitUntil or execute)
    • getWorkflowRunId

      public abstract String getWorkflowRunId()
    • getWorkflowId

      public abstract String getWorkflowId()
    • getWorkflowType

      public abstract String getWorkflowType()
    • getFirstAttemptTimestampSeconds

      public abstract Optional<Long> getFirstAttemptTimestampSeconds()
      Returns:
      the start time of the first attempt of the state method invocation. Only applicable for state methods (waitUntil or execute)
    • getAttempt

      public abstract Optional<Integer> getAttempt()
      Returns:
      attempt starts from 1, and increased by 1 for every retry if retry policy is specified.
    • getChildWorkflowRequestId

      public abstract Optional<String> getChildWorkflowRequestId()
      Returns:
      the requestId that is used to start the child workflow from state method. Only applicable for state methods (waitUntil or execute)