@@ -2926,27 +2926,43 @@ class WorkflowExecutionDescription(WorkflowExecution):
2926
2926
2927
2927
raw_description : temporalio .api .workflowservice .v1 .DescribeWorkflowExecutionResponse
2928
2928
"""Underlying protobuf description."""
2929
- static_summary : Optional [str ]
2930
- """Gets the single-line fixed summary for this workflow execution that may appear in
2931
- UI/CLI. This can be in single-line Temporal markdown format."""
2932
- static_details : Optional [str ]
2933
- """Gets the general fixed details for this workflow execution that may appear in UI/CLI.
2934
- This can be in Temporal markdown format and can span multiple lines."""
2929
+
2930
+ _static_summary : Optional [str ] = None
2931
+ _static_details : Optional [str ] = None
2932
+ _metadata_decoded : bool = False
2933
+
2934
+ async def static_summary (self ) -> Optional [str ]:
2935
+ """Gets the single-line fixed summary for this workflow execution that may appear in
2936
+ UI/CLI. This can be in single-line Temporal markdown format.
2937
+ """
2938
+ if not self ._metadata_decoded :
2939
+ await self ._decode_metadata ()
2940
+ return self ._static_summary
2941
+
2942
+ async def static_details (self ) -> Optional [str ]:
2943
+ """Gets the general fixed details for this workflow execution that may appear in UI/CLI.
2944
+ This can be in Temporal markdown format and can span multiple lines.
2945
+ """
2946
+ if not self ._metadata_decoded :
2947
+ await self ._decode_metadata ()
2948
+ return self ._static_details
2949
+
2950
+ async def _decode_metadata (self ) -> None :
2951
+ """Internal method to decode metadata lazily."""
2952
+ self ._static_summary , self ._static_details = await _decode_user_metadata (
2953
+ self .data_converter , self .raw_description .execution_config .user_metadata
2954
+ )
2955
+ self ._metadata_decoded = True
2935
2956
2936
2957
@staticmethod
2937
2958
async def _from_raw_description (
2938
2959
description : temporalio .api .workflowservice .v1 .DescribeWorkflowExecutionResponse ,
2939
2960
converter : temporalio .converter .DataConverter ,
2940
2961
) -> WorkflowExecutionDescription :
2941
- (summ , deets ) = await _decode_user_metadata (
2942
- converter , description .execution_config .user_metadata
2943
- )
2944
2962
return WorkflowExecutionDescription ._from_raw_info ( # type: ignore
2945
2963
description .workflow_execution_info ,
2946
2964
converter ,
2947
2965
raw_description = description ,
2948
- static_summary = summ ,
2949
- static_details = deets ,
2950
2966
)
2951
2967
2952
2968
0 commit comments