xu/flow

Flow is a business flow implementation.

0.2 2018-11-03 06:33 UTC

This package is auto-updated.

Last update: 2024-03-29 03:44:50 UTC


README

Build Status

Flow is a business flow implementation.

Why?

Often, we are faced with complex business rules. It can be easily verified if the processes and transitions can be visualized. Flow does that and more.

Features

Core classes/interfaces

ProcessInterface

Each process must implement ProcessInterface. Each process implementation should avoid storing state. The output of the proceed() method should only depend on the input payload.

StrategyInterface

A StrategyInterface implementation decides which process from a number of possible processes should be picked.

Flow

The main Flow class. See Examples.

Examples

  1. Simple
  2. Listen to transition events

License

MIT