I see the example below in the docs, but I’m looking to handle the case where user_ids
is not known beforehand, but instead is a result of a previous cascade.
Is that possible at the moment?
Example from current docs: Oban.Pro.Workflow — Oban Pro v1.6.0-rc.3
user_ids = [101, 202, 303]
Workflow.new()
|> Workflow.put_context(%{operation: "sync"})
|> Workflow.add_cascade(:users, {user_ids, &MyApp.sync_user/2})
|> Workflow.add_cascade(:notify, &MyApp.send_summary/1, deps: :users)
Is that possible at the moment?
It’s possible to depend on one job, but not on a sub-workflow. This is something we’re aware is missing, and have a few options we’re exploring.
A function/pattern to handle this will be included before v1.6 final 
Ok! Heads up: I noticed add_many_cascades
is used in the docs above in the definition of add_cascade
but not documented anywhere
Thanks for point it out. That’s a remnant from before add_cascade
supported the tuple syntax. Fixed up for the next release 