chencha/processes

Enables definition of a process in a system via json file

0.1.0 2015-03-30 11:27 UTC

This package is not auto-updated.

Last update: 2024-04-27 15:15:11 UTC


README

##Processes dispatcher

This package is an extension of the chencha/conveyor package found here (https://github.com/prodeveloper/conveyor) This system parses a json file describing a process, compiles it to a chencha/conveyor process and runs it.

A sample process description would be:

{
  "name": "Registration",
  "belts": [
    {
      "validation": ["EmailValidation"],
      "persistence": [SaveInDatabase","UpdateElastic"]
    }
  ]
}

This would be translated to the following steps

  1. Start Registration Process
  2. Run the given data through the validation belt
  • Run the subject through EmailValidation class
  1. If no StopBeltException is thrown then run subject through persistence belt
  • Run the subject through SaveInDatabase class
  • Run the subject through UpdateElastic class