openwferu 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/{README → README.txt} +16 -13
- data/bin/validate-workflow.rb +46 -22
- data/examples/README.txt +8 -0
- data/examples/homeworkreview.rb +66 -0
- data/examples/quotereporter.rb +154 -0
- data/lib/{openwferu.rb → openwfe.rb} +6 -8
- data/lib/{ru → openwfe}/contextual.rb +11 -3
- data/lib/{ru → openwfe/engine}/engine.rb +50 -36
- data/lib/{ru/participant.rb → openwfe/engine/file_persisted_engine.rb} +21 -22
- data/lib/openwfe/expool/expressionpool.rb +534 -0
- data/lib/openwfe/expool/expstorage.rb +184 -0
- data/lib/openwfe/expool/journalexpstorage.rb +312 -0
- data/lib/openwfe/expool/yamlexpstorage.rb +127 -0
- data/lib/{ru → openwfe/expressions}/environment.rb +19 -14
- data/lib/{ru → openwfe/expressions}/expressionmap.rb +48 -21
- data/lib/{ru → openwfe/expressions}/fe_concurrence.rb +111 -35
- data/lib/openwfe/expressions/fe_cursor.rb +236 -0
- data/lib/{ru → openwfe/expressions}/fe_define.rb +5 -5
- data/lib/openwfe/expressions/fe_fqv.rb +99 -0
- data/lib/openwfe/expressions/fe_iterator.rb +182 -0
- data/lib/{ru/fe_misc.rb → openwfe/expressions/fe_losfor.rb} +14 -56
- data/lib/openwfe/expressions/fe_misc.rb +102 -0
- data/lib/{ru → openwfe/expressions}/fe_participant.rb +25 -14
- data/lib/{ru → openwfe/expressions}/fe_raw.rb +39 -75
- data/lib/{ru/fe_base.rb → openwfe/expressions/fe_sequence.rb} +40 -35
- data/lib/{ru → openwfe/expressions}/fe_subprocess.rb +30 -14
- data/lib/{ru → openwfe/expressions}/fe_time.rb +59 -31
- data/lib/{ru → openwfe/expressions}/fe_utils.rb +42 -26
- data/lib/{ru → openwfe/expressions}/fe_value.rb +20 -14
- data/lib/openwfe/expressions/flowexpression.rb +434 -0
- data/lib/openwfe/expressions/raw_prog.rb +391 -0
- data/lib/openwfe/expressions/raw_xml.rb +128 -0
- data/lib/openwfe/flowexpressionid.rb +148 -0
- data/lib/{ru → openwfe}/logging.rb +10 -6
- data/lib/{osocket.rb → openwfe/osocket.rb} +36 -35
- data/lib/{otime.rb → openwfe/otime.rb} +71 -21
- data/lib/openwfe/participants/atomparticipants.rb +144 -0
- data/lib/openwfe/participants/enoparticipant.rb +73 -0
- data/lib/openwfe/participants/participant.rb +85 -0
- data/lib/{ru → openwfe/participants}/participantmap.rb +40 -12
- data/lib/{ru → openwfe/participants}/participants.rb +41 -12
- data/lib/openwfe/participants/soapparticipants.rb +96 -0
- data/lib/{controlclient.rb → openwfe/rest/controlclient.rb} +12 -13
- data/lib/{definitions.rb → openwfe/rest/definitions.rb} +3 -3
- data/lib/{exception.rb → openwfe/rest/exception.rb} +3 -3
- data/lib/{restclient.rb → openwfe/rest/restclient.rb} +13 -22
- data/lib/{worklistclient.rb → openwfe/rest/worklistclient.rb} +33 -46
- data/lib/openwfe/rest/xmlcodec.rb +575 -0
- data/lib/{ru → openwfe}/rudefinitions.rb +32 -4
- data/lib/{ru → openwfe}/service.rb +20 -8
- data/lib/openwfe/storage/yamlfilestorage.rb +159 -0
- data/lib/{ru → openwfe/util}/dollar.rb +10 -8
- data/lib/openwfe/util/lru_cache.rb +149 -0
- data/lib/{ru → openwfe/util}/scheduler.rb +18 -10
- data/lib/{ru → openwfe/util}/schedulers.rb +7 -7
- data/lib/{utils.rb → openwfe/utils.rb} +93 -9
- data/lib/openwfe/workitem.rb +366 -0
- data/lib/openwfe/worklist/worklists.rb +175 -0
- data/test/README.txt +27 -0
- data/test/atomtest.rb +99 -0
- data/test/crontest.rb +58 -0
- data/test/dollartest.rb +3 -3
- data/test/feitest.rb +42 -14
- data/test/file_persistence_test.rb +93 -0
- data/test/flowtestbase.rb +72 -26
- data/test/ft_0.rb +1 -97
- data/test/ft_0b_sequence.rb +33 -0
- data/test/ft_0c_testname.rb +29 -0
- data/test/ft_10_loop.rb +48 -0
- data/test/ft_11_ppd.rb +292 -0
- data/test/ft_12_blockparticipant.rb +45 -0
- data/test/ft_13_eno.rb +51 -0
- data/test/ft_14_subprocess.rb +90 -0
- data/test/ft_14b_subprocess.rb +40 -0
- data/test/ft_15_iterator.rb +70 -0
- data/test/ft_16_fqv.rb +57 -0
- data/test/ft_1_unset.rb +25 -1
- data/test/ft_2_concurrence.rb +10 -5
- data/test/ft_3_equals.rb +35 -1
- data/test/ft_4_misc.rb +16 -1
- data/test/ft_5_time.rb +26 -1
- data/test/ft_6_lambda.rb +2 -1
- data/test/{ft_7_losfor.rb → ft_7_lose.rb} +41 -35
- data/test/ft_8_forget.rb +46 -0
- data/test/ft_9_cursor.rb +94 -0
- data/test/journal_persistence_test.rb +147 -0
- data/test/misctest.rb +13 -9
- data/test/rake_ptest.rb +18 -0
- data/test/rake_qtest.rb +43 -0
- data/test/{fulltest.rb → rake_test.rb} +2 -2
- data/test/raw_prog_test.rb +236 -0
- data/test/rest_test.rb +189 -0
- data/test/rutest_utils.rb +1 -1
- data/test/timetest.rb +42 -34
- metadata +125 -82
- data/lib/codec.rb +0 -573
- data/lib/flowexpressionid.rb +0 -139
- data/lib/ru/expressionpool.rb +0 -382
- data/lib/ru/expressionstorage.rb +0 -99
- data/lib/ru/flowexpression.rb +0 -272
- data/lib/ru/ruutils.rb +0 -70
- data/lib/test.rb +0 -222
- data/lib/workitem.rb +0 -249
- data/test/quicktest.rb +0 -21
data/lib/workitem.rb
DELETED
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
#--
|
|
3
|
-
# Copyright (c) 2005-2006, 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: workitem.rb 3556 2006-11-13 04:15:52Z jmettraux $
|
|
34
|
-
#
|
|
35
|
-
|
|
36
|
-
#
|
|
37
|
-
# "hecho en Costa Rica"
|
|
38
|
-
#
|
|
39
|
-
# john.mettraux@openwfe.org
|
|
40
|
-
#
|
|
41
|
-
|
|
42
|
-
require 'base64'
|
|
43
|
-
|
|
44
|
-
require 'definitions'
|
|
45
|
-
require 'utils'
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
module OpenWFE
|
|
49
|
-
|
|
50
|
-
#
|
|
51
|
-
# WORKITEMS
|
|
52
|
-
#
|
|
53
|
-
|
|
54
|
-
class WorkItem
|
|
55
|
-
|
|
56
|
-
attr_accessor :lastModified, :attributes
|
|
57
|
-
|
|
58
|
-
def initialize ()
|
|
59
|
-
|
|
60
|
-
@lastModified = nil
|
|
61
|
-
|
|
62
|
-
@attributes = {}
|
|
63
|
-
@attributes[MAP_TYPE] = E_SMAP
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
def copy ()
|
|
67
|
-
raise "not implemented"
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
class InFlowItem < WorkItem
|
|
72
|
-
|
|
73
|
-
attr_accessor :flowExpressionId, :participantName
|
|
74
|
-
|
|
75
|
-
def lastExpressionId
|
|
76
|
-
return @flowExpressionId
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
def lastExpressionId= (fei)
|
|
80
|
-
@flowExpressionId = fei
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
alias last_expression_id lastExpressionId
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
class InFlowWorkItem < InFlowItem
|
|
87
|
-
|
|
88
|
-
attr_accessor :dispatchTime, :filter, :history
|
|
89
|
-
|
|
90
|
-
attr_accessor :store
|
|
91
|
-
#
|
|
92
|
-
# special : added by the ruby lib, not given by the worklist
|
|
93
|
-
|
|
94
|
-
def dup
|
|
95
|
-
return OpenWFE::dup(self)
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
class CancelItem < InFlowItem
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
class LaunchItem < WorkItem
|
|
103
|
-
|
|
104
|
-
attr_accessor :workflowDefinitionUrl
|
|
105
|
-
#, :descriptionMap
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
#
|
|
110
|
-
# HISTORY ITEM
|
|
111
|
-
#
|
|
112
|
-
|
|
113
|
-
class HistoryItem
|
|
114
|
-
|
|
115
|
-
attr_accessor \
|
|
116
|
-
:date, \
|
|
117
|
-
:author, \
|
|
118
|
-
:host, \
|
|
119
|
-
:text, \
|
|
120
|
-
:wfdName, \
|
|
121
|
-
:wfdRevision, \
|
|
122
|
-
:wfInstanceId, \
|
|
123
|
-
:expressionId
|
|
124
|
-
|
|
125
|
-
def dup
|
|
126
|
-
return OpenWFE::dup(self)
|
|
127
|
-
end
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
#
|
|
132
|
-
# STORES
|
|
133
|
-
#
|
|
134
|
-
|
|
135
|
-
#
|
|
136
|
-
# Models the information about a store as viewed by the current user
|
|
137
|
-
# (upon calling the listStores or getStoreNames methods)
|
|
138
|
-
#
|
|
139
|
-
class Store
|
|
140
|
-
|
|
141
|
-
attr_accessor :name, :workitemCount, :permissions
|
|
142
|
-
|
|
143
|
-
def initialize ()
|
|
144
|
-
@name = nil
|
|
145
|
-
@workitemCount = nil
|
|
146
|
-
@permissions = nil
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
#
|
|
150
|
-
# Returns true if the current user may read headers and workitems
|
|
151
|
-
# from this store
|
|
152
|
-
#
|
|
153
|
-
def mayRead? ()
|
|
154
|
-
return @permissions.index('r') > -1
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
#
|
|
158
|
-
# Returns true if the current user may modify workitems (and at least
|
|
159
|
-
# proceed/forward them) in this store
|
|
160
|
-
#
|
|
161
|
-
def mayWrite? ()
|
|
162
|
-
return @permissions.index('w') > -1
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
#
|
|
166
|
-
# Returns true if the current user may browse the headers of this
|
|
167
|
-
# store
|
|
168
|
-
#
|
|
169
|
-
def mayBrowse? ()
|
|
170
|
-
return @permissions.index('b') > -1
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
#
|
|
174
|
-
# Returns true if the current user may delegate workitems to this store
|
|
175
|
-
#
|
|
176
|
-
def mayDelegate? ()
|
|
177
|
-
return @permissions.index('d') > -1
|
|
178
|
-
end
|
|
179
|
-
end
|
|
180
|
-
|
|
181
|
-
#
|
|
182
|
-
# A header is a summary of a workitem, returned by the getHeader
|
|
183
|
-
# worklist method
|
|
184
|
-
#
|
|
185
|
-
class Header
|
|
186
|
-
|
|
187
|
-
attr_accessor :lastModified, :locked, :flowExpressionId, :attributes
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
#
|
|
192
|
-
# MISC ATTRIBUTES
|
|
193
|
-
#
|
|
194
|
-
# in openwfe-ruby, OpenWFE attributes are immediately mapped to
|
|
195
|
-
# Ruby instances, but some attributes still deserve their own class
|
|
196
|
-
#
|
|
197
|
-
|
|
198
|
-
#
|
|
199
|
-
# a wrapper for some binary content
|
|
200
|
-
#
|
|
201
|
-
class Base64Attribute
|
|
202
|
-
|
|
203
|
-
attr_accessor :content
|
|
204
|
-
|
|
205
|
-
def initialize (base64content)
|
|
206
|
-
|
|
207
|
-
@content = base64content
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
#
|
|
211
|
-
# dewraps (decode) the current content and returns it
|
|
212
|
-
#
|
|
213
|
-
def dewrap ()
|
|
214
|
-
|
|
215
|
-
return Base64.decode64(@content)
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
#
|
|
219
|
-
# wraps some binary content and stores it in this attribute
|
|
220
|
-
# (class method)
|
|
221
|
-
#
|
|
222
|
-
def Base64Attribute.wrap (binaryData)
|
|
223
|
-
|
|
224
|
-
return Base64Attribute.new(Base64.encode64(binaryData))
|
|
225
|
-
end
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
#
|
|
230
|
-
# LAUNCHABLE
|
|
231
|
-
#
|
|
232
|
-
|
|
233
|
-
class Launchable
|
|
234
|
-
|
|
235
|
-
attr_accessor :url, :engineId
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
#
|
|
240
|
-
# EXPRESSION (for the control iface)
|
|
241
|
-
#
|
|
242
|
-
|
|
243
|
-
class Expression
|
|
244
|
-
|
|
245
|
-
attr_accessor :id, :applyTime, :state, :stateSince
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
end
|
|
249
|
-
|
data/test/quicktest.rb
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Testing OpenWFEru
|
|
3
|
-
#
|
|
4
|
-
# John Mettraux at openwfe.org
|
|
5
|
-
#
|
|
6
|
-
# Mon Oct 9 22:19:44 JST 2006
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
#require 'test/unit'
|
|
10
|
-
|
|
11
|
-
require 'ft_2_concurrence'
|
|
12
|
-
require 'feitest'
|
|
13
|
-
require 'dollartest'
|
|
14
|
-
require 'misctest'
|
|
15
|
-
require 'ft_0'
|
|
16
|
-
require 'ft_1_unset'
|
|
17
|
-
require 'ft_3_equals'
|
|
18
|
-
require 'ft_4_misc'
|
|
19
|
-
require 'ft_6_lambda'
|
|
20
|
-
require 'ft_7_losfor'
|
|
21
|
-
|