Class OrchestrationMetadata

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.time.Instant getCreatedAt()
      Gets the orchestration instance's creation time in UTC.
      FailureDetails getFailureDetails()
      Gets the failure details, if any, for the failed orchestration instance.
      java.lang.String getInstanceId()
      Gets the unique ID of the orchestration instance.
      java.time.Instant getLastUpdatedAt()
      Gets the orchestration instance's last updated time in UTC.
      java.lang.String getName()
      Gets the name of the orchestration.
      OrchestrationRuntimeStatus getRuntimeStatus()
      Gets the current runtime status of the orchestration instance at the time this object was fetched.
      java.lang.String getSerializedInput()
      Gets the orchestration instance's serialized input, if any, as a string value.
      java.lang.String getSerializedOutput()
      Gets the orchestration instance's serialized output, if any, as a string value.
      boolean isCompleted()
      Gets a value indicating whether the orchestration instance was completed at the time this object was fetched.
      boolean isCustomStatusFetched()
      Returns true if the orchestration has a non-empty custom status value; otherwise false.
      boolean isInstanceFound()
      Returns true if an orchestration instance with this ID was found; otherwise false.
      boolean isRunning()
      Gets a value indicating whether the orchestration instance was running at the time this object was fetched.
      <T> T readCustomStatusAs​(java.lang.Class<T> type)
      Deserializes the orchestration's custom status into an object of the specified type.
      <T> T readInputAs​(java.lang.Class<T> type)
      Deserializes the orchestration's input into an object of the specified type.
      <T> T readOutputAs​(java.lang.Class<T> type)
      Deserializes the orchestration's output into an object of the specified type.
      java.lang.String toString()
      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
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the orchestration.
        Returns:
        the name of the orchestration
      • getInstanceId

        public java.lang.String getInstanceId()
        Gets the unique ID of the orchestration instance.
        Returns:
        the unique ID of the orchestration instance
      • getRuntimeStatus

        public OrchestrationRuntimeStatus getRuntimeStatus()
        Gets the current runtime status of the orchestration instance at the time this object was fetched.
        Returns:
        the current runtime status of the orchestration instance at the time this object was fetched
      • getCreatedAt

        public java.time.Instant getCreatedAt()
        Gets the orchestration instance's creation time in UTC.
        Returns:
        the orchestration instance's creation time in UTC
      • getLastUpdatedAt

        public java.time.Instant getLastUpdatedAt()
        Gets the orchestration instance's last updated time in UTC.
        Returns:
        the orchestration instance's last updated time in UTC
      • getSerializedInput

        public java.lang.String getSerializedInput()
        Gets the orchestration instance's serialized input, if any, as a string value.
        Returns:
        the orchestration instance's serialized input or null
      • getSerializedOutput

        public java.lang.String getSerializedOutput()
        Gets the orchestration instance's serialized output, if any, as a string value.
        Returns:
        the orchestration instance's serialized output or null
      • getFailureDetails

        public FailureDetails getFailureDetails()
        Gets the failure details, if any, for the failed orchestration instance.

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

        Returns:
        the failure details of the failed orchestration instance or null
      • isRunning

        public boolean isRunning()
        Gets a value indicating whether the orchestration instance was running at the time this object was fetched.
        Returns:
        true if the orchestration existed and was in a running state; otherwise false
      • readInputAs

        public <T> T readInputAs​(java.lang.Class<T> type)
        Deserializes the orchestration'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 orchestration 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:
        java.lang.IllegalStateException - if the metadata was fetched without the option to read inputs and outputs
      • readOutputAs

        public <T> T readOutputAs​(java.lang.Class<T> type)
        Deserializes the orchestration'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 orchestration 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:
        java.lang.IllegalStateException - if the metadata was fetched without the option to read inputs and outputs
      • readCustomStatusAs

        public <T> T readCustomStatusAs​(java.lang.Class<T> type)
        Deserializes the orchestration's custom status into an object of the specified type.

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

        Type Parameters:
        T - the type to deserialize the custom status data into
        Parameters:
        type - the class associated with the type to deserialize the custom status data into
        Returns:
        the deserialized input value
        Throws:
        java.lang.IllegalStateException - if the metadata was fetched without the option to read inputs and outputs
      • isCustomStatusFetched

        public boolean isCustomStatusFetched()
        Returns true if the orchestration has a non-empty custom status value; otherwise false.

        This method will always return false if the metadata was fetched without the option to read inputs and outputs

        Returns:
        true if the orchestration has a non-empty custom status value; otherwise false
      • toString

        public java.lang.String toString()
        Generates a user-friendly string representation of the current metadata object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a user-friendly string representation of the current metadata object
      • isInstanceFound

        public boolean isInstanceFound()
        Returns true if an orchestration instance with this ID was found; otherwise false.
        Returns:
        true if an orchestration instance with this ID was found; otherwise false