openwferu 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/examples/mano_tracker.rb +165 -0
  2. data/examples/scheduler_cron_usage.rb +46 -0
  3. data/examples/scheduler_usage.rb +54 -0
  4. data/lib/openwfe/contextual.rb +7 -1
  5. data/lib/openwfe/engine/engine.rb +58 -15
  6. data/lib/openwfe/expool/expressionpool.rb +116 -14
  7. data/lib/openwfe/expool/expstorage.rb +12 -12
  8. data/lib/openwfe/expool/journalexpstorage.rb +1 -1
  9. data/lib/openwfe/expool/yamlexpstorage.rb +58 -22
  10. data/lib/openwfe/expressions/environment.rb +32 -2
  11. data/lib/openwfe/expressions/expressionmap.rb +17 -0
  12. data/lib/openwfe/expressions/fe_condition.rb +122 -0
  13. data/lib/openwfe/expressions/fe_cursor.rb +14 -5
  14. data/lib/openwfe/expressions/fe_participant.rb +55 -4
  15. data/lib/openwfe/expressions/fe_raw.rb +43 -12
  16. data/lib/openwfe/expressions/fe_subprocess.rb +10 -0
  17. data/lib/openwfe/expressions/fe_time.rb +117 -22
  18. data/lib/openwfe/expressions/fe_value.rb +27 -8
  19. data/lib/openwfe/expressions/flowexpression.rb +13 -6
  20. data/lib/openwfe/expressions/raw_prog.rb +13 -11
  21. data/lib/openwfe/expressions/timeout.rb +94 -0
  22. data/lib/openwfe/flowexpressionid.rb +17 -19
  23. data/lib/openwfe/logging.rb +35 -16
  24. data/lib/openwfe/participants/atomparticipants.rb +31 -7
  25. data/lib/openwfe/participants/enoparticipant.rb +43 -3
  26. data/lib/openwfe/participants/participant.rb +21 -1
  27. data/lib/openwfe/participants/participantmap.rb +4 -2
  28. data/lib/openwfe/participants/participants.rb +12 -17
  29. data/lib/openwfe/participants/soapparticipants.rb +15 -3
  30. data/lib/openwfe/rudefinitions.rb +3 -0
  31. data/lib/openwfe/service.rb +8 -0
  32. data/lib/openwfe/storage/yamlfilestorage.rb +85 -47
  33. data/lib/openwfe/{otime.rb → util/otime.rb} +0 -0
  34. data/lib/openwfe/util/scheduler.rb +415 -231
  35. data/lib/openwfe/util/schedulers.rb +11 -3
  36. data/lib/openwfe/util/stoppable.rb +69 -0
  37. data/lib/openwfe/utils.rb +14 -25
  38. data/lib/openwfe/workitem.rb +12 -6
  39. data/lib/openwfe/worklist/storeparticipant.rb +145 -0
  40. data/test/{atomtest.rb → atom_test.rb} +0 -0
  41. data/test/{crontest.rb → cron_test.rb} +7 -6
  42. data/test/cronline_test.rb +51 -0
  43. data/test/{dollartest.rb → dollar_test.rb} +0 -0
  44. data/test/{feitest.rb → fei_test.rb} +0 -0
  45. data/test/file_persistence_test.rb +15 -9
  46. data/test/flowtestbase.rb +11 -5
  47. data/test/ft_0.rb +8 -0
  48. data/test/ft_10_loop.rb +72 -10
  49. data/test/ft_11_ppd.rb +49 -0
  50. data/test/ft_17_condition.rb +83 -0
  51. data/test/ft_18_pname.rb +59 -0
  52. data/test/hparticipant_test.rb +96 -0
  53. data/test/{misctest.rb → misc_test.rb} +1 -1
  54. data/test/rake_qtest.rb +10 -4
  55. data/test/rake_test.rb +12 -1
  56. data/test/raw_prog_test.rb +1 -1
  57. data/test/restart_cron_test.rb +78 -0
  58. data/test/restart_test.rb +79 -0
  59. data/test/scheduler_test.rb +92 -0
  60. data/test/{timetest.rb → time_test.rb} +3 -38
  61. data/test/timeout_test.rb +73 -0
  62. metadata +26 -11
  63. data/lib/openwfe/worklist/worklists.rb +0 -175
metadata CHANGED
@@ -3,9 +3,9 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: openwferu
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.2
7
- date: 2007-01-26 00:00:00 +09:00
8
- summary: An OpenWFE-compatible workflow engine in Ruby
6
+ version: 0.9.3
7
+ date: 2007-02-05 00:00:00 +09:00
8
+ summary: an open source ruby workflow and bpm engine
9
9
  require_paths:
10
10
  - lib
11
11
  email: john at openwfe dot org
@@ -30,6 +30,7 @@ post_install_message:
30
30
  authors:
31
31
  - John Mettraux
