Skip to content
forked from mantor/floristry

Interact with Flor's workflow engine through Rails facilities.

License

Notifications You must be signed in to change notification settings

jfrioux/floristry

This branch is 1 commit ahead of mantor/floristry:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9fcaca6 · Apr 18, 2021
Dec 29, 2020
Feb 20, 2021
Nov 18, 2018
Nov 18, 2018
Nov 14, 2020
May 13, 2017
Feb 20, 2021
Sep 4, 2017
Dec 1, 2018
Jan 3, 2021
Apr 18, 2021
Apr 27, 2019
Dec 10, 2013
Jan 3, 2020
Nov 18, 2018
Oct 31, 2020
Oct 31, 2020
Dec 6, 2018

Repository files navigation

Build Status

Floristry

The goal of this gem is to help you represent Flor's workflows using standard Rails facilities, e.g. partials, helpers, render, models, etc.

Floristry is an isolated engine which provides basic behaviors and representations to Flor's workflow language, e.g. sequence, concurrence, task, if, sleep, cron. Obviously, you can override their default behaviors (e.g. model) and representations (e.g. partial) your owns.

To override a view, simply create a new one in:

/app/views/floristry/_cron.html.erb.

Features

TODO

Hierarchy

  • Procedure
    • Leaf Procedure
      • Tasker
      • If
      • Wait
      • ...
    • Branch Procedure
      • Sequence
      • Concurrence
      • ...

Era - :pass, :present, :future

The following methods are available on each Procedures to identify its era:

active?
inactive?

is_past?
is_present?
is_future?

Extend

New behaviors ca be added to low-level Procedure such as Procedure (root), BranchProcedure or LeafProcedure to affect all Procedures at once, only Leaves or only Branches respectively.

Create a file called /config/initializers/floristry.rb containing modules with the desired behaviors. Then use the following config to define which module will be included in the which low-level Procedure.

module FloristryBranchBehavior
  def xyz
    # ...
  end

  # ...
end

Floristry.configure do |config|
  config.add_branch_Procedure_behavior = FloristryBranchBehavior
  #config.add_leaf_Procedure_behavior = FloristryLeafBehavior
  #config.add_Procedure_behavior = FloristryBehavior
end

Requirements

TODO

Installation

  1. Add this line to your application's Gemfile:

    gem 'floristry'

  2. And then execute:

    $ bundle install

  3. Then register the service in flor engine by running:

    rails g floristry:install --flack-and-flor

    This will our default Taskers and install Flack and Flor one directory level below your app ( ../). Remove the --flack-and-flor switch if you already have them installed.

  4. TODO

Testing

  1. Clone the gem
  2. Run bundle install
  3. Run rake app:floristry:setup_flack This will install Flack
  4. Run rake app:floristry:setup_dummy from the gem's root directory.
  5. Start Flack and the dummy rails app rake app:server:start
  6. Run the specs bundle exec rspec (specs need a running flack instance).
  7. Use the dummy app listening at localhost:3000 for testing.
  8. Stop all the servers: rake app:server:stop

Usage

TODO

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Do your stuff
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

License

GPLv2

Source

https://github.com/mantor/floristry

Authors

  • Danny Fullerton - Mantor Organization
  • Jean-Francois Rioux - Mantor Organization

About

Interact with Flor's workflow engine through Rails facilities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 83.5%
  • HTML 12.5%
  • SCSS 1.5%
  • JavaScript 1.1%
  • CSS 0.6%
  • Dockerfile 0.5%
  • CoffeeScript 0.3%