Attempts to run a single assessment (lWorkflow) using shared data (lData)
and metadata (lMapping). Calls RunStep for each item in
lWorkflow$workflow and saves the results to lWorkflow.
Usage
RunWorkflow(
lWorkflow,
lData = NULL,
lConfig = NULL,
bReturnResult = TRUE,
bKeepInputData = TRUE
)Arguments
- lWorkflow
listA named list of metadata defining how the workflow should be run.- lData
listA named list of domain-level data frames.- lConfig
listA configuration object with two methods:LoadData: A function that loads data specified inlWorkflow$spec.SaveData: A function that saves data returned by the last step inlWorkflow$steps.
- bReturnResult
booleanshould only the result from the last step (lResults) be returned? If false, the full workflow (includinglResults) is returned. Default isTRUE.- bKeepInputData
booleanshould the input data be included inlDataafter the workflow is run? Only relevant when bReturnResult is FALSE. Default isTRUE.
Value
Object containing the results of the workflow's last step (if
bLastResult is TRUE) or the full workflow object (if bReturnResults
is TRUE) or the full workflow object (if bReturnResults is FALSE).
Examples
if (FALSE) { # \dontrun{
# Load a simple workflow from YAML
wf <- yaml::read_yaml(
system.file("workflows", "cars.yaml", package = "workr")
)
lData <- list(cars = cars)
# Run the workflow
result <- RunWorkflow(wf, lData)
summary(result)
} # }