GithubHelp home page GithubHelp logo

hooopo / petri_flow Goto Github PK

View Code? Open in Web Editor NEW
163.0 5.0 12.0 1.17 MB

Petri Net Workflow Engine for Ruby.

Home Page: https://hooopo.gitbook.io/petri-flow/

License: MIT License

Ruby 68.92% JavaScript 0.46% CSS 1.04% HTML 27.21% SCSS 2.37%
petri-net workflow petrinet workflow-automation

petri_flow's Introduction

Petri Flow Ruby Gem Testing

Workflow engine for Rails.

Features

  • Full petri net features support (seq, parallel, iterative, timed, automitic etc.)
  • Both approval workflow and business workflow.
  • Simple web admin for workflow definition and case management.
  • Build-in simple dynamic form.
  • Replaceable dynamic form.
  • Support sub workflow.
  • Graph screen for workflow definition.
  • Graph screen for case and token migration.
  • Powerful guard expression.
  • MySQL and Postgres Support.
  • Powerful assignment management.
  • Flexible integration of organizational structure system(role, group, position or department etc.)

Docs

Screenshots

iterative routing

parallel_routing

guard

case state graph

Installation

Add this line to your application's Gemfile:

gem 'petri_flow', require: 'wf'

And then execute:

$ bundle

Install graphviz

brew install graphviz

Migration:

bundle exec rake wf:install:migrations
bundle exec rails db:create
bundle exec rails db:migrate
bundle exec rails db:seed

Usage

Add wf_config:

# config/initializers/wf_config.rb
Wf.user_class = "::User"
Wf.org_classes = { group: "::Group" }

Set parties:

For normal org model, for example group or role etc.

module Wf
  class Group < ApplicationRecord
    has_many :users 
    include Wf::ActsAsParty
    acts_as_party(user: false, party_name: :name)
  end
end

For user model:

module Wf
  class User < ApplicationRecord
    belongs_to :group, optional: true
    include Wf::ActsAsParty
    acts_as_party(user: true, party_name: :name)
  end
end

then

bundle exec rails 

visit:

http://localhost:3000/wf

Testing

  • RAILS_ENV=test rake app:db:migrate && RAILS_ENV=test rake app:db:test:prepare && bundle exec rake test

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

petri_flow's People

Contributors

dependabot[bot] avatar hooopo avatar imgbotapp avatar jasl avatar younthu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

petri_flow's Issues

Sub Workflow

transition can trigger a new workflow instance.

Typo

Expected:<%= link_to 'Add Guards', new_arc_guard_path(arc), class: 'btn btn-sm btn-outline-primary mr-2' %>
Actual:<%= link_to 'Add Gruards', new_arc_guard_path(arc), class: 'btn btn-sm btn-outline-primary mr-2' %>

Expected: <h5 class="card-header">Dynamic Form</h5>
Actual: <h5 class="card-header">Dynimac Form</h5>

Expected: bundle exec rails server
Actual: bundle exec rails

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.