@@ -25,6 +25,7 @@ import temporalio.api.update.v1.message_pb2
25
25
import temporalio .bridge .proto .activity_result .activity_result_pb2
26
26
import temporalio .bridge .proto .child_workflow .child_workflow_pb2
27
27
import temporalio .bridge .proto .common .common_pb2
28
+ import temporalio .bridge .proto .nexus .nexus_pb2
28
29
29
30
if sys .version_info >= (3 , 10 ):
30
31
import typing as typing_extensions
@@ -186,6 +187,8 @@ class WorkflowActivationJob(google.protobuf.message.Message):
186
187
RESOLVE_SIGNAL_EXTERNAL_WORKFLOW_FIELD_NUMBER : builtins .int
187
188
RESOLVE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_FIELD_NUMBER : builtins .int
188
189
DO_UPDATE_FIELD_NUMBER : builtins .int
190
+ RESOLVE_NEXUS_OPERATION_START_FIELD_NUMBER : builtins .int
191
+ RESOLVE_NEXUS_OPERATION_FIELD_NUMBER : builtins .int
189
192
REMOVE_FROM_CACHE_FIELD_NUMBER : builtins .int
190
193
@property
191
194
def initialize_workflow (self ) -> global___InitializeWorkflow :
@@ -240,6 +243,12 @@ class WorkflowActivationJob(google.protobuf.message.Message):
240
243
def do_update (self ) -> global___DoUpdate :
241
244
"""A request to handle a workflow update."""
242
245
@property
246
+ def resolve_nexus_operation_start (self ) -> global___ResolveNexusOperationStart :
247
+ """A nexus operation started."""
248
+ @property
249
+ def resolve_nexus_operation (self ) -> global___ResolveNexusOperation :
250
+ """A nexus operation resolved."""
251
+ @property
243
252
def remove_from_cache (self ) -> global___RemoveFromCache :
244
253
"""Remove the workflow identified by the [WorkflowActivation] containing this job from the
245
254
cache after performing the activation. It is guaranteed that this will be the only job
@@ -265,6 +274,8 @@ class WorkflowActivationJob(google.protobuf.message.Message):
265
274
resolve_request_cancel_external_workflow : global___ResolveRequestCancelExternalWorkflow
266
275
| None = ...,
267
276
do_update : global___DoUpdate | None = ...,
277
+ resolve_nexus_operation_start : global___ResolveNexusOperationStart | None = ...,
278
+ resolve_nexus_operation : global___ResolveNexusOperation | None = ...,
268
279
remove_from_cache : global___RemoveFromCache | None = ...,
269
280
) -> None : ...
270
281
def HasField (
@@ -290,6 +301,10 @@ class WorkflowActivationJob(google.protobuf.message.Message):
290
301
b"resolve_child_workflow_execution" ,
291
302
"resolve_child_workflow_execution_start" ,
292
303
b"resolve_child_workflow_execution_start" ,
304
+ "resolve_nexus_operation" ,
305
+ b"resolve_nexus_operation" ,
306
+ "resolve_nexus_operation_start" ,
307
+ b"resolve_nexus_operation_start" ,
293
308
"resolve_request_cancel_external_workflow" ,
294
309
b"resolve_request_cancel_external_workflow" ,
295
310
"resolve_signal_external_workflow" ,
@@ -325,6 +340,10 @@ class WorkflowActivationJob(google.protobuf.message.Message):
325
340
b"resolve_child_workflow_execution" ,
326
341
"resolve_child_workflow_execution_start" ,
327
342
b"resolve_child_workflow_execution_start" ,
343
+ "resolve_nexus_operation" ,
344
+ b"resolve_nexus_operation" ,
345
+ "resolve_nexus_operation_start" ,
346
+ b"resolve_nexus_operation_start" ,
328
347
"resolve_request_cancel_external_workflow" ,
329
348
b"resolve_request_cancel_external_workflow" ,
330
349
"resolve_signal_external_workflow" ,
@@ -354,6 +373,8 @@ class WorkflowActivationJob(google.protobuf.message.Message):
354
373
"resolve_signal_external_workflow" ,
355
374
"resolve_request_cancel_external_workflow" ,
356
375
"do_update" ,
376
+ "resolve_nexus_operation_start" ,
377
+ "resolve_nexus_operation" ,
357
378
"remove_from_cache" ,
358
379
]
359
380
| None
@@ -1240,6 +1261,105 @@ class DoUpdate(google.protobuf.message.Message):
1240
1261
1241
1262
global___DoUpdate = DoUpdate
1242
1263
1264
+ class ResolveNexusOperationStart (google .protobuf .message .Message ):
1265
+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
1266
+
1267
+ SEQ_FIELD_NUMBER : builtins .int
1268
+ OPERATION_ID_FIELD_NUMBER : builtins .int
1269
+ STARTED_SYNC_FIELD_NUMBER : builtins .int
1270
+ CANCELLED_BEFORE_START_FIELD_NUMBER : builtins .int
1271
+ seq : builtins .int
1272
+ """Sequence number as provided by lang in the corresponding ScheduleNexusOperation command"""
1273
+ operation_id : builtins .str
1274
+ """The operation started asynchronously. Contains an ID that can be used to perform
1275
+ operations on the started operation by, ex, clients. A `ResolveNexusOperation` job will
1276
+ follow at some point.
1277
+ """
1278
+ started_sync : builtins .bool
1279
+ """If true the operation "started" but only because it's also already resolved. A
1280
+ `ResolveNexusOperation` job will be in the same activation.
1281
+ """
1282
+ @property
1283
+ def cancelled_before_start (self ) -> temporalio .api .failure .v1 .message_pb2 .Failure :
1284
+ """The operation was cancelled before it was ever sent to server (same WFT).
1285
+ Note that core will still send a `ResolveNexusOperation` job in the same activation, so
1286
+ there does not need to be an exceptional case for this in lang.
1287
+ """
1288
+ def __init__ (
1289
+ self ,
1290
+ * ,
1291
+ seq : builtins .int = ...,
1292
+ operation_id : builtins .str = ...,
1293
+ started_sync : builtins .bool = ...,
1294
+ cancelled_before_start : temporalio .api .failure .v1 .message_pb2 .Failure
1295
+ | None = ...,
1296
+ ) -> None : ...
1297
+ def HasField (
1298
+ self ,
1299
+ field_name : typing_extensions .Literal [
1300
+ "cancelled_before_start" ,
1301
+ b"cancelled_before_start" ,
1302
+ "operation_id" ,
1303
+ b"operation_id" ,
1304
+ "started_sync" ,
1305
+ b"started_sync" ,
1306
+ "status" ,
1307
+ b"status" ,
1308
+ ],
1309
+ ) -> builtins .bool : ...
1310
+ def ClearField (
1311
+ self ,
1312
+ field_name : typing_extensions .Literal [
1313
+ "cancelled_before_start" ,
1314
+ b"cancelled_before_start" ,
1315
+ "operation_id" ,
1316
+ b"operation_id" ,
1317
+ "seq" ,
1318
+ b"seq" ,
1319
+ "started_sync" ,
1320
+ b"started_sync" ,
1321
+ "status" ,
1322
+ b"status" ,
1323
+ ],
1324
+ ) -> None : ...
1325
+ def WhichOneof (
1326
+ self , oneof_group : typing_extensions .Literal ["status" , b"status" ]
1327
+ ) -> (
1328
+ typing_extensions .Literal [
1329
+ "operation_id" , "started_sync" , "cancelled_before_start"
1330
+ ]
1331
+ | None
1332
+ ): ...
1333
+
1334
+ global___ResolveNexusOperationStart = ResolveNexusOperationStart
1335
+
1336
+ class ResolveNexusOperation (google .protobuf .message .Message ):
1337
+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
1338
+
1339
+ SEQ_FIELD_NUMBER : builtins .int
1340
+ RESULT_FIELD_NUMBER : builtins .int
1341
+ seq : builtins .int
1342
+ """Sequence number as provided by lang in the corresponding ScheduleNexusOperation command"""
1343
+ @property
1344
+ def result (
1345
+ self ,
1346
+ ) -> temporalio .bridge .proto .nexus .nexus_pb2 .NexusOperationResult : ...
1347
+ def __init__ (
1348
+ self ,
1349
+ * ,
1350
+ seq : builtins .int = ...,
1351
+ result : temporalio .bridge .proto .nexus .nexus_pb2 .NexusOperationResult
1352
+ | None = ...,
1353
+ ) -> None : ...
1354
+ def HasField (
1355
+ self , field_name : typing_extensions .Literal ["result" , b"result" ]
1356
+ ) -> builtins .bool : ...
1357
+ def ClearField (
1358
+ self , field_name : typing_extensions .Literal ["result" , b"result" , "seq" , b"seq" ]
1359
+ ) -> None : ...
1360
+
1361
+ global___ResolveNexusOperation = ResolveNexusOperation
1362
+
1243
1363
class RemoveFromCache (google .protobuf .message .Message ):
1244
1364
DESCRIPTOR : google .protobuf .descriptor .Descriptor
1245
1365
0 commit comments