@@ -5000,6 +5000,12 @@ def __init__(
50005000 self ._workflow_run_id = workflow_run_id
50015001 self ._result_type = result_type
50025002 self ._known_outcome = known_outcome
5003+ self ._data_converter = self ._client .data_converter ._with_context (
5004+ WorkflowSerializationContext (
5005+ namespace = self ._client .namespace ,
5006+ workflow_id = self .workflow_id ,
5007+ )
5008+ )
50035009
50045010 @property
50055011 def id (self ) -> str :
@@ -5047,14 +5053,12 @@ async def result(
50475053 assert self ._known_outcome
50485054 if self ._known_outcome .HasField ("failure" ):
50495055 raise WorkflowUpdateFailedError (
5050- await self ._client .data_converter .decode_failure (
5051- self ._known_outcome .failure
5052- ),
5056+ await self ._data_converter .decode_failure (self ._known_outcome .failure ),
50535057 )
50545058 if not self ._known_outcome .success .payloads :
50555059 return None # type: ignore
50565060 type_hints = [self ._result_type ] if self ._result_type else None
5057- results = await self ._client . data_converter .decode (
5061+ results = await self ._data_converter .decode (
50585062 self ._known_outcome .success .payloads , type_hints
50595063 )
50605064 if not results :
@@ -6236,8 +6240,14 @@ async def _build_update_workflow_execution_request(
62366240 ),
62376241 )
62386242 if input .args :
6243+ context = temporalio .converter .WorkflowSerializationContext (
6244+ namespace = self ._client .namespace ,
6245+ workflow_id = workflow_id ,
6246+ )
62396247 req .request .input .args .payloads .extend (
6240- await self ._client .data_converter .encode (input .args )
6248+ await self ._client .data_converter ._with_context (context ).encode (
6249+ input .args
6250+ )
62416251 )
62426252 if input .headers is not None :
62436253 await self ._apply_headers (input .headers , req .request .input .header .fields )
0 commit comments