32
32
  - Alain Hoang
33
+ - Nicolas Modrzyk
33
34
  files:
34
35
  - bin/validate-workflow.rb
35
36
  - lib/openwfe
@@ -41,7 +42,6 @@ files:
41
42
  - lib/openwfe/flowexpressionid.rb
42
43
  - lib/openwfe/logging.rb
43
44
  - lib/openwfe/osocket.rb
44
- - lib/openwfe/otime.rb
45
45
  - lib/openwfe/participants
46
46
  - lib/openwfe/rest
47
47
  - lib/openwfe/rudefinitions.rb
@@ -60,6 +60,7 @@ files:
60
60
  - lib/openwfe/expressions/environment.rb
61
61
  - lib/openwfe/expressions/expressionmap.rb
62
62
  - lib/openwfe/expressions/fe_concurrence.rb
63
+ - lib/openwfe/expressions/fe_condition.rb
63
64
  - lib/openwfe/expressions/fe_cursor.rb
64
65
  - lib/openwfe/expressions/fe_define.rb
65
66
  - lib/openwfe/expressions/fe_fqv.rb
@@ -76,6 +77,7 @@ files:
76
77
  - lib/openwfe/expressions/flowexpression.rb
77
78
  - lib/openwfe/expressions/raw_prog.rb
78
79
  - lib/openwfe/expressions/raw_xml.rb
80
+ - lib/openwfe/expressions/timeout.rb
79
81
  - lib/openwfe/participants/atomparticipants.rb
80
82
  - lib/openwfe/participants/enoparticipant.rb
81
83
  - lib/openwfe/participants/participant.rb
@@ -91,13 +93,16 @@ files:
91
93
  - lib/openwfe/storage/yamlfilestorage.rb
92
94
  - lib/openwfe/util/dollar.rb
93
95
  - lib/openwfe/util/lru_cache.rb
96
+ - lib/openwfe/util/otime.rb
94
97
  - lib/openwfe/util/scheduler.rb
95
98
  - lib/openwfe/util/schedulers.rb
96
- - lib/openwfe/worklist/worklists.rb
97
- - test/atomtest.rb
98
- - test/crontest.rb
99
- - test/dollartest.rb
100
- - test/feitest.rb
99
+ - lib/openwfe/util/stoppable.rb
100
+ - lib/openwfe/worklist/storeparticipant.rb
101
+ - test/atom_test.rb
102
+ - test/cron_test.rb
103
+ - test/cronline_test.rb
104
+ - test/dollar_test.rb
105
+ - test/fei_test.rb
101
106
  - test/file_persistence_test.rb
102
107
  - test/flowtestbase.rb
103
108
  - test/ft_0.rb
@@ -111,6 +116,8 @@ files:
111
116
  - test/ft_14b_subprocess.rb
112
117
  - test/ft_15_iterator.rb
113
118
  - test/ft_16_fqv.rb
119
+ - test/ft_17_condition.rb
120
+ - test/ft_18_pname.rb
114
121
  - test/ft_1_unset.rb
115
122
  - test/ft_2_concurrence.rb
116
123
  - test/ft_3_equals.rb
@@ -120,19 +127,27 @@ files:
120
127
  - test/ft_7_lose.rb
121
128
  - test/ft_8_forget.rb
122
129
  - test/ft_9_cursor.rb
130
+ - test/hparticipant_test.rb
123
131
  - test/journal_persistence_test.rb
124
- - test/misctest.rb
132
+ - test/misc_test.rb
125
133
  - test/rake_ptest.rb
126
134
  - test/rake_qtest.rb
127
135
  - test/rake_test.rb
128
136
  - test/raw_prog_test.rb
129
137
  - test/README.txt
130
138
  - test/rest_test.rb
139
+ - test/restart_cron_test.rb
140
+ - test/restart_test.rb
131
141
  - test/rutest_utils.rb
132
- - test/timetest.rb
142
+ - test/scheduler_test.rb
143
+ - test/time_test.rb
144
+ - test/timeout_test.rb
133
145
  - examples/homeworkreview.rb
146
+ - examples/mano_tracker.rb
134
147
  - examples/quotereporter.rb
135
148
  - examples/README.txt
149
+ - examples/scheduler_cron_usage.rb
150
+ - examples/scheduler_usage.rb
136
151
  - README.txt
137
152
  test_files:
138
153
  - test/rake_test.rb
