Class ActivityExecutionDescription
java.lang.Object
io.temporal.client.ActivityExecutionMetadata
io.temporal.client.ActivityExecutionDescription
Detailed information about a standalone activity execution, returned by
UntypedActivityHandle.describe().-
Constructor Summary
ConstructorsConstructorDescriptionActivityExecutionDescription(io.temporal.api.workflowservice.v1.DescribeActivityExecutionResponse response, DataConverter dataConverter, String namespace) -
Method Summary
Modifier and TypeMethodDescriptionintCurrent attempt number (starts at 1).Reason that was provided when cancellation was requested.Current or next retry interval.Time the first activity task was made available for dispatch.When the activity will time out (scheduled time + scheduleToCloseTimeout).The details recorded by the last heartbeat, as lazily-decoded values.Maximum allowed time between heartbeats.getInput()The activity's input arguments, as lazily-decoded values, one per argument.Time the last attempt completed (succeeded or failed).Failure details from the last failed attempt.Time the last heartbeat was recorded.Time the last attempt was started.Identity of the worker that last processed this activity.Time when the next retry attempt will be scheduled.The failure the activity closed with, as an exception.Priority hint for this activity.io.temporal.api.activity.v1.ActivityExecutionInfoThe raw protobuf info returned by the server for this activity execution.io.temporal.api.workflowservice.v1.DescribeActivityExecutionResponseUnderlying proto response.<V> Optional<V> Deserializes the activity's success result.<V> Optional<V> Deserializes the activity's success result into the given generic type.Retry policy for this activity.io.temporal.api.enums.v1.PendingActivityStateDetailed run state (e.g.Total time the caller is willing to wait for the activity to complete, including retries.Maximum time the task may wait in the task queue.Delay before the first activity task is made available for dispatch.Maximum time for a single attempt.Fixed details set when the activity was started.Fixed summary set when the activity was started.longThe deployment version of the worker that last processed this activity.booleanWhether heartbeat details were recorded for the last attempt.booleanhasInput()Whether the activity's input is present.booleanWhether a failure from a failed attempt is present.booleanWhether the activity closed with a successful result.Methods inherited from class io.temporal.client.ActivityExecutionMetadata
equals, fromListInfo, getActivityId, getActivityRunId, getActivityType, getCloseTime, getExecutionDuration, getRawListInfo, getScheduledTime, getSearchAttributes, getStatus, getTaskQueue, hashCode, toString
-
Constructor Details
-
ActivityExecutionDescription
public ActivityExecutionDescription(io.temporal.api.workflowservice.v1.DescribeActivityExecutionResponse response, DataConverter dataConverter, String namespace)
-
-
Method Details
-
getRawResponse
@Nonnull public io.temporal.api.workflowservice.v1.DescribeActivityExecutionResponse getRawResponse()Underlying proto response. Exposed while the standalone activity surface is experimental. -
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). -
getTotalHeartbeatCount
public long getTotalHeartbeatCount()- Returns:
- total number of heartbeats recorded across all attempts.
-
getCanceledReason
Reason that was provided when cancellation was requested.nullif not cancelled or no reason was given. -
getCurrentRetryInterval
Current or next retry interval.nullif no retries are configured or allowed. -
getExpirationTime
When the activity will time out (scheduled time + scheduleToCloseTimeout). -
getHeartbeatTimeout
Maximum allowed time between heartbeats. -
getLastAttemptCompleteTime
Time the last attempt completed (succeeded or failed). -
getLastHeartbeatTime
Time the last heartbeat was recorded. -
getLastStartedTime
Time the last attempt was started. -
getExecutionTime
Time the first activity task was made available for dispatch. Computed asschedule_time + start_delay; equalsschedule_timewhen no start delay is set. -
getStartDelay
Delay before the first activity task is made available for dispatch. Not applied to retry attempts.nullif no start delay is set. -
hasLastFailure
public boolean hasLastFailure()Whether a failure from a failed attempt is present.falsewhen the activity has no failed attempt, and also when the description was requested withoutDescribeActivityOptions.Builder.setIncludeLastFailure(boolean). -
getLastFailure
Failure details from the last failed attempt.nullif no failure has occurred. -
getLastWorkerIdentity
Identity of the worker that last processed this activity. -
getNextAttemptScheduleTime
Time when the next retry attempt will be scheduled. -
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 whenActivityExecutionMetadata.getStatus()isActivityExecutionStatus.ACTIVITY_EXECUTION_STATUS_RUNNING. -
getScheduleToCloseTimeout
Total time the caller is willing to wait for the activity to complete, including retries. -
getScheduleToStartTimeout
Maximum time the task may wait in the task queue. -
getStartToCloseTimeout
Maximum time for a single attempt. -
hasHeartbeatDetails
public boolean hasHeartbeatDetails()Whether heartbeat details were recorded for the last attempt.falsewhen the activity recorded none, and also when the description was requested withoutDescribeActivityOptions.Builder.setIncludeHeartbeatDetails(boolean). -
getHeartbeatDetails
The details recorded by the last heartbeat, as lazily-decoded values. Empty (size 0) when no heartbeat details are present, either because none were recorded or because the description was requested withoutDescribeActivityOptions.Builder.setIncludeHeartbeatDetails(boolean). -
hasInput
public boolean hasInput()Whether the activity's input is present.falseunless the description was requested withDescribeActivityOptions.Builder.setIncludeInput(boolean). -
getInput
The activity's input arguments, as lazily-decoded values, one per argument. Empty (size 0) when no input is present, either because the activity took no arguments or because the description was requested withoutDescribeActivityOptions.Builder.setIncludeInput(boolean). -
hasResult
public boolean hasResult()Whether the activity closed with a successful result.falsewhile the activity is still running, when it closed with a failure, or when the description was requested withoutDescribeActivityOptions.Builder.setIncludeOutcome(boolean). -
getResult
Deserializes the activity's success result. ReturnsOptional.empty()if no result is present (activity still running, closed with a failure, orincludeOutcomewas false).- Parameters:
valueType- the class to deserialize the result into
-
getResult
Deserializes the activity's success result into the given generic type. ReturnsOptional.empty()if no result is present.- Parameters:
valueType- the class to deserialize the result intogenericType- the generic type for deserialization; may equalvalueType
-
getOutcomeFailure
The failure the activity closed with, as an exception.nullif the activity did not close with a failure or ifincludeOutcomewas false on the describe call.This is the terminal outcome;
getLastFailure()is the failure of the most recent attempt, which may be set while the activity is still retrying. -
getWorkerDeploymentVersion
The deployment version of the worker that last processed this activity.nullif not available. -
getPriority
Priority hint for this activity.nullif not set. -
getSummary
Fixed summary set when the activity was started. Decoded from UserMetadata on each call; cache the result if called multiple times. -
getStaticDetails
Fixed details set when the activity was started. Decoded from UserMetadata on each call; cache the result if called multiple times.
-