OqronKitOqronKit

Workflow (DAG)

Complex job dependency graphs with parent-child relationships

Workflow (DAG)

The Workflow module enables complex job dependency grids where child jobs wait for parent jobs to complete before executing — forming a Directed Acyclic Graph (DAG).

Roadmap Module — Workflow is part of the v1 Enterprise release roadmap. Basic DAG support via dependsOn is available today in the Queue module.

Using DAGs Today

Job dependencies are available via the dependsOn option in queue().add():

import { queue } from 'oqronkit'

const extractQueue = queue({ name: 'extract', handler: async (ctx) => { /* ... */ } })
const transformQueue = queue({ name: 'transform', handler: async (ctx) => { /* ... */ } })

// Parent jobs
const extract1 = await extractQueue.add({ source: 'users.csv' })
const extract2 = await extractQueue.add({ source: 'orders.csv' })

// Child waits for both parents to complete
const transform = await transformQueue.add(
  { mergeFrom: ['users', 'orders'] },
  { dependsOn: [extract1.id, extract2.id] }
)

Parent Failure Policies

PolicyBehavior
'block' (default)Child stays in waiting-children indefinitely
'cascade-fail'Child immediately marked as failed
'ignore'Child proceeds as if parent succeeded
await transformQueue.add(data, {
  dependsOn: [parentId],
  parentFailurePolicy: 'cascade-fail',
})

Next Steps

  • Saga — Distributed transactions with compensation chains
  • Task Queue — Simple background processing

On this page