{"id":21965511,"url":"https://github.com/softius/phlow","last_synced_at":"2025-04-24T03:42:08.471Z","repository":{"id":57054958,"uuid":"136507039","full_name":"softius/phlow","owner":"softius","description":"A framework agnostic PHP library to build and execute workflows","archived":false,"fork":false,"pushed_at":"2018-07-25T13:22:57.000Z","size":267,"stargazers_count":13,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T03:41:47.165Z","etag":null,"topics":["php7","pipeline","process","workflow","workflow-engine","workflow-model"],"latest_commit_sha":null,"homepage":"https://softius.github.io/phlow/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-07T16:57:14.000Z","updated_at":"2024-06-15T08:04:41.000Z","dependencies_parsed_at":"2022-08-24T04:11:40.828Z","dependency_job_id":null,"html_url":"https://github.com/softius/phlow","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softius%2Fphlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softius%2Fphlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softius%2Fphlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softius%2Fphlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softius","download_url":"https://codeload.github.com/softius/phlow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250559524,"owners_count":21450167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php7","pipeline","process","workflow","workflow-engine","workflow-model"],"created_at":"2024-11-29T12:47:51.635Z","updated_at":"2025-04-24T03:42:08.424Z","avatar_url":"https://github.com/softius.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phlow - Worfklow Model and Engine\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-travis]][link-travis]\n![Code Climate][ico-maintenance]\n![Code Climate][ico-coverage]\n\n\nPhlow is a workflow modeller and engine for PHP. Heavily inspired by [BPMN 2.0][link-bpmn2] and [Apache Camel][link-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.\n\nPhlow process models can be created using PHP. No third party tools are required to model and/or execute your process.  \n\nPhlow is a framework agnostic solution.\n\n## Features\n:white_check_mark: Sequence flow\\\n:white_check_mark: Conditional flow\\\n:white_check_mark: Error handling\\\n:white_check_mark: Callbacks\\\n:white_check_mark: Boolean expressions for Conditions\\\n:white_check_mark: PSR/3 Logger integration\\\n:white_check_mark: Execution path replay\\\n:white_check_mark: Workflow model in plain/text format\\\n:white_check_mark: Execution path in plain/text format\n\nSee the [Roadmap][link-roadmap] for more information about the upcoming releases.\n\n## Getting Started\nThe 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.\n\n[![A simple flowchart for troubleshooting a broken lamp.][img-lamp-flowchart]][link-lamp-flowchart]\n\nAlso, the following code illustrates the model for the same process. \n\n``` php\n$builder = new WorkflowBuilder();\n$builder\n  -\u003estart()\n  -\u003echoice()\n  -\u003ewhen('isPluggedIn')\n    -\u003ecallback()          // Plug in lamp\n  -\u003ewhen('isBurnedOut')\n    -\u003ecallback()          // Replace lamp\n  -\u003eotherwise()\n    -\u003ecallback()          // Repair lamp\n  -\u003eendAll()\n```\n\nOnce 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.\n\n``` php\n$workflow = $builder-\u003egetWorkflow();\n$instance = new WorkflowInstance($workflow, $data);\n$instance-\u003eexecute();\n```\n\n## Installation\n\nPhlow can be installed to your PHP project by executing the following composer command. Please note that currently there is no stable version yet available.\n\n``` bash\n$ composer require softius/phlow 0.4.0\n```\n\n## Documentation\n* [Overview][link-overview]\n* [Workflow Model][link-workflow-model]\n* [Workflow Engine][link-workflow-engine]\n* [Workflow Builder][link-workflow-builder]\n* [Sequence Flow - Example][link-sequence-flow]\n* [Conditional Flow - Example][link-conditional-flow]\n* [FAQs][link-faqs]\n \n## Testing\n\n``` bash\n$ composer test\n```\n\n## Security\n\nIf you discover any security related issues, please email softius@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Iacovos Constantinou][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/softius/phlow.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/softius/Phlow/master.svg?style=flat-square\n[ico-maintenance]: https://img.shields.io/codeclimate/maintainability/softius/phlow.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/softius/phlow.svg?style=flat-square\n[ico-coverage]: https://img.shields.io/codeclimate/coverage-letter/softius/phlow.svg?style=flat-square\n\n[img-lamp-flowchart]: https://upload.wikimedia.org/wikipedia/commons/9/91/LampFlowchart.svg\n\n[link-packagist]: https://packagist.org/packages/softius/phlow\n[link-travis]: https://travis-ci.org/softius/Phlow\n[link-downloads]: https://packagist.org/packages/softius/phlow\n[link-author]: https://github.com/softius\n[link-contributors]: ../../contributors\n[link-bpmn2]: http://www.bpmn.org/\n[link-apache-camel]: http://camel.apache.org\n[link-overview]: https://github.com/softius/phlow/blob/master/docs/README.md\n[link-roadmap]: https://github.com/softius/phlow/blob/master/docs/roadmap.md\n[link-faqs]: https://github.com/softius/phlow/blob/master/docs/faqs.md\n[link-workflow-model]: https://github.com/softius/phlow/blob/master/docs/workflow-model.md\n[link-workflow-engine]: https://github.com/softius/phlow/blob/master/docs/workflow-engine.md\n[link-workflow-builder]: https://github.com/softius/phlow/blob/master/docs/workflow-builder.md\n[link-sequence-flow]: https://github.com/softius/phlow/blob/master/docs/sequence-flow.md\n[link-conditional-flow]: https://github.com/softius/phlow/blob/master/docs/conditional-flow.md\n[link-lamp-flowchart]: https://en.wikipedia.org/wiki/File:LampFlowchart.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftius%2Fphlow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftius%2Fphlow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftius%2Fphlow/lists"}