@@ -1,175 +0,0 @@
1
- #
2
- #--
3
- # Copyright (c) 2005-2007, John Mettraux, OpenWFE.org
4
- # All rights reserved.
5
- #
6
- # Redistribution and use in source and binary forms, with or without
7
- # modification, are permitted provided that the following conditions are met:
8
- #
9
- # . Redistributions of source code must retain the above copyright notice, this
10
- # list of conditions and the following disclaimer.
11
- #
12
- # . Redistributions in binary form must reproduce the above copyright notice,
13
- # this list of conditions and the following disclaimer in the documentation
14
- # and/or other materials provided with the distribution.
15
- #
16
- # . Neither the name of the "OpenWFE" nor the names of its contributors may be
17
- # used to endorse or promote products derived from this software without
18
- # specific prior written permission.
19
- #
20
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24
- # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
- # POSSIBILITY OF SUCH DAMAGE.
31
- #++
32
- #
33
- # $Id: worklistclient.rb 3454 2006-10-08 16:51:00Z jmettraux $
34
- #
35
-
36
- #
37
- # Nicolas Modrzyk at openwfe.org
38
- #
39
-
40
- module OpenWFE
41
-
42
- class Worklist
43
-
44
- att_reader: :stores, :locks, :launchables
45
-
46
- #
47
- # Returns the list of stores of the worklist
48
- #
49
- def list_stores ()
50
- raise "Not Implemented Yet"
51
- end
52
-
53
- #
54
- # A synonym for listStores()
55
- #
56
- def getStoreNames ()
57
- return listStores()
58
- end
59
-
60
- #
61
- # Returns the headers of a given store.
62
- #
63
- def getHeaders (storeName, limit=1000)
64
- raise "Not Implemented Yet"
65
- end
66
-
67
- def findFlowInstance (storeName, workflowInstanceId)
68
- raise "Not Implemented Yet"
69
- end
70
-
71
- #
72
- # Launches a flow (on a given engine and with a given launchitem).
73
- # The 'engineId' corresponds to an engine's participant name
74
- # (see etc/engine/participant-map.xml)
75
- #
76
- def launchFlow (engineId, launchitem)
77
- raise "Not Implemented Yet"
78
- end
79
-
80
- #
81
- # Returns a workitem (but doesn't put a lock on it, thus modifications
82
- # to it cannot be communicated with saveWorkitem() or forwardWorkitem()
83
- # to the worklist)
84
- #
85
- def getWorkitem (storeName, flowExpressionId)
86
- raise "Not Implemented Yet"
87
- end
88
-
89
- #
90
- # Returns a workitem and makes sure it's locked in the worklist. Thus,
91
- # the usage of the methods saveWorkitem() and forwardWorkitem() is
92
- # possible.
93
- #
94
- def getAndLockWorkitem (storeName, flowExpressionId)
95
- raise "Not Implemented Yet"
96
- end
97
-
98
- #
99
- # Given a queryMap (a dict of keys and values), locks and returns
100
- # the first workitem matching.
101
- #
102
- def queryAndLockWorkitem (storeName, queryMap)
103
- raise "Not Implemented Yet"
104
- end
105
-
106
- #
107
- # Notifies the worklist that the given workitem has to be unlocked
108
- # any local (client-side) modification to it are ignored.
109
- #
110
- def releaseWorkitem (workitem)
111
- raise "Not Implemented Yet"
112
- end
113
-
114
- #
115
- # Saves back the workitem in the worklist (and releases it)
116
- #
117
- def saveWorkitem (workitem)
118
- raise "Not Implemented Yet"
119
- end
120
-
121
- #
122
- # Returns the workitem to the worklist so that it can resume
123
- # its flow (changes to the workitem are saved).
124
- #
125
- def proceedWorkitem (workitem)
126
- raise "Not Implemented Yet"
127
- end
128
-
129
- #
130
- # Returns the list of flow URLs the user owning this session may
131
- # launch.
132
- #
133
- def listLaunchables ()
134
- raise "Not Implemented Yet"
135
- end
136
-
137
- #
138
- # Delegate the workitem (transfer it to another store).
139
- #
140
- def delegate (workitem, targetStoreName)
141
- raise "Not Implemented Yet"
142
- end
143
-
144
- #
145
- # Delegate the workitem (ask the worklist to deliver it to
146
- # another participant).
147
- #
148
- def delegateToParticipant (workitem, targetParticipantName)
149
- raise "Not Implemented Yet"
150
- end
151
-
152
- def queryStore (storeName, query)
153
- raise "Not Implemented Yet"
154
- end
155
-
156
- alias list_stores listStores
157
- alias get_store_names getStoreNames
158
- alias get_headers getHeaders
159
- alias find_flow_instance findFlowInstance
160
- alias launch_flow launchFlow
161
- alias get_workitem getWorkitem
162
- alias get_and_lock_workitem getAndLockWorkitem
163
- alias query_and_lock_workitem queryAndLockWorkitem
164
- alias release_workitem releaseWorkitem
165
- alias save_workitem saveWorkitem
166
- alias proceed_workitem proceedWorkitem
167
- alias forwardWorkitem proceedWorkitem
168
- alias forward_workitem proceedWorkitem
169
- alias list_launchables listLaunchables
170
- alias delegate_to_participant delegateToParticipant
171
-
172
- end
173
-
174
- end
175
-