Closed
Description
Use case: set an optional path and be able to skip it. Solution: skip a branch
and continue to the next activity if the option
function returns 0
. So
t <- create_trajectory() %>%
branch(function() 0, F, create_trajectory() %>%
timeout(function() { print("optional"); 0 })) %>%
timeout(function() { print("main"); 0 })
simmer() %>%
add_generator("dummy", t, at(0)) %>%
run()
#> Error: Branch: index out of range
should print main
instead of the error.