@@ -217,7 +217,7 @@ func (h *workflowHandle[R]) processOutcome(outcome workflowOutcome[R]) (R, error
217217 if dbosCtx .serializer == nil {
218218 return * new (R ), newWorkflowExecutionError (workflowState .workflowID , fmt .Errorf ("no serializer configured in DBOSContext" ))
219219 }
220- encodedOutputStr , encErr := serialize ( dbosCtx .serializer , typedResult )
220+ encodedOutputStr , encErr := dbosCtx .serializer . Encode ( typedResult )
221221 if encErr != nil {
222222 return * new (R ), newWorkflowExecutionError (workflowState .workflowID , fmt .Errorf ("serializing child workflow result: %w" , encErr ))
223223 }
@@ -286,7 +286,7 @@ func (h *workflowPollingHandle[R]) GetResult(opts ...GetResultOption) (R, error)
286286 if dbosCtx .serializer == nil {
287287 return * new (R ), newWorkflowExecutionError (workflowState .workflowID , fmt .Errorf ("no serializer configured in DBOSContext" ))
288288 }
289- encodedOutputStr , encErr := serialize ( dbosCtx .serializer , typedResult )
289+ encodedOutputStr , encErr := dbosCtx .serializer . Encode ( typedResult )
290290 if encErr != nil {
291291 return * new (R ), newWorkflowExecutionError (workflowState .workflowID , fmt .Errorf ("serializing child workflow result: %w" , encErr ))
292292 }
@@ -876,7 +876,7 @@ func (c *dbosContext) RunWorkflow(_ DBOSContext, fn WorkflowFunc, input any, opt
876876 }
877877
878878 // Serialize input before storing in workflow status
879- encodedInputStr , serErr := serialize ( c .serializer , input )
879+ encodedInputStr , serErr := c .serializer . Encode ( input )
880880 if serErr != nil {
881881 return nil , newWorkflowExecutionError (workflowID , fmt .Errorf ("failed to serialize workflow input: %w" , serErr ))
882882 }
@@ -1044,7 +1044,7 @@ func (c *dbosContext) RunWorkflow(_ DBOSContext, fn WorkflowFunc, input any, opt
10441044 }
10451045
10461046 // Serialize the output before recording
1047- encodedOutput , serErr := serialize ( c .serializer , result )
1047+ encodedOutput , serErr := c .serializer . Encode ( result )
10481048 if serErr != nil {
10491049 c .logger .Error ("Failed to serialize workflow output" , "workflow_id" , workflowID , "error" , serErr )
10501050 outcomeChan <- workflowOutcome [any ]{result : nil , err : fmt .Errorf ("failed to serialize output: %w" , serErr )}
@@ -1343,7 +1343,7 @@ func (c *dbosContext) RunAsStep(_ DBOSContext, fn StepFunc, opts ...StepOption)
13431343 }
13441344
13451345 // Serialize step output before recording
1346- encodedStepOutput , serErr := serialize ( c .serializer , stepOutput )
1346+ encodedStepOutput , serErr := c .serializer . Encode ( stepOutput )
13471347 if serErr != nil {
13481348 return nil , newStepExecutionError (stepState .workflowID , stepOpts .stepName , fmt .Errorf ("failed to serialize step output: %w" , serErr ))
13491349 }
@@ -1372,7 +1372,7 @@ func (c *dbosContext) RunAsStep(_ DBOSContext, fn StepFunc, opts ...StepOption)
13721372
13731373func (c * dbosContext ) Send (_ DBOSContext , destinationID string , message any , topic string ) error {
13741374 // Serialize the message before sending
1375- encodedMessageStr , err := serialize ( c .serializer , message )
1375+ encodedMessageStr , err := c .serializer . Encode ( message )
13761376 if err != nil {
13771377 return fmt .Errorf ("failed to serialize message: %w" , err )
13781378 }
@@ -1483,7 +1483,7 @@ func Recv[T any](ctx DBOSContext, topic string, timeout time.Duration) (T, error
14831483
14841484func (c * dbosContext ) SetEvent (_ DBOSContext , key string , message any ) error {
14851485 // Serialize the event value before storing
1486- encodedMessageStr , err := serialize ( c .serializer , message )
1486+ encodedMessageStr , err := c .serializer . Encode ( message )
14871487 if err != nil {
14881488 return fmt .Errorf ("failed to serialize event value: %w" , err )
14891489 }
0 commit comments