weel 1.99.91 → 1.99.96
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weel.rb +21 -14
- data/weel.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d57273f8a41035b63f07d1d3539c73460c14f66d15c127a2d03b0084ab5990ea
|
4
|
+
data.tar.gz: ebcc6596ec5179ceb57166bf9cd5e174ff11cce119bda6834ef1f6faf3b15b1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59417172655d756d29c40a8d7fc4101baad460c53667823671fe3dd7379e9157ee6310f99029d6e08b808f134819f4e9af1a0eab6e8e5c272b6b02765ca9e8fb
|
7
|
+
data.tar.gz: 4ce71748c9925987e7d2acc8188a913ed7d2c7f24d2db7e21d5f75e21065df3e270ae8311ccac58d768f147f564f4cb66177a1c26402e81f554da43d3b412787
|
data/lib/weel.rb
CHANGED
@@ -238,7 +238,7 @@ class WEEL
|
|
238
238
|
end # }}}
|
239
239
|
|
240
240
|
class HandlerWrapperBase # {{{
|
241
|
-
def self::loop_guard(lid,count); false; end
|
241
|
+
def self::loop_guard(arguments,lid,count); false; end
|
242
242
|
def self::inform_state_change(arguments,newstate); end
|
243
243
|
def self::inform_syntax_error(arguments,err,code); end
|
244
244
|
def self::inform_handlerwrapper_error(arguments,err); end
|
@@ -636,7 +636,7 @@ class WEEL
|
|
636
636
|
searchmode = __weel_is_in_search_mode(position)
|
637
637
|
return if searchmode
|
638
638
|
return if self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
|
639
|
-
__weel_progress
|
639
|
+
__weel_progress position, true
|
640
640
|
self.__weel_state = :stopping
|
641
641
|
end #}}}
|
642
642
|
|
@@ -681,8 +681,9 @@ class WEEL
|
|
681
681
|
end
|
682
682
|
end #}}}
|
683
683
|
|
684
|
-
def __weel_progress(
|
684
|
+
def __weel_progress(position, skip=false) #{{{
|
685
685
|
ipc = {}
|
686
|
+
branch = Thread.current
|
686
687
|
if Thread.current[:branch_parent] && Thread.current[:branch_parent][:branch_position]
|
687
688
|
@__weel_positions.delete Thread.current[:branch_parent][:branch_position]
|
688
689
|
ipc[:unmark] ||= []
|
@@ -694,9 +695,15 @@ class WEEL
|
|
694
695
|
ipc[:unmark] ||= []
|
695
696
|
ipc[:unmark] << Thread.current[:branch_position] rescue nil
|
696
697
|
end
|
697
|
-
wp =
|
698
|
+
wp = if branch[:branch_search_now] == true
|
699
|
+
branch[:branch_search_now] = false
|
700
|
+
WEEL::Position.new(position, skip ? :after : :at, @__weel_search_positions[position]&.passthrough)
|
701
|
+
else
|
702
|
+
WEEL::Position.new(position, skip ? :after : :at)
|
703
|
+
end
|
698
704
|
ipc[skip ? :after : :at] = [wp]
|
699
705
|
|
706
|
+
@__weel_search_positions.delete(position)
|
700
707
|
@__weel_search_positions.each do |k,ele| # some may still be in active search but lets unmark them for good measure
|
701
708
|
ipc[:unmark] ||= []
|
702
709
|
ipc[:unmark] << ele
|
@@ -726,7 +733,7 @@ class WEEL
|
|
726
733
|
return
|
727
734
|
end
|
728
735
|
|
729
|
-
wp = __weel_progress
|
736
|
+
wp = __weel_progress position
|
730
737
|
|
731
738
|
# searchmode position is after, jump directly to vote_sync_after
|
732
739
|
raise Signal::Proceed if searchmode == :after
|
@@ -772,13 +779,7 @@ class WEEL
|
|
772
779
|
raise Signal::Stop unless handlerwrapper.vote_sync_before(params)
|
773
780
|
raise Signal::Skip if self.__weel_state == :stopping || self.__weel_state == :finishing
|
774
781
|
|
775
|
-
|
776
|
-
passthrough = @__weel_search_positions[position].passthrough
|
777
|
-
@__weel_search_positions[position].passthrough = nil
|
778
|
-
else
|
779
|
-
passthrough = nil
|
780
|
-
end
|
781
|
-
handlerwrapper.activity_handle passthrough, params
|
782
|
+
handlerwrapper.activity_handle wp.passthrough, params
|
782
783
|
wp.passthrough = handlerwrapper.activity_passthrough_value
|
783
784
|
unless wp.passthrough.nil?
|
784
785
|
@__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, :wait => [wp]
|
@@ -923,9 +924,11 @@ class WEEL
|
|
923
924
|
|
924
925
|
if position && @__weel_search_positions.include?(position) # matching searchpos => start execution from here
|
925
926
|
branch[:branch_search] = false # execute all activities in THIS branch (thread) after this point
|
927
|
+
branch[:branch_search_now] = true # just now did we switch the search mode
|
926
928
|
while branch.key?(:branch_parent) # also all parent branches should execute activities after this point, additional branches spawned by parent branches should still be in search mode
|
927
929
|
branch = branch[:branch_parent]
|
928
930
|
branch[:branch_search] = false
|
931
|
+
branch[:branch_search_now] = true # just now did we switch the search mode
|
929
932
|
end
|
930
933
|
@__weel_search_positions[position].detail == :after
|
931
934
|
else
|
@@ -1101,8 +1104,12 @@ public
|
|
1101
1104
|
# Stop the workflow execution
|
1102
1105
|
def stop # {{{
|
1103
1106
|
Thread.new do
|
1104
|
-
@dslr.__weel_state
|
1105
|
-
|
1107
|
+
if @dslr.__weel_state == :running
|
1108
|
+
@dslr.__weel_state = :stopping
|
1109
|
+
@dslr.__weel_main.join if @dslr.__weel_main
|
1110
|
+
elsif @dslr.__weel_state == :ready || @dslr.__weel_state == :stopped
|
1111
|
+
@dslr.__weel_state = :stopped
|
1112
|
+
end
|
1106
1113
|
end
|
1107
1114
|
end # }}}
|
1108
1115
|
# Start the workflow execution
|
data/weel.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.99.
|
4
|
+
version: 1.99.96
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|