Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -10904,6 +10904,18 @@
"rule": {
"$ref": "#/definitions/PauseInfoRule",
"title": "activity was paused by the rule"
},
"pausePolicy": {
"$ref": "#/definitions/PendingActivityInfoPauseInfoPausePolicy"
}
}
},
"PendingActivityInfoPauseInfoPausePolicy": {
"type": "object",
"properties": {
"maxPauseDurationAttempts": {
"type": "integer",
"format": "int32"
}
}
},
Expand Down Expand Up @@ -12173,6 +12185,10 @@
"startDelay": {
"type": "string",
"description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts."
},
"pausePolicy": {
"$ref": "#/definitions/commonV1PausePolicy",
"description": "Policy for pausing the activity execution under specific conditions."
}
}
},
Expand Down Expand Up @@ -13144,6 +13160,15 @@
},
"description": "When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and\nthere is already an existing running workflow, OnConflictOptions defines actions to be taken on\nthe existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent\nhistory event in the running workflow with the changes requested in this object."
},
"commonV1PausePolicy": {
"type": "object",
"properties": {
"maxAttempts": {
"type": "integer",
"format": "int32"
}
}
},
"protobufAny": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -13663,6 +13688,9 @@
"priority": {
"$ref": "#/definitions/v1Priority",
"description": "Priority metadata. If this message is not present, or any fields are not\npresent, they inherit the values from the workflow."
},
"pausePolicy": {
"$ref": "#/definitions/commonV1PausePolicy"
}
}
},
Expand Down
20 changes: 20 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10065,6 +10065,8 @@ components:
description: |-
Priority metadata. If this message is not present, or any fields are not
present, they inherit the values from the workflow.
pausePolicy:
$ref: '#/components/schemas/PausePolicy'
ActivityTaskStartedEventAttributes:
type: object
properties:
Expand Down Expand Up @@ -13697,6 +13699,12 @@ components:
reason:
type: string
description: Reason for pausing the activity.
PauseInfo_PausePolicy:
type: object
properties:
maxPauseDurationAttempts:
type: integer
format: int32
PauseInfo_Rule:
type: object
properties:
Expand All @@ -13709,6 +13717,12 @@ components:
reason:
type: string
description: Reason why rule was created. Populated from rule description.
PausePolicy:
type: object
properties:
maxAttempts:
type: integer
format: int32
PauseWorkflowExecutionRequest:
type: object
properties:
Expand Down Expand Up @@ -13875,6 +13889,8 @@ components:
allOf:
- $ref: '#/components/schemas/PauseInfo_Rule'
description: activity was paused by the rule
pausePolicy:
$ref: '#/components/schemas/PauseInfo_PausePolicy'
PendingChildExecutionInfo:
type: object
properties:
Expand Down Expand Up @@ -16383,6 +16399,10 @@ components:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts.
pausePolicy:
allOf:
- $ref: '#/components/schemas/PausePolicy'
description: Policy for pausing the activity execution under specific conditions.
StartActivityExecutionResponse:
type: object
properties:
Expand Down
1 change: 1 addition & 0 deletions temporal/api/command/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ message ScheduleActivityTaskCommandAttributes {
// Priority metadata. If this message is not present, or any fields are not
// present, they inherit the values from the workflow.
temporal.api.common.v1.Priority priority = 14;
temporal.api.common.v1.PausePolicy pause_policy = 15;
}

message RequestCancelActivityTaskCommandAttributes {
Expand Down
4 changes: 4 additions & 0 deletions temporal/api/common/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ message RetryPolicy {
repeated string non_retryable_error_types = 5;
}

message PausePolicy {
int32 max_attempts = 1;
}

// Metadata relevant for metering purposes
message MeteringMetadata {
// Count of local activities which have begun an execution attempt during this workflow task,
Expand Down
1 change: 1 addition & 0 deletions temporal/api/history/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ message ActivityTaskScheduledEventAttributes {
// Priority metadata. If this message is not present, or any fields are not
// present, they inherit the values from the workflow.
temporal.api.common.v1.Priority priority = 14;
temporal.api.common.v1.PausePolicy pause_policy = 15;
}

message ActivityTaskStartedEventAttributes {
Expand Down
6 changes: 6 additions & 0 deletions temporal/api/workflow/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,19 @@ message PendingActivityInfo {
string reason = 3;
}

message PausePolicy {
int32 max_pause_duration_attempts = 1;
}

oneof paused_by {
// activity was paused by the manual intervention
Manual manual = 2;


// activity was paused by the rule
Rule rule = 4;

PausePolicy pause_policy = 5;
}
}

Expand Down
2 changes: 2 additions & 0 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3169,6 +3169,8 @@ message StartActivityExecutionRequest {
temporal.api.common.v1.OnConflictOptions on_conflict_options = 21;
// Time to wait before dispatching the first activity task. This delay is not applied to retry attempts.
google.protobuf.Duration start_delay = 22;
// Policy for pausing the activity execution under specific conditions.
temporal.api.common.v1.PausePolicy pause_policy = 23;
}

message StartActivityExecutionResponse {
Expand Down
Loading