Skip to content
Open
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
60 changes: 41 additions & 19 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -10466,6 +10466,10 @@
"$ref": "#/definitions/apiCommonV1Link"
},
"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."
},
"onConflictOptions": {
"$ref": "#/definitions/apiCommonV1OnConflictOptions",
"description": "Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING."
}
}
},
Expand Down Expand Up @@ -10620,7 +10624,7 @@
"description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions."
},
"onConflictOptions": {
"$ref": "#/definitions/v1OnConflictOptions",
"$ref": "#/definitions/apiWorkflowV1OnConflictOptions",
"description": "Defines actions to be done to the existing running workflow when the conflict policy\nWORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set (ie., nil value) or set to a\nempty object (ie., all options with default value), it won't do anything to the existing\nrunning workflow. If set, it will add a history event to the running workflow."
},
"priority": {
Expand Down Expand Up @@ -11177,6 +11181,24 @@
},
"description": "Common callback information. Specific CallbackInfo messages should embed this and may include additional fields."
},
"apiCommonV1OnConflictOptions": {
"type": "object",
"properties": {
"attachRequestId": {
"type": "boolean",
"description": "Attaches the request ID to the running execution."
},
"attachCompletionCallbacks": {
"type": "boolean",
"description": "Attaches the completion callbacks to the running execution."
},
"attachLinks": {
"type": "boolean",
"description": "Attaches the links to the running execution."
}
},
"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."
},
"apiWorkflowV1CallbackInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -11230,6 +11252,24 @@
}
}
},
"apiWorkflowV1OnConflictOptions": {
"type": "object",
"properties": {
"attachRequestId": {
"type": "boolean",
"description": "Attaches the request ID to the running workflow."
},
"attachCompletionCallbacks": {
"type": "boolean",
"description": "Attaches the completion callbacks to the running workflow."
},
"attachLinks": {
"type": "boolean",
"description": "Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event."
}
},
"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."
},
"protobufAny": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -14926,24 +14966,6 @@
},
"description": "Nexus operation timed out."
},
"v1OnConflictOptions": {
"type": "object",
"properties": {
"attachRequestId": {
"type": "boolean",
"description": "Attaches the request ID to the running workflow."
},
"attachCompletionCallbacks": {
"type": "boolean",
"description": "Attaches the completion callbacks to the running workflow."
},
"attachLinks": {
"type": "boolean",
"description": "Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event."
}
},
"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."
},
"v1Outcome": {
"type": "object",
"properties": {
Expand Down
16 changes: 9 additions & 7 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11726,18 +11726,16 @@ components:
properties:
attachRequestId:
type: boolean
description: Attaches the request ID to the running workflow.
description: Attaches the request ID to the running execution.
attachCompletionCallbacks:
type: boolean
description: Attaches the completion callbacks to the running workflow.
description: Attaches the completion callbacks to the running execution.
attachLinks:
type: boolean
description: Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event.
description: Attaches the links to the running execution.
description: |-
When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and
there is already an existing running workflow, OnConflictOptions defines actions to be taken on
the existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent
history event in the running workflow with the changes requested in this object.
When starting an execution with a conflict policy that uses an existing execution and there is already an existing
running execution, OnConflictOptions defines actions to be taken on the existing running execution.
Outcome:
type: object
properties:
Expand Down Expand Up @@ -14325,6 +14323,10 @@ components:
description: |-
Links to be associated with the activity. Callbacks may also have associated links;
links already included with a callback should not be duplicated here.
onConflictOptions:
allOf:
- $ref: '#/components/schemas/OnConflictOptions'
description: Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING.
StartActivityExecutionResponse:
type: object
properties:
Expand Down
11 changes: 11 additions & 0 deletions temporal/api/common/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,14 @@ message WorkerSelector {
string worker_instance_key = 1;
}
}

// When starting an execution with a conflict policy that uses an existing execution and there is already an existing
// running execution, OnConflictOptions defines actions to be taken on the existing running execution.
message OnConflictOptions {
// Attaches the request ID to the running execution.
bool attach_request_id = 1;
// Attaches the completion callbacks to the running execution.
bool attach_completion_callbacks = 2;
// Attaches the links to the running execution.
bool attach_links = 3;
}
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 @@ -2937,6 +2937,8 @@ message StartActivityExecutionRequest {
// Links to be associated with the activity. Callbacks may also have associated links;
// links already included with a callback should not be duplicated here.
repeated temporal.api.common.v1.Link links = 20;
// Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING.
temporal.api.common.v1.OnConflictOptions on_conflict_options = 21;
}

message StartActivityExecutionResponse {
Expand Down
Loading