1.0.0 • Published 6 months ago

@seneca/flow v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

VoxgigThis 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

1.0.0

6 months ago

0.3.0

8 months ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago