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

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

	return updateHelper(ctx, workflowContext, now, action)
}
// UpdateCurrentWithActionFunc updates the given workflow execution or current execution if runID is empty.
// It's the same as UpdateWithActionFunc if runID is not empty.
// This function is suitable for the case when the change should always be applied to the current execution.
UpdateCurrentWithActionFunc updates the given workflow execution or current execution if runID is empty.
It's the same as UpdateWithActionFunc if runID is not empty.
This function is suitable for the case when the change should always be applied to the current execution.
// UpdateCurrentWithActionFunc updates the given workflow execution or current execution if runID is empty . // It ' s the same as UpdateWithActionFunc if runID is not empty . // This function is suitable for the case when the change should always be applied to the current execution .
func UpdateCurrentWithActionFunc(
	ctx context.Context,
	cache *execution.Cache,
	executionManager persistence.ExecutionManager,
	domainID string,
	execution types.WorkflowExecution,
	now time.Time,
	action UpdateActionFunc,
) (retError error) {
	workflowContext, err := Load(ctx, cache, executionManager, domainID, execution.GetWorkflowID(), execution.GetRunID())
	if err != nil {
		return err
	}
	defer func() { workflowContext.GetReleaseFn()(retError) }()
	return updateHelper(ctx, workflowContext, now, action)
}
func UpdateCurrentWithActionFunc ( ctx context . Context , cache * execution . Cache , executionManager persistence . ExecutionManager , domainID string , execution types . WorkflowExecution , now time . Time , action UpdateActionFunc , ) ( retError error ) { workflowContext , err := Load ( ctx , cache , executionManager , domainID , execution . GetWorkflowID ( ) , execution . GetRunID ( ) ) if err != nil { return err } defer func ( ) { workflowContext . GetReleaseFn ( ) ( retError ) } ( ) return updateHelper ( ctx , workflowContext , now , action ) }
UpdateCurrentWithActionFunc updates the given workflow execution or current execution if runID is empty.
UpdateCurrentWithActionFunc updates the given workflow execution or current execution if runID is empty .