func UpdateWithActionFunc(
	ctx context.Context,
	cache *execution.Cache,
	domainID string,
	execution types.WorkflowExecution,
	now time.Time,
	action UpdateActionFunc,
) (retError error) {

	workflowContext, err := LoadOnce(ctx, cache, domainID, execution.GetWorkflowID(), execution.GetRunID())
	if err != nil {
		return err
	}
	defer func() { workflowContext.GetReleaseFn()(retError) }()

	return updateHelper(ctx, workflowContext, now, action)
}
// UpdateWithActionFunc updates the given workflow execution.
// If runID is empty, it only tries to load the current workflow once.
// If the update should always be applied to the current run, use UpdateCurrentWithActionFunc instead.
UpdateWithActionFunc updates the given workflow execution.
If runID is empty, it only tries to load the current workflow once.
If the update should always be applied to the current run, use UpdateCurrentWithActionFunc instead.
// UpdateWithActionFunc updates the given workflow execution . // If runID is empty it only tries to load the current workflow once . // If the update should always be applied to the current run use UpdateCurrentWithActionFunc instead .
func UpdateWithActionFunc(
	ctx context.Context,
	cache *execution.Cache,
	domainID string,
	execution types.WorkflowExecution,
	now time.Time,
	action UpdateActionFunc,
) (retError error) {
	workflowContext, err := LoadOnce(ctx, cache, domainID, execution.GetWorkflowID(), execution.GetRunID())
	if err != nil {
		return err
	}
	defer func() { workflowContext.GetReleaseFn()(retError) }()
	return updateHelper(ctx, workflowContext, now, action)
}
func UpdateWithActionFunc ( ctx context . Context , cache * execution . Cache , domainID string , execution types . WorkflowExecution , now time . Time , action UpdateActionFunc , ) ( retError error ) { workflowContext , err := LoadOnce ( ctx , cache , domainID , execution . GetWorkflowID ( ) , execution . GetRunID ( ) ) if err != nil { return err } defer func ( ) { workflowContext . GetReleaseFn ( ) ( retError ) } ( ) return updateHelper ( ctx , workflowContext , now , action ) }
UpdateWithActionFunc updates the given workflow execution.
UpdateWithActionFunc updates the given workflow execution .