ActivityContext
in package
FinalYes
Activity attempt metadata and heartbeat/cancellation support.
Table of Contents
Properties
- $activityAttemptId : string
- $activityExecutionId : string|null
- Logical execution from the claim, never inferred from task/attempt identity.
- $activityType : string
- $attemptNumber : int
- $leaseOwner : string
- $retryInfo : ActivityRetryInfo
- $runId : string|null
- Original run_id from the public claim; unavailable legacy identity stays null.
- $taskId : string
- $workflowId : string|null
- Original workflow_id from the public claim, or known parent local task.
- $client : Client
- $heartbeatRequest : Closure|null
- $localHeartbeat : Closure|null
Methods
- __construct() : mixed
- heartbeat() : void
- receivedIdentity() : string|null
Properties
$activityAttemptId read-only
public
string
$activityAttemptId
$activityExecutionId read-only
Logical execution from the claim, never inferred from task/attempt identity.
public
string|null
$activityExecutionId
$activityType read-only
public
string
$activityType
$attemptNumber read-only
public
int
$attemptNumber
$leaseOwner read-only
public
string
$leaseOwner
$retryInfo read-only
public
ActivityRetryInfo
$retryInfo
$runId read-only
Original run_id from the public claim; unavailable legacy identity stays null.
public
string|null
$runId
$taskId read-only
public
string
$taskId
$workflowId read-only
Original workflow_id from the public claim, or known parent local task.
public
string|null
$workflowId
$client read-only
private
Client
$client
$heartbeatRequest read-only
private
Closure|null
$heartbeatRequest
= null
$localHeartbeat read-only
private
Closure|null
$localHeartbeat
= null
Methods
__construct()
public
__construct(Client $client, string $taskId, string $activityAttemptId, string $leaseOwner, string $activityType, int $attemptNumber[, Closure|null $localHeartbeat = null ][, callable(array<string|int, mixed>): array<string, mixed>|null $heartbeatRequest = null ][, array<string, mixed> $taskMetadata = [] ]) : mixed
Parameters
- $client : Client
- $taskId : string
- $activityAttemptId : string
- $leaseOwner : string
- $activityType : string
- $attemptNumber : int
- $localHeartbeat : Closure|null = null
- $heartbeatRequest : callable(array<string|int, mixed>): array<string, mixed>|null = null
- $taskMetadata : array<string, mixed> = []
-
Received claim metadata; omitted for Server-free tests.
heartbeat()
public
heartbeat([array<string|int, mixed> $details = [] ]) : void
Parameters
- $details : array<string|int, mixed> = []
receivedIdentity()
private
static receivedIdentity(mixed $value) : string|null
Parameters
- $value : mixed