Git Product home page Git Product logo

ruote_poc's Introduction

Ruote Workflow Test

Playing around with the Ruote workflow engine. The example in this workflow does not really do anything. I just created something to model a similar workflow that I am using on a work related project.

There is currently no GUI accept for RuoteKit running under http://localhost:3000/_ruote

Installation

Application depends on mysql. sqlite will not work

bundle install

rake db:migrate

Run the specs: rake spec

Start Workers: rake ruote:run_worker

In another terminal start up the rails console and create a RequestItem. You should see the some activity in the worker terminal as it starts the workflow. After a few seconds, reload the RequestItem that was created and check the state. If everything went ok it should be "completed"

Workflow

The workflow is defined in RequestItem::PDEF_PROCESS. A RequestItem does not represent anything in particular. It is just something that has to be run through this workflow in order to be processed.

In order for a RequestItem to be processed it needs to go through the following workflow:

  1. Call Service1. This is a participant that represents a web service call to "service1"
  2. Call Service2. This participant represents a web service call to "service2"
  3. Go into a monitoring phase. This will monitoring something until the particpant decides that it is done
  4. Do some post processing after monitoring.

At certain points in the workflow, the RequestItem's state will be updated. A RequestItem should end up in the "completed" state when the workflow is done.

At any point that an error happens, the workflow will put the RequestItem into an error state. The error will need to be reviewed by a RequestItemAdmin. The admin can choose to reprocess the request item or cancel the process. Reprocessing the item will start the workflow up again.

The participant implementations are just placeholders and do not contain any real logic besides responding to the engine.

All particpants that represent service calls will be continually retried until they respond or an error is thrown. I modelled it this way to have automatic retries if the service is not up.

ruote_poc's People

Contributors

sgulics avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.