Modules@robinpath/workflow

@robinpath/workflow

0.1.0Public

Workflow orchestration engine with steps, branching, parallel execution, and loops

@robinpath/workflow

Workflow orchestration engine with steps, conditions, loops, parallel execution, branching, and context management

Category Functions Auth License

Why use this module?

The workflow module lets you:

  • Create a new workflow
  • Add a step to a workflow (action, condition, loop, parallel, delay, transform)
  • Link one step to the next (set execution order)
  • Execute a workflow with optional input data
  • Pause a running workflow

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/workflow

Quick Start

No credentials needed — start using it right away:

workflow.addStep $wfId {"name": "Fetch User", "type": "action", "handler": $fn}

Available Functions

FunctionDescription
workflow.createCreate a new workflow
workflow.addStepAdd a step to a workflow (action, condition, loop, parallel, delay, transform)
workflow.setEntrySet the entry (first) step of a workflow
workflow.linkLink one step to the next (set execution order)
workflow.runExecute a workflow with optional input data
workflow.pausePause a running workflow
workflow.getStatusGet the current status and metadata of a workflow
workflow.getContextGet workflow context data (all or by key)
workflow.setContextSet a value in the workflow context
workflow.getHistoryGet the execution history of a workflow run
workflow.listStepsList all steps in a workflow
workflow.removeStepRemove a step from a workflow
workflow.destroyDestroy a workflow and free resources
workflow.listList all workflows
workflow.cloneClone an existing workflow

Examples

Add a step to a workflow (action, condition, loop, parallel, delay, transform)

workflow.addStep $wfId {"name": "Fetch User", "type": "action", "handler": $fn}

Set the entry (first) step of a workflow

workflow.setEntry $wfId $stepId

Link one step to the next (set execution order)

workflow.link $wfId $step1 $step2

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/workflow";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  workflow.addStep $wfId {"name": "Fetch User", "type": "action", "handler": $fn}
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/workflow
Version0.1.0
LicenseMIT
Unpacked Size7.3 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

devops