Class DefaultWorkflowInstanceStatus

java.lang.Object
io.dapr.workflows.runtime.DefaultWorkflowInstanceStatus
All Implemented Interfaces:
WorkflowInstanceStatus

@Deprecated(forRemoval=true) public class DefaultWorkflowInstanceStatus extends Object implements WorkflowInstanceStatus
Deprecated, for removal: This API element is subject to removal in a future version.
Represents a snapshot of a workflow instance's current state, including metadata.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Class constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the workflow instance's creation time in UTC.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the failure details, if any, for the failed workflow instance.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the unique ID of the workflow instance.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the workflow instance's last updated time in UTC.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the name of the workflow.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the current runtime status of the workflow instance at the time this object was fetched.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the workflow instance's serialized input, if any, as a string value.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the workflow instance's serialized output, if any, as a string value.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets a value indicating whether the workflow instance was completed at the time this object was fetched.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets a value indicating whether the workflow instance was running at the time this object was fetched.
    <T> T
    readInputAs(Class<T> type)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deserializes the workflow's input into an object of the specified type.
    <T> T
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deserializes the workflow's output into an object of the specified type.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Generates a user-friendly string representation of the current metadata object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DefaultWorkflowInstanceStatus

      public DefaultWorkflowInstanceStatus(OrchestrationMetadata orchestrationMetadata)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Class constructor.
      Parameters:
      orchestrationMetadata - Durable task orchestration metadata
  • Method Details

    • getName

      public String getName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the name of the workflow.
      Specified by:
      getName in interface WorkflowInstanceStatus
      Returns:
      the name of the workflow
    • getInstanceId

      public String getInstanceId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the unique ID of the workflow instance.
      Specified by:
      getInstanceId in interface WorkflowInstanceStatus
      Returns:
      the unique ID of the workflow instance
    • getRuntimeStatus

      public WorkflowRuntimeStatus getRuntimeStatus()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the current runtime status of the workflow instance at the time this object was fetched.
      Specified by:
      getRuntimeStatus in interface WorkflowInstanceStatus
      Returns:
      the current runtime status of the workflow instance at the time this object was fetched
    • getCreatedAt

      public Instant getCreatedAt()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the workflow instance's creation time in UTC.
      Specified by:
      getCreatedAt in interface WorkflowInstanceStatus
      Returns:
      the workflow instance's creation time in UTC
    • getLastUpdatedAt

      public Instant getLastUpdatedAt()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the workflow instance's last updated time in UTC.
      Specified by:
      getLastUpdatedAt in interface WorkflowInstanceStatus
      Returns:
      the workflow instance's last updated time in UTC
    • getSerializedInput

      public String getSerializedInput()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the workflow instance's serialized input, if any, as a string value.
      Specified by:
      getSerializedInput in interface WorkflowInstanceStatus
      Returns:
      the workflow instance's serialized input or null
    • getSerializedOutput

      public String getSerializedOutput()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the workflow instance's serialized output, if any, as a string value.
      Specified by:
      getSerializedOutput in interface WorkflowInstanceStatus
      Returns:
      the workflow instance's serialized output or null
    • getFailureDetails

      @Nullable public WorkflowFailureDetails getFailureDetails()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the failure details, if any, for the failed workflow instance.

      This method returns data only if the workflow is in the OrchestrationRuntimeStatus.FAILED state, and only if this instance metadata was fetched with the option to include output data.

      Specified by:
      getFailureDetails in interface WorkflowInstanceStatus
      Returns:
      the failure details of the failed workflow instance or null
    • isRunning

      public boolean isRunning()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets a value indicating whether the workflow instance was running at the time this object was fetched.
      Specified by:
      isRunning in interface WorkflowInstanceStatus
      Returns:
      true if the workflow existed and was in a running state otherwise false
    • isCompleted

      public boolean isCompleted()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets a value indicating whether the workflow instance was completed at the time this object was fetched.

      A workflow instance is considered completed when its runtime status value is WorkflowRuntimeStatus.COMPLETED, WorkflowRuntimeStatus.FAILED, or WorkflowRuntimeStatus.TERMINATED.

      Specified by:
      isCompleted in interface WorkflowInstanceStatus
      Returns:
      true if the workflow was in a terminal state; otherwise false
    • readInputAs

      public <T> T readInputAs(Class<T> type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deserializes the workflow's input into an object of the specified type.

      Deserialization is performed using the DataConverter that was configured on the DurableTaskClient object that created this workflow metadata object.

      Specified by:
      readInputAs in interface WorkflowInstanceStatus
      Type Parameters:
      T - the type to deserialize the input data into
      Parameters:
      type - the class associated with the type to deserialize the input data into
      Returns:
      the deserialized input value
      Throws:
      IllegalStateException - if the metadata was fetched without the option to read inputs and outputs
    • readOutputAs

      public <T> T readOutputAs(Class<T> type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deserializes the workflow's output into an object of the specified type.

      Deserialization is performed using the DataConverter that was configured on the DurableTaskClient object that created this workflow metadata object.

      Specified by:
      readOutputAs in interface WorkflowInstanceStatus
      Type Parameters:
      T - the type to deserialize the output data into
      Parameters:
      type - the class associated with the type to deserialize the output data into
      Returns:
      the deserialized input value
      Throws:
      IllegalStateException - if the metadata was fetched without the option to read inputs and outputs
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Generates a user-friendly string representation of the current metadata object.
      Overrides:
      toString in class Object
      Returns:
      a user-friendly string representation of the current metadata object