syntax = "proto3"; /** * Definitions of the different activity tasks returned from [crate::Core::poll_task]. */ package coresdk.activity_task; import "common.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; message ActivityTask { // A unique identifier for this task bytes task_token = 1; string activity_id = 2; oneof variant { // Start activity execution. Start start = 3; // Attempt to cancel activity execution. Cancel cancel = 4; } } /// Begin executing an activity message Start { string workflow_namespace = 1; /// The workflow's type name or function identifier string workflow_type = 2; common.WorkflowExecution workflow_execution = 3; /// The activity's type name or function identifier string activity_type = 4; map header_fields = 5; /// Arguments to the activity repeated common.Payload input = 6; repeated common.Payload heartbeat_details = 7; google.protobuf.Timestamp scheduled_time = 8; google.protobuf.Timestamp current_attempt_scheduled_time = 9; google.protobuf.Timestamp started_time = 10; int32 attempt = 11; google.protobuf.Duration schedule_to_close_timeout = 12; google.protobuf.Duration start_to_close_timeout = 13; google.protobuf.Duration heartbeat_timeout = 14; /// This is an actual retry policy the service uses. It can be different from the one provided /// (or not) during activity scheduling as the service can override the provided one in case its /// values are not specified or exceed configured system limits. common.RetryPolicy retry_policy = 15; } /// Attempt to cancel a running activity message Cancel { // TODO: add attributes }