|
9041 | 9041 | } |
9042 | 9042 | }, |
9043 | 9043 | "definitions": { |
9044 | | - "CallbackInfoTrigger": { |
| 9044 | + "CallbackInfoActivityClosed": { |
9045 | 9045 | "type": "object", |
9046 | | - "properties": { |
9047 | | - "workflowClosed": { |
9048 | | - "$ref": "#/definitions/CallbackInfoWorkflowClosed" |
9049 | | - } |
9050 | | - } |
| 9046 | + "description": "Trigger for when the activity is closed." |
9051 | 9047 | }, |
9052 | 9048 | "CallbackInfoWorkflowClosed": { |
9053 | 9049 | "type": "object", |
|
9156 | 9152 | }, |
9157 | 9153 | "description": "Target a worker polling on a Nexus task queue in a specific namespace." |
9158 | 9154 | }, |
| 9155 | + "LinkActivity": { |
| 9156 | + "type": "object", |
| 9157 | + "properties": { |
| 9158 | + "namespace": { |
| 9159 | + "type": "string" |
| 9160 | + }, |
| 9161 | + "activityId": { |
| 9162 | + "type": "string" |
| 9163 | + }, |
| 9164 | + "runId": { |
| 9165 | + "type": "string" |
| 9166 | + } |
| 9167 | + }, |
| 9168 | + "description": "A link to an activity." |
| 9169 | + }, |
9159 | 9170 | "LinkBatchJob": { |
9160 | 9171 | "type": "object", |
9161 | 9172 | "properties": { |
|
10437 | 10448 | "priority": { |
10438 | 10449 | "$ref": "#/definitions/v1Priority", |
10439 | 10450 | "description": "Priority metadata." |
| 10451 | + }, |
| 10452 | + "completionCallbacks": { |
| 10453 | + "type": "array", |
| 10454 | + "items": { |
| 10455 | + "type": "object", |
| 10456 | + "$ref": "#/definitions/v1Callback" |
| 10457 | + }, |
| 10458 | + "description": "Callbacks to be called by the server when this activity reaches a terminal state.\nCallback addresses must be whitelisted in the server's dynamic configuration." |
| 10459 | + }, |
| 10460 | + "links": { |
| 10461 | + "type": "array", |
| 10462 | + "items": { |
| 10463 | + "type": "object", |
| 10464 | + "$ref": "#/definitions/apiCommonV1Link" |
| 10465 | + }, |
| 10466 | + "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." |
10440 | 10467 | } |
10441 | 10468 | } |
10442 | 10469 | }, |
@@ -11084,6 +11111,123 @@ |
11084 | 11111 | }, |
11085 | 11112 | "description": "Used to validate the compute config without attaching it to a Worker Deployment Version." |
11086 | 11113 | }, |
| 11114 | + "apiActivityV1CallbackInfo": { |
| 11115 | + "type": "object", |
| 11116 | + "properties": { |
| 11117 | + "trigger": { |
| 11118 | + "$ref": "#/definitions/apiActivityV1CallbackInfoTrigger", |
| 11119 | + "description": "Trigger for this callback." |
| 11120 | + }, |
| 11121 | + "info": { |
| 11122 | + "$ref": "#/definitions/apiCallbackV1CallbackInfo", |
| 11123 | + "description": "Common callback info." |
| 11124 | + } |
| 11125 | + }, |
| 11126 | + "description": "CallbackInfo contains the state of an attached activity callback." |
| 11127 | + }, |
| 11128 | + "apiActivityV1CallbackInfoTrigger": { |
| 11129 | + "type": "object", |
| 11130 | + "properties": { |
| 11131 | + "activityClosed": { |
| 11132 | + "$ref": "#/definitions/CallbackInfoActivityClosed" |
| 11133 | + } |
| 11134 | + } |
| 11135 | + }, |
| 11136 | + "apiCallbackV1CallbackInfo": { |
| 11137 | + "type": "object", |
| 11138 | + "properties": { |
| 11139 | + "callback": { |
| 11140 | + "$ref": "#/definitions/v1Callback", |
| 11141 | + "description": "Information on how this callback should be invoked (e.g. its URL and type)." |
| 11142 | + }, |
| 11143 | + "registrationTime": { |
| 11144 | + "type": "string", |
| 11145 | + "format": "date-time", |
| 11146 | + "description": "The time when the callback was registered." |
| 11147 | + }, |
| 11148 | + "state": { |
| 11149 | + "$ref": "#/definitions/v1CallbackState", |
| 11150 | + "description": "The current state of the callback." |
| 11151 | + }, |
| 11152 | + "attempt": { |
| 11153 | + "type": "integer", |
| 11154 | + "format": "int32", |
| 11155 | + "description": "The number of attempts made to deliver the callback.\nThis number represents a minimum bound since the attempt is incremented after the callback request completes." |
| 11156 | + }, |
| 11157 | + "lastAttemptCompleteTime": { |
| 11158 | + "type": "string", |
| 11159 | + "format": "date-time", |
| 11160 | + "description": "The time when the last attempt completed." |
| 11161 | + }, |
| 11162 | + "lastAttemptFailure": { |
| 11163 | + "$ref": "#/definitions/v1Failure", |
| 11164 | + "description": "The last attempt's failure, if any." |
| 11165 | + }, |
| 11166 | + "nextAttemptScheduleTime": { |
| 11167 | + "type": "string", |
| 11168 | + "format": "date-time", |
| 11169 | + "description": "The time when the next attempt is scheduled." |
| 11170 | + }, |
| 11171 | + "blockedReason": { |
| 11172 | + "type": "string", |
| 11173 | + "description": "If the state is BLOCKED, blocked reason provides additional information." |
| 11174 | + } |
| 11175 | + }, |
| 11176 | + "description": "Common callback information. Specific CallbackInfo messages should embed this and may include additional fields." |
| 11177 | + }, |
| 11178 | + "apiWorkflowV1CallbackInfo": { |
| 11179 | + "type": "object", |
| 11180 | + "properties": { |
| 11181 | + "callback": { |
| 11182 | + "$ref": "#/definitions/v1Callback", |
| 11183 | + "description": "Information on how this callback should be invoked (e.g. its URL and type)." |
| 11184 | + }, |
| 11185 | + "trigger": { |
| 11186 | + "$ref": "#/definitions/apiWorkflowV1CallbackInfoTrigger", |
| 11187 | + "description": "Trigger for this callback." |
| 11188 | + }, |
| 11189 | + "registrationTime": { |
| 11190 | + "type": "string", |
| 11191 | + "format": "date-time", |
| 11192 | + "description": "The time when the callback was registered." |
| 11193 | + }, |
| 11194 | + "state": { |
| 11195 | + "$ref": "#/definitions/v1CallbackState" |
| 11196 | + }, |
| 11197 | + "attempt": { |
| 11198 | + "type": "integer", |
| 11199 | + "format": "int32", |
| 11200 | + "description": "The number of attempts made to deliver the callback.\nThis number represents a minimum bound since the attempt is incremented after the callback request completes." |
| 11201 | + }, |
| 11202 | + "lastAttemptCompleteTime": { |
| 11203 | + "type": "string", |
| 11204 | + "format": "date-time", |
| 11205 | + "description": "The time when the last attempt completed." |
| 11206 | + }, |
| 11207 | + "lastAttemptFailure": { |
| 11208 | + "$ref": "#/definitions/v1Failure", |
| 11209 | + "description": "The last attempt's failure, if any." |
| 11210 | + }, |
| 11211 | + "nextAttemptScheduleTime": { |
| 11212 | + "type": "string", |
| 11213 | + "format": "date-time", |
| 11214 | + "description": "The time when the next attempt is scheduled." |
| 11215 | + }, |
| 11216 | + "blockedReason": { |
| 11217 | + "type": "string", |
| 11218 | + "description": "If the state is BLOCKED, blocked reason provides additional information." |
| 11219 | + } |
| 11220 | + }, |
| 11221 | + "description": "CallbackInfo contains the state of an attached workflow callback." |
| 11222 | + }, |
| 11223 | + "apiWorkflowV1CallbackInfoTrigger": { |
| 11224 | + "type": "object", |
| 11225 | + "properties": { |
| 11226 | + "workflowClosed": { |
| 11227 | + "$ref": "#/definitions/CallbackInfoWorkflowClosed" |
| 11228 | + } |
| 11229 | + } |
| 11230 | + }, |
11087 | 11231 | "protobufAny": { |
11088 | 11232 | "type": "object", |
11089 | 11233 | "properties": { |
|
11249 | 11393 | "canceledReason": { |
11250 | 11394 | "type": "string", |
11251 | 11395 | "description": "Set if activity cancelation was requested." |
| 11396 | + }, |
| 11397 | + "links": { |
| 11398 | + "type": "array", |
| 11399 | + "items": { |
| 11400 | + "type": "object", |
| 11401 | + "$ref": "#/definitions/v1Link" |
| 11402 | + }, |
| 11403 | + "description": "Links to related entities, such as the entity that started this activity." |
11252 | 11404 | } |
11253 | 11405 | }, |
11254 | 11406 | "description": "Information about a standalone activity." |
|
12092 | 12244 | }, |
12093 | 12245 | "description": "Callback to attach to various events in the system, e.g. workflow run completion." |
12094 | 12246 | }, |
12095 | | - "v1CallbackInfo": { |
12096 | | - "type": "object", |
12097 | | - "properties": { |
12098 | | - "callback": { |
12099 | | - "$ref": "#/definitions/v1Callback", |
12100 | | - "description": "Information on how this callback should be invoked (e.g. its URL and type)." |
12101 | | - }, |
12102 | | - "trigger": { |
12103 | | - "$ref": "#/definitions/CallbackInfoTrigger", |
12104 | | - "description": "Trigger for this callback." |
12105 | | - }, |
12106 | | - "registrationTime": { |
12107 | | - "type": "string", |
12108 | | - "format": "date-time", |
12109 | | - "description": "The time when the callback was registered." |
12110 | | - }, |
12111 | | - "state": { |
12112 | | - "$ref": "#/definitions/v1CallbackState" |
12113 | | - }, |
12114 | | - "attempt": { |
12115 | | - "type": "integer", |
12116 | | - "format": "int32", |
12117 | | - "description": "The number of attempts made to deliver the callback.\nThis number represents a minimum bound since the attempt is incremented after the callback request completes." |
12118 | | - }, |
12119 | | - "lastAttemptCompleteTime": { |
12120 | | - "type": "string", |
12121 | | - "format": "date-time", |
12122 | | - "description": "The time when the last attempt completed." |
12123 | | - }, |
12124 | | - "lastAttemptFailure": { |
12125 | | - "$ref": "#/definitions/v1Failure", |
12126 | | - "description": "The last attempt's failure, if any." |
12127 | | - }, |
12128 | | - "nextAttemptScheduleTime": { |
12129 | | - "type": "string", |
12130 | | - "format": "date-time", |
12131 | | - "description": "The time when the next attempt is scheduled." |
12132 | | - }, |
12133 | | - "blockedReason": { |
12134 | | - "type": "string", |
12135 | | - "description": "If the state is BLOCKED, blocked reason provides additional information." |
12136 | | - } |
12137 | | - }, |
12138 | | - "description": "CallbackInfo contains the state of an attached workflow callback." |
12139 | | - }, |
12140 | 12247 | "v1CallbackState": { |
12141 | 12248 | "type": "string", |
12142 | 12249 | "enum": [ |
|
12865 | 12972 | "type": "string", |
12866 | 12973 | "format": "byte", |
12867 | 12974 | "description": "Token for follow-on long-poll requests. Absent only if the activity is complete." |
| 12975 | + }, |
| 12976 | + "callbacks": { |
| 12977 | + "type": "array", |
| 12978 | + "items": { |
| 12979 | + "type": "object", |
| 12980 | + "$ref": "#/definitions/apiActivityV1CallbackInfo" |
| 12981 | + }, |
| 12982 | + "description": "Callbacks attached to this activity execution and their current state." |
12868 | 12983 | } |
12869 | 12984 | } |
12870 | 12985 | }, |
|
13102 | 13217 | "type": "array", |
13103 | 13218 | "items": { |
13104 | 13219 | "type": "object", |
13105 | | - "$ref": "#/definitions/v1CallbackInfo" |
| 13220 | + "$ref": "#/definitions/apiWorkflowV1CallbackInfo" |
13106 | 13221 | } |
13107 | 13222 | }, |
13108 | 13223 | "pendingNexusOperations": { |
|
13684 | 13799 | "type": "object", |
13685 | 13800 | "$ref": "#/definitions/v1Link" |
13686 | 13801 | }, |
13687 | | - "description": "Links associated with the event." |
| 13802 | + "description": "Links to related entities, such as the entity that started this event's workflow." |
13688 | 13803 | }, |
13689 | 13804 | "principal": { |
13690 | 13805 | "$ref": "#/definitions/v1Principal", |
|
13952 | 14067 | }, |
13953 | 14068 | "batchJob": { |
13954 | 14069 | "$ref": "#/definitions/LinkBatchJob" |
| 14070 | + }, |
| 14071 | + "activity": { |
| 14072 | + "$ref": "#/definitions/LinkActivity" |
13955 | 14073 | } |
13956 | 14074 | }, |
13957 | 14075 | "description": "Link can be associated with history events. It might contain information about an external entity\nrelated to the history event. For example, workflow A makes a Nexus call that starts workflow B:\nin this case, a history event in workflow A could contain a Link to the workflow started event in\nworkflow B, and vice-versa." |
|
16442 | 16560 | "started": { |
16443 | 16561 | "type": "boolean", |
16444 | 16562 | "description": "If true, a new activity was started." |
| 16563 | + }, |
| 16564 | + "link": { |
| 16565 | + "$ref": "#/definitions/v1Link", |
| 16566 | + "description": "Link to the started activity." |
16445 | 16567 | } |
16446 | 16568 | } |
16447 | 16569 | }, |
|
0 commit comments