@clausehq/flows

0.1.14 • Public • Published

Flow engine

This is a generic flow execution enginee.

The engine is parameterized with a set of transforms and types.

Transforms and types need to have the right structure (npm packages exporting an object with the proper fields).

The engine can be instantiated with:

const engine = require('@clausehq/core-flows');
const registry = {
  transforms: [
    { name: <TRANSFORM_NAME>, package: <TRANSFORM_PATH> },
    ...
  ],
  types: [
    { name: <TYPE_NAME>, package: <TYPE_PATH> },
    ...
  ],
};
const myEngine = engine(registry);

The flow engine API allows you to invoke a flow:

const result = myEngine.invoke(flow, context, request);

Where:

  • flow is the flow (ALMOST! it still has a few bits pre-hydrated, but very close now)
  • context is the invokation context (e.g., secrets, previous steps etc)
  • request is the input of the flow

Readme

Keywords

none

Package Sidebar

Install

npm i @clausehq/flows

Weekly Downloads

23

Version

0.1.14

License

UNLICENSED

Unpacked Size

9.87 kB

Total Files

6

Last publish

Collaborators

  • mttrbrts
  • dselman
  • sstone1