Skip to content

Commit 6d31a0c

Browse files
committed
refactor to common
1 parent 6fc2d65 commit 6d31a0c

5 files changed

Lines changed: 36 additions & 38 deletions

File tree

openapi/openapiv2.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10468,7 +10468,7 @@
1046810468
"description": "Links to be associated with the activity. Callbacks may also have associated links;\nlinks already included with a callback should not be duplicated here."
1046910469
},
1047010470
"onConflictOptions": {
10471-
"$ref": "#/definitions/apiActivityV1OnConflictOptions",
10471+
"$ref": "#/definitions/apiCommonV1OnConflictOptions",
1047210472
"description": "Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING."
1047310473
}
1047410474
}
@@ -11139,24 +11139,6 @@
1113911139
}
1114011140
}
1114111141
},
11142-
"apiActivityV1OnConflictOptions": {
11143-
"type": "object",
11144-
"properties": {
11145-
"attachRequestId": {
11146-
"type": "boolean",
11147-
"description": "Attaches the request ID to the running activity."
11148-
},
11149-
"attachCompletionCallbacks": {
11150-
"type": "boolean",
11151-
"description": "Attaches the completion callbacks to the running activity."
11152-
},
11153-
"attachLinks": {
11154-
"type": "boolean",
11155-
"description": "Attaches the links to the running activity."
11156-
}
11157-
},
11158-
"description": "When StartActivityExecution uses the conflict policy ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING and\nthere is already an existing running activity, OnConflictOptions defines actions to be taken on\nthe existing running activity."
11159-
},
1116011142
"apiCallbackV1CallbackInfo": {
1116111143
"type": "object",
1116211144
"properties": {
@@ -11199,6 +11181,24 @@
1119911181
},
1120011182
"description": "Common callback information. Specific CallbackInfo messages should embed this and may include additional fields."
1120111183
},
11184+
"apiCommonV1OnConflictOptions": {
11185+
"type": "object",
11186+
"properties": {
11187+
"attachRequestId": {
11188+
"type": "boolean",
11189+
"description": "Attaches the request ID to the running execution."
11190+
},
11191+
"attachCompletionCallbacks": {
11192+
"type": "boolean",
11193+
"description": "Attaches the completion callbacks to the running execution."
11194+
},
11195+
"attachLinks": {
11196+
"type": "boolean",
11197+
"description": "Attaches the links to the running execution."
11198+
}
11199+
},
11200+
"description": "When starting an execution with a conflict policy that uses an existing execution and there is already an existing\nrunning execution, OnConflictOptions defines actions to be taken on the existing running execution."
11201+
},
1120211202
"apiWorkflowV1CallbackInfo": {
1120311203
"type": "object",
1120411204
"properties": {

openapi/openapiv3.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11726,17 +11726,16 @@ components:
1172611726
properties:
1172711727
attachRequestId:
1172811728
type: boolean
11729-
description: Attaches the request ID to the running activity.
11729+
description: Attaches the request ID to the running execution.
1173011730
attachCompletionCallbacks:
1173111731
type: boolean
11732-
description: Attaches the completion callbacks to the running activity.
11732+
description: Attaches the completion callbacks to the running execution.
1173311733
attachLinks:
1173411734
type: boolean
11735-
description: Attaches the links to the running activity.
11735+
description: Attaches the links to the running execution.
1173611736
description: |-
11737-
When StartActivityExecution uses the conflict policy ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING and
11738-
there is already an existing running activity, OnConflictOptions defines actions to be taken on
11739-
the existing running activity.
11737+
When starting an execution with a conflict policy that uses an existing execution and there is already an existing
11738+
running execution, OnConflictOptions defines actions to be taken on the existing running execution.
1174011739
Outcome:
1174111740
type: object
1174211741
properties:

temporal/api/activity/v1/message.proto

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,18 +200,6 @@ message ActivityExecutionListInfo {
200200
google.protobuf.Duration execution_duration = 11;
201201
}
202202

203-
// When StartActivityExecution uses the conflict policy ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING and
204-
// there is already an existing running activity, OnConflictOptions defines actions to be taken on
205-
// the existing running activity.
206-
message OnConflictOptions {
207-
// Attaches the request ID to the running activity.
208-
bool attach_request_id = 1;
209-
// Attaches the completion callbacks to the running activity.
210-
bool attach_completion_callbacks = 2;
211-
// Attaches the links to the running activity.
212-
bool attach_links = 3;
213-
}
214-
215203
// CallbackInfo contains the state of an attached activity callback.
216204
message CallbackInfo {
217205
// Trigger for when the activity is closed.

temporal/api/common/v1/message.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,3 +363,14 @@ message WorkerSelector {
363363
string worker_instance_key = 1;
364364
}
365365
}
366+
367+
// When starting an execution with a conflict policy that uses an existing execution and there is already an existing
368+
// running execution, OnConflictOptions defines actions to be taken on the existing running execution.
369+
message OnConflictOptions {
370+
// Attaches the request ID to the running execution.
371+
bool attach_request_id = 1;
372+
// Attaches the completion callbacks to the running execution.
373+
bool attach_completion_callbacks = 2;
374+
// Attaches the links to the running execution.
375+
bool attach_links = 3;
376+
}

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2938,7 +2938,7 @@ message StartActivityExecutionRequest {
29382938
// links already included with a callback should not be duplicated here.
29392939
repeated temporal.api.common.v1.Link links = 20;
29402940
// Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING.
2941-
temporal.api.activity.v1.OnConflictOptions on_conflict_options = 21;
2941+
temporal.api.common.v1.OnConflictOptions on_conflict_options = 21;
29422942
}
29432943

29442944
message StartActivityExecutionResponse {

0 commit comments

Comments
 (0)