Table of Contents

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, 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, TimeSpan? ScheduleToCloseTimeout, DateTime ScheduledTime, TimeSpan? StartToCloseTimeout, DateTime StartedTime, string TaskQueue, byte[] TaskToken, string WorkflowId, string WorkflowNamespace, string WorkflowRunId, string WorkflowType)

Parameters

ActivityId string

ID for the activity.

ActivityType string

Type name for the activity.

Attempt int

Attempt the activity is on.

CurrentAttemptScheduledTime DateTime

When the current attempt was scheduled.

DataConverter DataConverter

Data converter used for heartbeat details.

HeartbeatDetails IReadOnlyCollection<Payload>

Details from the last heartbeat of the last attempt.

HeartbeatTimeout TimeSpan?

Heartbeat timeout set by the caller.

IsLocal bool

Whether the activity is a local activity or not.

ScheduleToCloseTimeout TimeSpan?

Schedule to close timeout set by the caller.

ScheduledTime DateTime

When the activity was scheduled.

StartToCloseTimeout TimeSpan?

Start to close timeout set by the caller.

StartedTime DateTime

When the activity started.

TaskQueue string

Task queue this activity is on.

TaskToken byte[]

Task token uniquely identifying this activity.

WorkflowId string

Workflow ID that started this activity.

WorkflowNamespace string

Namespace this activity is on.

WorkflowRunId string

Workflow run ID that started this activity.

WorkflowType string

Workflow 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

string

ActivityType

Type name for the activity.

public string ActivityType { get; init; }

Property Value

string

Attempt

Attempt the activity is on.

public int Attempt { get; init; }

Property Value

int

CurrentAttemptScheduledTime

When the current attempt was scheduled.

public DateTime CurrentAttemptScheduledTime { get; init; }

Property Value

DateTime

DataConverter

Data converter used for heartbeat details.

[JsonIgnore]
public DataConverter DataConverter { get; init; }

Property Value

DataConverter

HeartbeatDetails

Details from the last heartbeat of the last attempt.

public IReadOnlyCollection<Payload> HeartbeatDetails { get; init; }

Property Value

IReadOnlyCollection<Payload>

HeartbeatTimeout

Heartbeat timeout set by the caller.

public TimeSpan? HeartbeatTimeout { get; init; }

Property Value

TimeSpan?

IsLocal

Whether the activity is a local activity or not.

public bool IsLocal { get; init; }

Property Value

bool

ScheduleToCloseTimeout

Schedule to close timeout set by the caller.

public TimeSpan? ScheduleToCloseTimeout { get; init; }

Property Value

TimeSpan?

ScheduledTime

When the activity was scheduled.

public DateTime ScheduledTime { get; init; }

Property Value

DateTime

StartToCloseTimeout

Start to close timeout set by the caller.

public TimeSpan? StartToCloseTimeout { get; init; }

Property Value

TimeSpan?

StartedTime

When the activity started.

public DateTime StartedTime { get; init; }

Property Value

DateTime

TaskQueue

Task queue this activity is on.

public string TaskQueue { get; init; }

Property Value

string

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

string

WorkflowNamespace

Namespace this activity is on.

public string WorkflowNamespace { get; init; }

Property Value

string

WorkflowRunId

Workflow run ID that started this activity.

public string WorkflowRunId { get; init; }

Property Value

string

WorkflowType

Workflow type name that started this activity.

public string WorkflowType { get; init; }

Property Value

string

Methods

HeartbeatDetailAtAsync<T>(int)

Convert a heartbeat detail at the given index.

public Task<T> HeartbeatDetailAtAsync<T>(int index)

Parameters

index int

Index of the value.

Returns

Task<T>

Converted value.

Type Parameters

T

Type of the value.