Skip to contents

This method adds a new `workflowstep` to the `steps` list of a `workflow` object at a specified position. It also performs validation after adding the step and updates the current index and entries of all steps to maintain consistency.

Usage

# S3 method for class 'workflow'
add_step(x, new_step, position = length(x$steps) + 1L, ...)

Arguments

x

The `workflow` object to update.

new_step

A `workflowstep` object to add to the workflow.

position

An integer index specifying where to insert the new step (default: at the end of the steps list).

...

Additional arguments (not used).

Value

The updated `workflow` object with the new step added.