weel 1.99.79 → 1.99.80
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.
- checksums.yaml +4 -4
- data/example/SimpleHandlerWrapper.rb +15 -6
- data/example/SimpleWorkflow.rb +5 -5
- data/example/runme.rb +3 -3
- data/lib/weel.rb +3 -3
- data/weel.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd7014b809336a6c102633b2d1e46c67bf3ddf4ab7a85e2c16a45d225d397074
|
4
|
+
data.tar.gz: 3e40ca8e6317ccab10f4a7e17928531b851c23481376e66b6bdfb8d67cfef65a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d94a84ff33c81361f70185c220ccddd76bea06c61194f91c1b5767766512f4d07b938270169ca4c45dae962c3e8841f6c4b329c1d096752131747b3f826996b3
|
7
|
+
data.tar.gz: f7fbdf0206fb8fcec716d4254e5b8202f0a749b12c14d0da0fed3a495320097e96adbdf2b7d3e0238a6220335ecf07008c37134881d40727f121d6b1de281135
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# This file is part of WEEL.
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# WEEL is free software: you can redistribute it and/or modify it under the terms
|
4
4
|
# of the GNU General Public License as published by the Free Software Foundation,
|
5
5
|
# either version 3 of the License, or (at your option) any later version.
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# WEEL is distributed in the hope that it will be useful, but WITHOUT ANY
|
8
8
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
9
9
|
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# You should have received a copy of the GNU General Public License along with
|
12
12
|
# WEEL (file COPYING in the main directory). If not, see
|
13
13
|
# <http://www.gnu.org/licenses/>.
|
@@ -15,14 +15,23 @@
|
|
15
15
|
require "pp"
|
16
16
|
|
17
17
|
class SimpleHandlerWrapper < WEEL::HandlerWrapperBase
|
18
|
-
def
|
18
|
+
def self::inform_state_change(arguments,newstate); puts "#{newstate}: #{arguments}"; end
|
19
|
+
def self::inform_syntax_error(arguments,err,code); puts "Syntax error: #{err}"; end
|
20
|
+
def self::inform_handlerwrapper_error(arguments,err); puts "Handlerwrapper error: #{err}"; end
|
21
|
+
|
22
|
+
def initialize(args,position=nil,continue=nil)
|
19
23
|
@__myhandler_stopped = false
|
20
24
|
@__myhandler_position = position
|
21
25
|
@__myhandler_continue = continue
|
22
|
-
@__myhandler_endpoint =
|
26
|
+
@__myhandler_endpoint = nil
|
23
27
|
@__myhandler_returnValue = nil
|
24
28
|
end
|
25
29
|
|
30
|
+
def prepare(readonly, endpoints, parameters, replay=false)
|
31
|
+
@__myhandler_endpoints = endpoints
|
32
|
+
parameters
|
33
|
+
end
|
34
|
+
|
26
35
|
# executes a ws-call to the given endpoint with the given parameters. the call
|
27
36
|
# can be executed asynchron, see finished_call & return_value
|
28
37
|
def activity_handle(passthrough, parameters)
|
@@ -35,7 +44,7 @@ class SimpleHandlerWrapper < WEEL::HandlerWrapperBase
|
|
35
44
|
@__myhandler_returnValue = 'Handler_Dummy_Result'
|
36
45
|
@__myhandler_continue.continue
|
37
46
|
end
|
38
|
-
|
47
|
+
|
39
48
|
# returns the result of the last handled call
|
40
49
|
def activity_result_value
|
41
50
|
@__myhandler_returnValue
|
data/example/SimpleWorkflow.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# This file is part of WEEL.
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# WEEL is free software: you can redistribute it and/or modify it under the terms
|
4
4
|
# of the GNU General Public License as published by the Free Software Foundation,
|
5
5
|
# either version 3 of the License, or (at your option) any later version.
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# WEEL is distributed in the hope that it will be useful, but WITHOUT ANY
|
8
8
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
9
9
|
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# You should have received a copy of the GNU General Public License along with
|
12
12
|
# WEEL (file COPYING in the main directory). If not, see
|
13
13
|
# <http://www.gnu.org/licenses/>.
|
@@ -17,12 +17,12 @@ require ::File.dirname(__FILE__) + '/SimpleHandlerWrapper'
|
|
17
17
|
|
18
18
|
class SimpleWorkflow < WEEL
|
19
19
|
handlerwrapper SimpleHandlerWrapper
|
20
|
-
|
20
|
+
|
21
21
|
endpoint :ep1 => "orf.at"
|
22
22
|
data :a => 17
|
23
23
|
|
24
24
|
control flow do
|
25
|
-
|
25
|
+
call :a1, :ep1, parameters: { :a => data.a, :b => 2 } do
|
26
26
|
data.a += 3
|
27
27
|
end
|
28
28
|
end
|
data/example/runme.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# This file is part of WEEL.
|
3
|
-
#
|
3
|
+
#
|
4
4
|
# WEEL is free software: you can redistribute it and/or modify it under the terms
|
5
5
|
# of the GNU General Public License as published by the Free Software Foundation,
|
6
6
|
# either version 3 of the License, or (at your option) any later version.
|
7
|
-
#
|
7
|
+
#
|
8
8
|
# WEEL is distributed in the hope that it will be useful, but WITHOUT ANY
|
9
9
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
10
10
|
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
11
|
-
#
|
11
|
+
#
|
12
12
|
# You should have received a copy of the GNU General Public License along with
|
13
13
|
# WEEL (file COPYING in the main directory). If not, see
|
14
14
|
# <http://www.gnu.org/licenses/>.
|
data/lib/weel.rb
CHANGED
@@ -44,7 +44,7 @@ class ReadStructure # {{{
|
|
44
44
|
def initialize(data,endpoints)
|
45
45
|
@__weel_data = data.dup
|
46
46
|
@__weel_data.transform_values! do |v|
|
47
|
-
if v.is_a?
|
47
|
+
if Object.const_defined?(:XML) && XML.const_defined?(:Smart) && v.is_a?(XML::Smart::Dom)
|
48
48
|
v.root.to_doc
|
49
49
|
else
|
50
50
|
begin
|
@@ -814,7 +814,7 @@ end # }}}
|
|
814
814
|
handlerwrapper.inform_activity_failed se
|
815
815
|
self.__weel_state = :stopping
|
816
816
|
rescue => err
|
817
|
-
|
817
|
+
@__weel_handlerwrapper::inform_handlerwrapper_error @__weel_handlerwrapper_args, err
|
818
818
|
self.__weel_state = :stopping
|
819
819
|
ensure
|
820
820
|
Thread.current[:continue].clear if Thread.current[:continue] && Thread.current[:continue].is_a?(Continue)
|
@@ -915,7 +915,7 @@ end # }}}
|
|
915
915
|
if newState == :stopping || newState == :finishing
|
916
916
|
@__weel_status.nudge!
|
917
917
|
__weel_recursive_continue(@__weel_main)
|
918
|
-
|
918
|
+
__weel_replay = false
|
919
919
|
end
|
920
920
|
|
921
921
|
@__weel_handlerwrapper::inform_state_change @__weel_handlerwrapper_args, @__weel_state
|
data/weel.gemspec
CHANGED