petri_flow 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +28 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/config/wf_manifest.js +2 -0
  6. data/app/assets/javascripts/wf/application.js +4 -0
  7. data/app/assets/stylesheets/wf/application.scss +2 -0
  8. data/app/assets/stylesheets/wf/arcs.css +4 -0
  9. data/app/assets/stylesheets/wf/cases.css +4 -0
  10. data/app/assets/stylesheets/wf/comments.css +4 -0
  11. data/app/assets/stylesheets/wf/fields.css +4 -0
  12. data/app/assets/stylesheets/wf/forms.css +4 -0
  13. data/app/assets/stylesheets/wf/guards.css +4 -0
  14. data/app/assets/stylesheets/wf/places.css +4 -0
  15. data/app/assets/stylesheets/wf/transitions.css +4 -0
  16. data/app/assets/stylesheets/wf/workflows.css +4 -0
  17. data/app/assets/stylesheets/wf/workitem_assignments.css +4 -0
  18. data/app/assets/stylesheets/wf/workitems.css +4 -0
  19. data/app/controllers/wf/application_controller.rb +14 -0
  20. data/app/controllers/wf/arcs_controller.rb +61 -0
  21. data/app/controllers/wf/cases_controller.rb +48 -0
  22. data/app/controllers/wf/comments_controller.rb +30 -0
  23. data/app/controllers/wf/fields_controller.rb +54 -0
  24. data/app/controllers/wf/forms_controller.rb +59 -0
  25. data/app/controllers/wf/guards_controller.rb +58 -0
  26. data/app/controllers/wf/places_controller.rb +53 -0
  27. data/app/controllers/wf/transitions_controller.rb +69 -0
  28. data/app/controllers/wf/workflows_controller.rb +59 -0
  29. data/app/controllers/wf/workitem_assignments_controller.rb +30 -0
  30. data/app/controllers/wf/workitems_controller.rb +79 -0
  31. data/app/helpers/wf/application_helper.rb +6 -0
  32. data/app/helpers/wf/arcs_helper.rb +6 -0
  33. data/app/helpers/wf/cases_helper.rb +6 -0
  34. data/app/helpers/wf/comments_helper.rb +6 -0
  35. data/app/helpers/wf/fields_helper.rb +6 -0
  36. data/app/helpers/wf/forms_helper.rb +6 -0
  37. data/app/helpers/wf/guards_helper.rb +6 -0
  38. data/app/helpers/wf/places_helper.rb +6 -0
  39. data/app/helpers/wf/transitions_helper.rb +6 -0
  40. data/app/helpers/wf/workflows_helper.rb +6 -0
  41. data/app/helpers/wf/workitem_assignments_helper.rb +6 -0
  42. data/app/helpers/wf/workitems_helper.rb +6 -0
  43. data/app/jobs/wf/application_job.rb +6 -0
  44. data/app/jobs/wf/fire_timed_workitem_job.rb +15 -0
  45. data/app/mailers/wf/application_mailer.rb +8 -0
  46. data/app/models/wf/application_record.rb +7 -0
  47. data/app/models/wf/arc.rb +42 -0
  48. data/app/models/wf/callbacks/assignment_default.rb +12 -0
  49. data/app/models/wf/callbacks/deadline_default.rb +11 -0
  50. data/app/models/wf/callbacks/enable_default.rb +11 -0
  51. data/app/models/wf/callbacks/fire_default.rb +11 -0
  52. data/app/models/wf/callbacks/hold_timeout_default.rb +11 -0
  53. data/app/models/wf/callbacks/notification_default.rb +11 -0
  54. data/app/models/wf/callbacks/time_default.rb +11 -0
  55. data/app/models/wf/callbacks/unassignment_default.rb +11 -0
  56. data/app/models/wf/case.rb +44 -0
  57. data/app/models/wf/case_assignment.rb +22 -0
  58. data/app/models/wf/case_command/add_comment.rb +17 -0
  59. data/app/models/wf/case_command/add_manual_assignment.rb +17 -0
  60. data/app/models/wf/case_command/add_token.rb +20 -0
  61. data/app/models/wf/case_command/add_workitem_assignment.rb +35 -0
  62. data/app/models/wf/case_command/begin_workitem_action.rb +33 -0
  63. data/app/models/wf/case_command/cancel.rb +17 -0
  64. data/app/models/wf/case_command/cancel_workitem.rb +20 -0
  65. data/app/models/wf/case_command/clear_manual_assignments.rb +16 -0
  66. data/app/models/wf/case_command/clear_workitem_assignments.rb +20 -0
  67. data/app/models/wf/case_command/consume_token.rb +23 -0
  68. data/app/models/wf/case_command/enable_transitions.rb +33 -0
  69. data/app/models/wf/case_command/end_workitem_action.rb +25 -0
  70. data/app/models/wf/case_command/finish_workitem.rb +18 -0
  71. data/app/models/wf/case_command/finished_p.rb +28 -0
  72. data/app/models/wf/case_command/fire_message_transition.rb +20 -0
  73. data/app/models/wf/case_command/fire_transition_internal.rb +41 -0
  74. data/app/models/wf/case_command/lock_token.rb +21 -0
  75. data/app/models/wf/case_command/new.rb +17 -0
  76. data/app/models/wf/case_command/release_token.rb +20 -0
  77. data/app/models/wf/case_command/remove_manual_assignment.rb +17 -0
  78. data/app/models/wf/case_command/remove_workitem_assignment.rb +24 -0
  79. data/app/models/wf/case_command/resume.rb +17 -0
  80. data/app/models/wf/case_command/set_workitem_assignments.rb +32 -0
  81. data/app/models/wf/case_command/start_case.rb +19 -0
  82. data/app/models/wf/case_command/start_workitem.rb +26 -0
  83. data/app/models/wf/case_command/suspend.rb +17 -0
  84. data/app/models/wf/case_command/sweep_automatic_transitions.rb +31 -0
  85. data/app/models/wf/case_command/sweep_timed_transitions.rb +16 -0
  86. data/app/models/wf/case_command/workitem_action.rb +20 -0
  87. data/app/models/wf/comment.rb +21 -0
  88. data/app/models/wf/demo_target.rb +18 -0
  89. data/app/models/wf/entry.rb +33 -0
  90. data/app/models/wf/field.rb +53 -0
  91. data/app/models/wf/field_value.rb +30 -0
  92. data/app/models/wf/form.rb +18 -0
  93. data/app/models/wf/group.rb +21 -0
  94. data/app/models/wf/guard.rb +73 -0
  95. data/app/models/wf/party.rb +22 -0
  96. data/app/models/wf/place.rb +28 -0
  97. data/app/models/wf/token.rb +37 -0
  98. data/app/models/wf/transition.rb +49 -0
  99. data/app/models/wf/transition_static_assignment.rb +21 -0
  100. data/app/models/wf/user.rb +26 -0
  101. data/app/models/wf/workflow.rb +182 -0
  102. data/app/models/wf/workitem.rb +78 -0
  103. data/app/models/wf/workitem_assignment.rb +19 -0
  104. data/app/views/layouts/wf/_alert.html.erb +4 -0
  105. data/app/views/layouts/wf/_footer.html.erb +13 -0
  106. data/app/views/layouts/wf/_nav.html.erb +13 -0
  107. data/app/views/layouts/wf/_notice.html.erb +4 -0
  108. data/app/views/layouts/wf/application.html.erb +34 -0
  109. data/app/views/wf/arcs/_form.html.erb +40 -0
  110. data/app/views/wf/arcs/edit.html.erb +1 -0
  111. data/app/views/wf/arcs/new.html.erb +1 -0
  112. data/app/views/wf/arcs/show.html.erb +67 -0
  113. data/app/views/wf/cases/_form.html.erb +27 -0
  114. data/app/views/wf/cases/index.html.erb +35 -0
  115. data/app/views/wf/cases/new.html.erb +1 -0
  116. data/app/views/wf/cases/show.html.erb +113 -0
  117. data/app/views/wf/comments/new.html.erb +27 -0
  118. data/app/views/wf/fields/_form.html.erb +42 -0
  119. data/app/views/wf/fields/edit.html.erb +1 -0
  120. data/app/views/wf/fields/new.html.erb +1 -0
  121. data/app/views/wf/forms/_form.html.erb +32 -0
  122. data/app/views/wf/forms/edit.html.erb +1 -0
  123. data/app/views/wf/forms/index.html.erb +32 -0
  124. data/app/views/wf/forms/new.html.erb +1 -0
  125. data/app/views/wf/forms/show.html.erb +53 -0
  126. data/app/views/wf/guards/_form.html.erb +43 -0
  127. data/app/views/wf/guards/edit.html.erb +1 -0
  128. data/app/views/wf/guards/new.html.erb +1 -0
  129. data/app/views/wf/places/_form.html.erb +43 -0
  130. data/app/views/wf/places/edit.html.erb +1 -0
  131. data/app/views/wf/places/new.html.erb +1 -0
  132. data/app/views/wf/transitions/_form.html.erb +92 -0
  133. data/app/views/wf/transitions/edit.html.erb +1 -0
  134. data/app/views/wf/transitions/new.html.erb +1 -0
  135. data/app/views/wf/workflows/_form.html.erb +32 -0
  136. data/app/views/wf/workflows/edit.html.erb +1 -0
  137. data/app/views/wf/workflows/index.html.erb +38 -0
  138. data/app/views/wf/workflows/new.html.erb +1 -0
  139. data/app/views/wf/workflows/show.html.erb +177 -0
  140. data/app/views/wf/workitem_assignments/new.html.erb +27 -0
  141. data/app/views/wf/workitems/index.html.erb +68 -0
  142. data/app/views/wf/workitems/pre_finish.html.erb +33 -0
  143. data/app/views/wf/workitems/show.html.erb +211 -0
  144. data/config/routes.rb +30 -0
  145. data/db/migrate/20200130201043_init.rb +226 -0
  146. data/db/migrate/20200130201641_init_some_data.rb +15 -0
  147. data/db/migrate/20200131200455_create_wf_entries.rb +19 -0
  148. data/db/migrate/20200201001543_add_target_field_name_for_guard.rb +7 -0
  149. data/lib/tasks/wf_tasks.rake +5 -0
  150. data/lib/wf/engine.rb +10 -0
  151. data/lib/wf/version.rb +5 -0
  152. data/lib/wf.rb +7 -0
  153. metadata +312 -0
