Oban Pro - allow the end-user to run each workflow on its own or all together in a chain?

Let’s say I have three workflows: WorkflowA, WorkflowB, and WorkflowC.

Each Workflow spawns 10 child jobs using Workflow.append().

I’d like to mix and match A, B, and C in different orders. Something like:

Workflow.new()
|> Workflow.add(:a, WorkflowA.new(%{id: 1}))
|> Workflow.add(:b, WorkflowB.new(%{id: 2}), deps: [:a])
|> Workflow.add(:c, WorkflowC.new(%{id: 3}), deps: [:b])
|> Oban.insert_all()

or

Workflow.new()
|> Workflow.add(:b, WorkflowB.new(%{id: 2}))
|> Workflow.add(:a, WorkflowA.new(%{id: 1}), deps: [:b])
|> Workflow.add(:c, WorkflowC.new(%{id: 3}), deps: [:a])
|> Oban.insert_all()

The use case is allowing the end-user to run each workflow on its own, or all together in a chain.

Is this about composing workflow jobs, or entire workflows? You can can mix-n-match any jobs you like into a workflow (in v1.5 they don’t even need to be Workflow jobs).

However, if you desire making a Workflow within Workflows? If so, you’re not the first. Won’t be the last. It’s slated for v1.6.

Help us understand the question more and we can be more specific. :sparkles:

Thanks for the thoughtful questions. I’m not too practiced with the terminology so it’s helpful! But from what I gleaned from reading the documentation, it seemed like what I want is to compose entire workflows.

e.g. Workflows A, B, and C. Each can run on their own and do something useful. Workflow B can work with the outputs of an A, and C can work the outputs of a B. So, I’d also like to be able to chain A → B → C.