Class ActivityInfo
- Namespace
- Temporalio.Activities
- Assembly
- Temporalio.dll
Information about an activity.
public record ActivityInfo : IEquatable<ActivityInfo>
- Inheritance
-
ActivityInfo
- Implements
- Inherited Members
Remarks
WARNING: This constructor may have required properties added. Do not rely on the exact constructor, only use "with" clauses.
Constructors
ActivityInfo(string, string, int, DateTime, DataConverter, IReadOnlyCollection<Payload>, TimeSpan?, bool, Priority, RetryPolicy?, TimeSpan?, DateTime, TimeSpan?, DateTime, string, byte[], string, string, string, string)
Information about an activity.
public ActivityInfo(string ActivityId, string ActivityType, int Attempt, DateTime CurrentAttemptScheduledTime, DataConverter DataConverter, IReadOnlyCollection<Payload> HeartbeatDetails, TimeSpan? HeartbeatTimeout, bool IsLocal, Priority Priority, RetryPolicy? RetryPolicy, TimeSpan? ScheduleToCloseTimeout, DateTime ScheduledTime, TimeSpan? StartToCloseTimeout, DateTime StartedTime, string TaskQueue, byte[] TaskToken, string WorkflowId, string WorkflowNamespace, string WorkflowRunId, string WorkflowType)
Parameters
ActivityIdstringID for the activity.
ActivityTypestringType name for the activity.
AttemptintAttempt the activity is on.
CurrentAttemptScheduledTimeDateTimeWhen the current attempt was scheduled.
DataConverterDataConverterData converter used for heartbeat details.
HeartbeatDetailsIReadOnlyCollection<Payload>Details from the last heartbeat of the last attempt.
HeartbeatTimeoutTimeSpan?Heartbeat timeout set by the caller.
IsLocalboolWhether the activity is a local activity or not.
PriorityPriorityThe Priority of this activity.
RetryPolicyRetryPolicyThe retry policy of this activity.
Note that the server may have set a different policy than the one provided when scheduling the activity. If the value is null, it means the server didn't send information about retry policy (e.g. due to old server version), but it may still be defined server-side.
ScheduleToCloseTimeoutTimeSpan?Schedule to close timeout set by the caller.
ScheduledTimeDateTimeWhen the activity was scheduled.
StartToCloseTimeoutTimeSpan?Start to close timeout set by the caller.
StartedTimeDateTimeWhen the activity started.
TaskQueuestringTask queue this activity is on.
TaskTokenbyte[]Task token uniquely identifying this activity.
WorkflowIdstringWorkflow ID that started this activity.
WorkflowNamespacestringNamespace this activity is on.
WorkflowRunIdstringWorkflow run ID that started this activity.
WorkflowTypestringWorkflow type name that started this activity.
Remarks
WARNING: This constructor may have required properties added. Do not rely on the exact constructor, only use "with" clauses.
Properties
ActivityId
ID for the activity.
public string ActivityId { get; init; }
Property Value
ActivityType
Type name for the activity.
public string ActivityType { get; init; }
Property Value
Attempt
Attempt the activity is on.
public int Attempt { get; init; }
Property Value
CurrentAttemptScheduledTime
When the current attempt was scheduled.
public DateTime CurrentAttemptScheduledTime { get; init; }
Property Value
DataConverter
Data converter used for heartbeat details.
[JsonIgnore]
public DataConverter DataConverter { get; init; }
Property Value
HeartbeatDetails
Details from the last heartbeat of the last attempt.
public IReadOnlyCollection<Payload> HeartbeatDetails { get; init; }
Property Value
HeartbeatTimeout
Heartbeat timeout set by the caller.
public TimeSpan? HeartbeatTimeout { get; init; }
Property Value
IsLocal
Whether the activity is a local activity or not.
public bool IsLocal { get; init; }
Property Value
Priority
The Priority of this activity.
public Priority Priority { get; init; }
Property Value
RetryPolicy
The retry policy of this activity.
Note that the server may have set a different policy than the one provided when scheduling the activity. If the value is null, it means the server didn't send information about retry policy (e.g. due to old server version), but it may still be defined server-side.
public RetryPolicy? RetryPolicy { get; init; }
Property Value
ScheduleToCloseTimeout
Schedule to close timeout set by the caller.
public TimeSpan? ScheduleToCloseTimeout { get; init; }
Property Value
ScheduledTime
When the activity was scheduled.
public DateTime ScheduledTime { get; init; }
Property Value
StartToCloseTimeout
Start to close timeout set by the caller.
public TimeSpan? StartToCloseTimeout { get; init; }
Property Value
StartedTime
When the activity started.
public DateTime StartedTime { get; init; }
Property Value
TaskQueue
Task queue this activity is on.
public string TaskQueue { get; init; }
Property Value
TaskToken
Task token uniquely identifying this activity.
public byte[] TaskToken { get; init; }
Property Value
- byte[]
WorkflowId
Workflow ID that started this activity.
public string WorkflowId { get; init; }
Property Value
WorkflowNamespace
Namespace this activity is on.
public string WorkflowNamespace { get; init; }
Property Value
WorkflowRunId
Workflow run ID that started this activity.
public string WorkflowRunId { get; init; }
Property Value
WorkflowType
Workflow type name that started this activity.
public string WorkflowType { get; init; }
Property Value
Methods
HeartbeatDetailAtAsync<T>(int)
Convert a heartbeat detail at the given index.
public Task<T> HeartbeatDetailAtAsync<T>(int index)
Parameters
indexintIndex of the value.
Returns
- Task<T>
Converted value.
Type Parameters
TType of the value.