Skip to content

Latest commit

 

History

History
83 lines (52 loc) · 3 KB

README.md

File metadata and controls

83 lines (52 loc) · 3 KB

Seneca Flow

Seneca Flow is a plugin for Seneca

Workflow operations and data model

npm version build Coverage Status Known Vulnerabilities DeepScan grade Maintainability

@seneca/flow

Voxgig This open source module is sponsored and supported by Voxgig.

Install

Quick Example

More Examples

Motivation

Design

A flow is series of transitions over a directed graph of steps. Each step indicates valid transitions to other steps. A flow is defined primarily as the graph of steps.

Entities:

  • Flow definition entity: sys/flowDef
  • Step definition entity: sys/flowStepDef

Relations:

  • sys/flowStepDef *-->1 sys/flowDef # steps of the flow

An instance of a flow specifies the current step, a list of step states, and alog of step operations.

The step operations are:

  • APPLY: move to the specified step from current step (create step state if needed), and update the step data as indicated, recording change in log.

Entities:

  • Flow instance entity: sys/flow
  • Step instance entity: sys/flowStep
  • Step log entity: sys/flowStepLog

Relations:

  • sys/flow *-->1 sys/flowDef # flow instance of a flowDef
  • sys/flowStep *-->1 sys/flowStepDef # flow step instance of a flowStepDef
  • sys/flowStep *-->1 sys/flow # flow step of flow (1 only per flowStepDef)
  • sys/flow 1-->1 sys/flowStep # current flowStep
  • sys/flowStepLog *--> sys/flowDef # flow step log entry for flowDef
  • sys/flowStepLog *--> sys/flow # flow step log entry for flow
  • sys/flowStepLog *--> sys/flowStepDef # flow step log entry for flowStepDef
  • sys/flowStepLog *--> sys/flowStep # flow step log entry for flowStep

Each entity has a set of well-defined fields for internal control, and a set of standard fields for common use cases. Custom user fields should be prefixed with an x to ensure namespace safety for updates. No standard field will start with x.

Support

API

Contributing

Background