2017 © Pedro Peláez
 

library phlow

A framework agnostic PHP library to build and execute workflows

image

softius/phlow

A framework agnostic PHP library to build and execute workflows

  • Wednesday, July 25, 2018
  • by softius
  • Repository
  • 1 Watchers
  • 4 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Phlow - Worfklow Model and Engine

Latest Version on Packagist ![Software License][ico-license] Build Status ![Code Climate][ico-maintenance] ![Code Climate][ico-coverage], (*1)

Phlow is a workflow modeller and engine for PHP. Heavily inspired by BPMN 2.0 and Apache Camel, Phlow attempts to provide a library to design and implement business processes in PHP projects. It utilises the notion of workflow to model a process of any kind, through which a piece of work passes from initiation to completion., (*2)

Phlow process models can be created using PHP. No third party tools are required to model and/or execute your process., (*3)

Phlow is a framework agnostic solution., (*4)

Features

:white_check_mark: Sequence flow\ :white_check_mark: Conditional flow\ :white_check_mark: Error handling\ :white_check_mark: Callbacks\ :white_check_mark: Boolean expressions for Conditions\ :white_check_mark: PSR/3 Logger integration\ :white_check_mark: Execution path replay\ :white_check_mark: Workflow model in plain/text format\ :white_check_mark: Execution path in plain/text format, (*5)

See the Roadmap for more information about the upcoming releases., (*6)

Getting Started

The following image illustrates a simple process for dealing with a non-functioning lamp. Once a non-functioning lamp is found, the flow evaluates whether the lamp is plugged in. If not, it evaluates whether the lamp has been burned out. In any case, particular actions must be taken i.e. replace the lamp., (*7)

A simple flowchart for troubleshooting a broken lamp., (*8)

Also, the following code illustrates the model for the same process., (*9)

``` php $builder = new WorkflowBuilder(); $builder ->start() ->choice() ->when('isPluggedIn') ->callback() // Plug in lamp ->when('isBurnedOut') ->callback() // Replace lamp ->otherwise() ->callback() // Repair lamp ->endAll(), (*10)


Once the model bas been built, it can be executed by creating a new instance. At this point it is possible to pass some data that could be made available throughout the process. The data can be any object which could be also updated as part of the process. ``` php $workflow = $builder->getWorkflow(); $instance = new WorkflowInstance($workflow, $data); $instance->execute();

Installation

Phlow can be installed to your PHP project by executing the following composer command. Please note that currently there is no stable version yet available., (*11)

``` bash $ composer require softius/phlow 0.4.0, (*12)


## Documentation * [Overview][link-overview] * [Workflow Model][link-workflow-model] * [Workflow Engine][link-workflow-engine] * [Workflow Builder][link-workflow-builder] * [Sequence Flow - Example][link-sequence-flow] * [Conditional Flow - Example][link-conditional-flow] * [FAQs][link-faqs] ## Testing ``` bash $ composer test

Security

If you discover any security related issues, please email softius@gmail.com instead of using the issue tracker., (*13)

Credits

License

The MIT License (MIT). Please see License File for more information., (*14)

The Versions

25/07 2018

dev-reusable-workflows

dev-reusable-workflows

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

25/07 2018

dev-master

9999999-dev

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

25/07 2018

dev-code-quality

dev-code-quality

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

24/07 2018

dev-named-workflows

dev-named-workflows

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

24/07 2018

v0.4.0

0.4.0.0

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

23/07 2018

dev-documentation

dev-documentation

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

23/07 2018

dev-remove-collections-dependency

dev-remove-collections-dependency

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

23/07 2018

dev-lowercase-phlow

dev-lowercase-phlow

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

23/07 2018

dev-collection-expression-methods

dev-collection-expression-methods

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

18/07 2018

v0.3.0

0.3.0.0

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

18/07 2018

dev-prepare-v030

dev-prepare-v030

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

12/07 2018

v0.2.0

0.2.0.0

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow

11/07 2018

v0.1.0

0.1.0.0

A framework agnostic PHP library to build and execute workflows

  Sources   Download

MIT

The Requires

 

The Development Requires

pipeline process workflow