• Stars
    star
    166
  • Rank 227,748 (Top 5 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Petri Net Workflow Engine for Ruby.

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.

More Repositories

1

second_level_cache

Write Through and Read Through caching library inspired by CacheMoney and cache_fu, support ActiveRecord 4, 5 and 6.
Ruby
396
star
2

oauth_china

OAuth gem for rails,支持新浪,腾讯,网易,搜狐微博和豆瓣。
Ruby
185
star
3

direct_web_spider

A direct web spider framworks for Ruby
Ruby
140
star
4

pgmq

📮🐘 💎 pgmq. Message Queue with Postgres.
PLpgSQL
57
star
5

oh-my-github-circles

GitHub User Circle Generator Using GitHub Actions
JavaScript
47
star
6

schemaless-pg

使用Postgres实现一个Leancloud clone
Ruby
44
star
7

hackernews-insight

Hackernews Insight using TiDB Cloud
21
star
8

pg-fuzzywuzzy

postgresql fuzzywuzzy extension
PLpgSQL
12
star
9

shadow

shadow table.
PLpgSQL
12
star
10

txt2img

txt2img
Ruby
12
star
11

remote_session_demo

Remote Session Demo
Ruby
11
star
12

kiba-plus

Kiba enhancement for Ruby ETL.
Ruby
9
star
13

oh-my-github-dashboard

This repository provides a data pipeline that syncs GitHub repositories with a free MySQL-compatible cloud database, TiDB Cloud. It can be used as a standalone data pipeline or as a personal dashboard.
TypeScript
8
star
14

si9n

语录推荐系统
JavaScript
7
star
15

oh-my-github-pipeline

🔄 A flexible open-source data pipeline for seamlessly syncing data from any github user to your database.
Ruby
6
star
16

repo-track-pipeline

🔄 A flexible open-source data pipeline for seamlessly syncing data from any repository to your database.
Ruby
6
star
17

redundant_column

redundant_column
Ruby
6
star
18

hooopo.github.com

octopress
JavaScript
5
star
19

nolist

Simple Maillist with Mailgun and Sinatra
Ruby
4
star
20

rails-tidb

Ruby
4
star
21

pgmq_worker_ruby_demo

pgmq worker
Ruby
3
star
22

chatgpt-xiaoai

小爱音箱集成LLM,SaaS 服务
Ruby
3
star
23

learn_erlang

learn erlang
Erlang
3
star
24

activerecord-tidb-adapter-demo

Ruby
2
star
25

websocket_sinatra_demo

websocket sinatra demo
Ruby
2
star
26

kiba-plus-demo

Kiba Plus demo.
Ruby
2
star
27

dash-reshape

This is a GitHub tool that provides a comprehensive repository dashboard for analyzing and visualizing GitHub events in a powerful and intuitive way
Ruby
2
star
28

dlt

Data Lake Toolkit for Ruby.
1
star
29

drawerd-server

starter
JavaScript
1
star
30

repo-contributor-circles

GitHub repo contributor circles generator.
JavaScript
1
star
31

mi-service

XiaoMi Cloud Service for mi.com
Ruby
1
star
32

ossinsight-x

Automatically post trending repos to Twitter every day.
Ruby
1
star
33

tidb-serverless-ruby-connect-example

TiDB serverless ruby connect example
Ruby
1
star