Package io.dapr.workflows.client

# Interface WorkflowInstanceStatus

All Known Implementing Classes:
  `DefaultWorkflowInstanceStatus`

@Deprecated(forRemoval=true) public interface WorkflowInstanceStatus
Deprecated, for removal: This API element is subject to removal in a future version.
Use `WorkflowState` instead.
Represents a snapshot of a workflow instance's current state, including metadata.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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.
  `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.
  `String`
  `getInstanceId()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Gets the unique ID of the workflow instance.
  `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.
  `String`
  `getName()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Gets the name of the workflow.
  `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.
  `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.
  `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.
  `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.
  `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.
  `<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`
  `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.

- ## Method Details

  - ### getName

    String getName()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the name of the workflow.
    Returns:
      the name of the workflow

  - ### getInstanceId

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

  - ### getRuntimeStatus

    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.
    Returns:
      the current runtime status of the workflow instance at the time this object was fetched

  - ### getCreatedAt

    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.
    Returns:
      the workflow instance's creation time in UTC

  - ### getLastUpdatedAt

    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.
    Returns:
      the workflow instance's last updated time in UTC

  - ### getSerializedInput

    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.
    Returns:
      the workflow instance's serialized input or `null`

  - ### getSerializedOutput

    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.
    Returns:
      the workflow instance's serialized output or `null`

  - ### getFailureDetails

    @Nullable 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 `WorkflowFailureDetails` failureDetails, and only if this instance metadata was fetched with the option to include output data.

    Returns:
      the failure details of the failed workflow instance or `null`

  - ### isRunning

    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.
    Returns:
      `true` if the workflow existed and was in a running state otherwise `false`

  - ### isCompleted

    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`.

    Returns:
      `true` if the workflow was in a terminal state; otherwise `false`

  - ### readInputAs

    <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.

    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

    <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.

    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