metadata ADDED
@@ -0,0 +1,312 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: petri_flow
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Hooopo Wang
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-02-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bootstrap
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 4.4.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 4.4.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: bootstrap4-kaminari-views
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: jquery-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: kaminari
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: loaf
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 6.0.2
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 6.0.2.1
93
+ type: :runtime
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: 6.0.2
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 6.0.2.1
103
+ - !ruby/object:Gem::Dependency
104
+ name: ruby-graphviz
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :runtime
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: simple_command
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :runtime
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ description: Petri Net Workflow Engine for Ruby.
132
+ email:
133
+ - hoooopo@gmail.com
134
+ executables: []
135
+ extensions: []
136
+ extra_rdoc_files: []
137
+ files:
138
+ - MIT-LICENSE
139
+ - README.md
140
+ - Rakefile
141
+ - app/assets/config/wf_manifest.js
142
+ - app/assets/javascripts/wf/application.js
143
+ - app/assets/stylesheets/wf/application.scss
144
+ - app/assets/stylesheets/wf/arcs.css
145
+ - app/assets/stylesheets/wf/cases.css
146
+ - app/assets/stylesheets/wf/comments.css
147
+ - app/assets/stylesheets/wf/fields.css
148
+ - app/assets/stylesheets/wf/forms.css
149
+ - app/assets/stylesheets/wf/guards.css
150
+ - app/assets/stylesheets/wf/places.css
151
+ - app/assets/stylesheets/wf/transitions.css
152
+ - app/assets/stylesheets/wf/workflows.css
153
+ - app/assets/stylesheets/wf/workitem_assignments.css
154
+ - app/assets/stylesheets/wf/workitems.css
155
+ - app/controllers/wf/application_controller.rb
156
+ - app/controllers/wf/arcs_controller.rb
157
+ - app/controllers/wf/cases_controller.rb
158
+ - app/controllers/wf/comments_controller.rb
159
+ - app/controllers/wf/fields_controller.rb
160
+ - app/controllers/wf/forms_controller.rb
161
+ - app/controllers/wf/guards_controller.rb
162
+ - app/controllers/wf/places_controller.rb
163
+ - app/controllers/wf/transitions_controller.rb
164
+ - app/controllers/wf/workflows_controller.rb
165
+ - app/controllers/wf/workitem_assignments_controller.rb
166
+ - app/controllers/wf/workitems_controller.rb
167
+ - app/helpers/wf/application_helper.rb
168
+ - app/helpers/wf/arcs_helper.rb
169
+ - app/helpers/wf/cases_helper.rb
170
+ - app/helpers/wf/comments_helper.rb
171
+ - app/helpers/wf/fields_helper.rb
172
+ - app/helpers/wf/forms_helper.rb
173
+ - app/helpers/wf/guards_helper.rb
174
+ - app/helpers/wf/places_helper.rb
175
+ - app/helpers/wf/transitions_helper.rb
176
+ - app/helpers/wf/workflows_helper.rb
177
+ - app/helpers/wf/workitem_assignments_helper.rb
178
+ - app/helpers/wf/workitems_helper.rb
179
+ - app/jobs/wf/application_job.rb
180
+ - app/jobs/wf/fire_timed_workitem_job.rb
181
+ - app/mailers/wf/application_mailer.rb
182
+ - app/models/wf/application_record.rb
183
+ - app/models/wf/arc.rb
184
+ - app/models/wf/callbacks/assignment_default.rb
185
+ - app/models/wf/callbacks/deadline_default.rb
186
+ - app/models/wf/callbacks/enable_default.rb
187
+ - app/models/wf/callbacks/fire_default.rb
188
+ - app/models/wf/callbacks/hold_timeout_default.rb
189
+ - app/models/wf/callbacks/notification_default.rb
190
+ - app/models/wf/callbacks/time_default.rb
191
+ - app/models/wf/callbacks/unassignment_default.rb
192
+ - app/models/wf/case.rb
193
+ - app/models/wf/case_assignment.rb
194
+ - app/models/wf/case_command/add_comment.rb
195
+ - app/models/wf/case_command/add_manual_assignment.rb
196
+ - app/models/wf/case_command/add_token.rb
197
+ - app/models/wf/case_command/add_workitem_assignment.rb
198
+ - app/models/wf/case_command/begin_workitem_action.rb
199
+ - app/models/wf/case_command/cancel.rb
200
+ - app/models/wf/case_command/cancel_workitem.rb
201
+ - app/models/wf/case_command/clear_manual_assignments.rb
202
+ - app/models/wf/case_command/clear_workitem_assignments.rb
203
+ - app/models/wf/case_command/consume_token.rb
204
+ - app/models/wf/case_command/enable_transitions.rb
205
+ - app/models/wf/case_command/end_workitem_action.rb
206
+ - app/models/wf/case_command/finish_workitem.rb
207
+ - app/models/wf/case_command/finished_p.rb
208
+ - app/models/wf/case_command/fire_message_transition.rb
209
+ - app/models/wf/case_command/fire_transition_internal.rb
210
+ - app/models/wf/case_command/lock_token.rb
211
+ - app/models/wf/case_command/new.rb
212
+ - app/models/wf/case_command/release_token.rb
213
+ - app/models/wf/case_command/remove_manual_assignment.rb
214
+ - app/models/wf/case_command/remove_workitem_assignment.rb
215
+ - app/models/wf/case_command/resume.rb
216
+ - app/models/wf/case_command/set_workitem_assignments.rb
217
+ - app/models/wf/case_command/start_case.rb
218
+ - app/models/wf/case_command/start_workitem.rb
219
+ - app/models/wf/case_command/suspend.rb
220
+ - app/models/wf/case_command/sweep_automatic_transitions.rb
221
+ - app/models/wf/case_command/sweep_timed_transitions.rb
222
+ - app/models/wf/case_command/workitem_action.rb
223
+ - app/models/wf/comment.rb
224
+ - app/models/wf/demo_target.rb
225
+ - app/models/wf/entry.rb
226
+ - app/models/wf/field.rb
227
+ - app/models/wf/field_value.rb
228
+ - app/models/wf/form.rb
229
+ - app/models/wf/group.rb
230
+ - app/models/wf/guard.rb
231
+ - app/models/wf/party.rb
232
+ - app/models/wf/place.rb
233
+ - app/models/wf/token.rb
234
+ - app/models/wf/transition.rb
235
+ - app/models/wf/transition_static_assignment.rb
236
+ - app/models/wf/user.rb
237
+ - app/models/wf/workflow.rb
238
+ - app/models/wf/workitem.rb
239
+ - app/models/wf/workitem_assignment.rb
240
+ - app/views/layouts/wf/_alert.html.erb
241
+ - app/views/layouts/wf/_footer.html.erb
242
+ - app/views/layouts/wf/_nav.html.erb
243
+ - app/views/layouts/wf/_notice.html.erb
244
+ - app/views/layouts/wf/application.html.erb
245
+ - app/views/wf/arcs/_form.html.erb
246
+ - app/views/wf/arcs/edit.html.erb
247
+ - app/views/wf/arcs/new.html.erb
248
+ - app/views/wf/arcs/show.html.erb
249
+ - app/views/wf/cases/_form.html.erb
250
+ - app/views/wf/cases/index.html.erb
251
+ - app/views/wf/cases/new.html.erb
252
+ - app/views/wf/cases/show.html.erb
253
+ - app/views/wf/comments/new.html.erb
254
+ - app/views/wf/fields/_form.html.erb
255
+ - app/views/wf/fields/edit.html.erb
256
+ - app/views/wf/fields/new.html.erb
257
+ - app/views/wf/forms/_form.html.erb
258
+ - app/views/wf/forms/edit.html.erb
259
+ - app/views/wf/forms/index.html.erb
260
+ - app/views/wf/forms/new.html.erb
261
+ - app/views/wf/forms/show.html.erb
262
+ - app/views/wf/guards/_form.html.erb
263
+ - app/views/wf/guards/edit.html.erb
264
+ - app/views/wf/guards/new.html.erb
265
+ - app/views/wf/places/_form.html.erb
266
+ - app/views/wf/places/edit.html.erb
267
+ - app/views/wf/places/new.html.erb
268
+ - app/views/wf/transitions/_form.html.erb
269
+ - app/views/wf/transitions/edit.html.erb
270
+ - app/views/wf/transitions/new.html.erb
271
+ - app/views/wf/workflows/_form.html.erb
272
+ - app/views/wf/workflows/edit.html.erb
273
+ - app/views/wf/workflows/index.html.erb
274
+ - app/views/wf/workflows/new.html.erb
275
+ - app/views/wf/workflows/show.html.erb
276
+ - app/views/wf/workitem_assignments/new.html.erb
277
+ - app/views/wf/workitems/index.html.erb
278
+ - app/views/wf/workitems/pre_finish.html.erb
279
+ - app/views/wf/workitems/show.html.erb
280
+ - config/routes.rb
281
+ - db/migrate/20200130201043_init.rb
282
+ - db/migrate/20200130201641_init_some_data.rb
283
+ - db/migrate/20200131200455_create_wf_entries.rb
284
+ - db/migrate/20200201001543_add_target_field_name_for_guard.rb
285
+ - lib/tasks/wf_tasks.rake
286
+ - lib/wf.rb
287
+ - lib/wf/engine.rb
288
+ - lib/wf/version.rb
289
+ homepage: https://github.com/hooopo/wf
290
+ licenses:
291
+ - MIT
292
+ metadata: {}
293
+ post_install_message:
294
+ rdoc_options: []
295
+ require_paths:
296
+ - lib
297
+ required_ruby_version: !ruby/object:Gem::Requirement
298
+ requirements:
299
+ - - ">="
300
+ - !ruby/object:Gem::Version
301
+ version: '0'
302
+ required_rubygems_version: !ruby/object:Gem::Requirement
303
+ requirements:
304
+ - - ">="
305
+ - !ruby/object:Gem::Version
306
+ version: '0'
307
+ requirements: []
308
+ rubygems_version: 3.0.3
309
+ signing_key:
310
+ specification_version: 4
311
+ summary: Petri Net Workflow Engine for Ruby.
312
+ test_files: []