Class ActivityExecutionDescription

java.lang.Object
io.temporal.client.ActivityExecutionMetadata
io.temporal.client.ActivityExecutionDescription

@Experimental public final class ActivityExecutionDescription extends ActivityExecutionMetadata
Detailed information about a standalone activity execution, returned by UntypedActivityHandle.describe().
  • Constructor Details

    • ActivityExecutionDescription

      public ActivityExecutionDescription(io.temporal.api.activity.v1.ActivityExecutionInfo info, DataConverter dataConverter, String namespace)
  • Method Details

    • getRawInfo

      @Nonnull public io.temporal.api.activity.v1.ActivityExecutionInfo getRawInfo()
      The raw protobuf info returned by the server for this activity execution.
    • getAttempt

      public int getAttempt()
      Current attempt number (starts at 1).
    • getCanceledReason

      @Nullable public String getCanceledReason()
      Reason that was provided when cancellation was requested. null if not cancelled or no reason was given.
    • getCurrentRetryInterval

      @Nullable public Duration getCurrentRetryInterval()
      Current or next retry interval. null if no retries are configured or allowed.
    • getExpirationTime

      @Nullable public Instant getExpirationTime()
      When the activity will time out (scheduled time + scheduleToCloseTimeout).
    • getHeartbeatTimeout

      @Nullable public Duration getHeartbeatTimeout()
      Maximum allowed time between heartbeats.
    • getLastAttemptCompleteTime

      @Nullable public Instant getLastAttemptCompleteTime()
      Time the last attempt completed (succeeded or failed).
    • getLastHeartbeatTime

      @Nullable public Instant getLastHeartbeatTime()
      Time the last heartbeat was recorded.
    • getLastStartedTime

      @Nullable public Instant getLastStartedTime()
      Time the last attempt was started.
    • getLastFailure

      @Nullable public Exception getLastFailure()
      Failure details from the last failed attempt. null if no failure has occurred.
    • getLastWorkerIdentity

      @Nullable public String getLastWorkerIdentity()
      Identity of the worker that last processed this activity.
    • getNextAttemptScheduleTime

      @Nullable public Instant getNextAttemptScheduleTime()
      Time when the next retry attempt will be scheduled.
    • getRetryOptions

      @Nullable public RetryOptions getRetryOptions()
      Retry policy for this activity.
    • getRunState

      @Nonnull public io.temporal.api.enums.v1.PendingActivityState getRunState()
      Detailed run state (e.g. scheduled, started, backing off). Only meaningful when ActivityExecutionMetadata.getStatus() is ActivityExecutionStatus.ACTIVITY_EXECUTION_STATUS_RUNNING.
    • getScheduleToCloseTimeout

      @Nullable public Duration getScheduleToCloseTimeout()
      Total time the caller is willing to wait for the activity to complete, including retries.
    • getScheduleToStartTimeout

      @Nullable public Duration getScheduleToStartTimeout()
      Maximum time the task may wait in the task queue.
    • getStartToCloseTimeout

      @Nullable public Duration getStartToCloseTimeout()
      Maximum time for a single attempt.
    • hasHeartbeatDetails

      public boolean hasHeartbeatDetails()
      Whether heartbeat details were recorded for the last attempt.
    • getHeartbeatDetails

      public <V> Optional<V> getHeartbeatDetails(Class<V> valueType)
      Deserializes the last heartbeat details into the given type. Returns Optional.empty() if no heartbeat details are present.
      Parameters:
      valueType - the class to deserialize the heartbeat details into
    • getHeartbeatDetails

      public <V> Optional<V> getHeartbeatDetails(Class<V> valueType, Type genericType)
      Deserializes the last heartbeat details into the given generic type. Returns Optional.empty() if no heartbeat details are present.
      Parameters:
      valueType - the class to deserialize the heartbeat details into
      genericType - the generic type for deserialization; may equal valueType
    • getWorkerDeploymentVersion

      @Nullable public WorkerDeploymentVersion getWorkerDeploymentVersion()
      The deployment version of the worker that last processed this activity. null if not available.
    • getPriority

      @Nullable public Priority getPriority()
      Priority hint for this activity. null if not set.
    • getStaticSummary

      @Nullable public String getStaticSummary()
      Fixed summary set when the activity was started. Decoded from UserMetadata on each call; cache the result if called multiple times.
    • getStaticDetails

      @Nullable public String getStaticDetails()
      Fixed details set when the activity was started. Decoded from UserMetadata on each call; cache the result if called multiple times.