@@ -4991,6 +4991,12 @@ def __init__(
49914991 self ._workflow_run_id = workflow_run_id
49924992 self ._result_type = result_type
49934993 self ._known_outcome = known_outcome
4994+ self ._data_converter = self ._client .data_converter ._with_context (
4995+ WorkflowSerializationContext (
4996+ namespace = self ._client .namespace ,
4997+ workflow_id = self .workflow_id ,
4998+ )
4999+ )
49945000
49955001 @property
49965002 def id (self ) -> str :
@@ -5038,14 +5044,12 @@ async def result(
50385044 assert self ._known_outcome
50395045 if self ._known_outcome .HasField ("failure" ):
50405046 raise WorkflowUpdateFailedError (
5041- await self ._client .data_converter .decode_failure (
5042- self ._known_outcome .failure
5043- ),
5047+ await self ._data_converter .decode_failure (self ._known_outcome .failure ),
50445048 )
50455049 if not self ._known_outcome .success .payloads :
50465050 return None # type: ignore
50475051 type_hints = [self ._result_type ] if self ._result_type else None
5048- results = await self ._client . data_converter .decode (
5052+ results = await self ._data_converter .decode (
50495053 self ._known_outcome .success .payloads , type_hints
50505054 )
50515055 if not results :
@@ -6227,8 +6231,14 @@ async def _build_update_workflow_execution_request(
62276231 ),
62286232 )
62296233 if input .args :
6234+ context = temporalio .converter .WorkflowSerializationContext (
6235+ namespace = self ._client .namespace ,
6236+ workflow_id = workflow_id ,
6237+ )
62306238 req .request .input .args .payloads .extend (
6231- await self ._client .data_converter .encode (input .args )
6239+ await self ._client .data_converter ._with_context (context ).encode (
6240+ input .args
6241+ )
62326242 )
62336243 if input .headers is not None :
62346244 await self ._apply_headers (input .headers , req .request .input .header .fields )
0 commit comments