weel 1.99.105 → 1.99.106

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/weel.rb +17 -8
  3. data/weel.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36eb4b85ca61d7f3581ed326a038ded4e7efcebfb07df13f5d449d3e4b60784f
4
- data.tar.gz: 655750bd2f7ba16c7951eb0d93c111f06788193120a445478108d16d6a9a35ac
3
+ metadata.gz: 627e4761660de50801a488a4616023f2ec16339859d5542d92a7601d7e2178de
4
+ data.tar.gz: 30752f561acbf9aebc0592d92a1796918e5d50f879b26c2bee245965ce5dd72c
5
5
  SHA512:
6
- metadata.gz: 1e60b5ea0829d5507f61599a917473eaa51b4fe5fb7f786c377ee8005a2fcf6ae295875729c634588815e1ad76f0fb46058b332b5a0b55528b7030f6d911b7e5
7
- data.tar.gz: ae3b62411608b8725e734900520e7a42d99559852d131f24609699b72cdbbfa6f2d845ddcfa17c4a03a9bf3ab906da8911c36c71cdf0d27d40189f40c85c84f9
6
+ metadata.gz: 2874bf3236b00980121e9560cb7e6ee2d09bbc55b56732cc9dd5693165e74042d6bd2a135e67c285ef98c0bb154cd5e982d2e4129f7fb2fc1631b74ff61a8857
7
+ data.tar.gz: c44982e0661e397a673214955acd2e9e2647e878748ee394b8d37a1a2eba6bcab3785ef2693511424d1d72f670c7f35a331ab06a33f8a3fcd72210d3c87afa65
data/lib/weel.rb CHANGED
@@ -43,7 +43,7 @@ class WEEL
43
43
  end # }}}
44
44
 
45
45
  class ReadStructure # {{{
46
- def initialize(data,endpoints,additional)
46
+ def initialize(data,endpoints,local,additional)
47
47
  @__weel_data = data.transform_values do |v|
48
48
  if Object.const_defined?(:XML) && XML.const_defined?(:Smart) && v.is_a?(XML::Smart::Dom)
49
49
  v.root.to_doc
@@ -56,6 +56,7 @@ class WEEL
56
56
  end
57
57
  end
58
58
  @__weel_endpoints = endpoints.transform_values{ |v| v.dup }
59
+ @__weel_local = local
59
60
  @additional = additional
60
61
  end
61
62
 
@@ -91,14 +92,18 @@ class WEEL
91
92
  def endpoints
92
93
  ReadHash.new(@__weel_endpoints)
93
94
  end
95
+ def local
96
+ @__weel_local.first
97
+ end
94
98
  end # }}}
95
99
  class ManipulateStructure # {{{
96
- def initialize(data,endpoints,status,additional)
100
+ def initialize(data,endpoints,status,local,additional)
97
101
  @__weel_data = data
98
102
  @__weel_data_orig = @__weel_data.transform_values{|val| Marshal.dump(val) } rescue nil
99
103
  @__weel_endpoints = endpoints
100
104
  @__weel_endpoints_orig = @__weel_endpoints.transform_values{|val| Marshal.dump(val) }
101
105
  @__weel_status = status
106
+ @__weel_local = local
102
107
  @changed_status = "#{status.id}-#{status.message}"
103
108
  @changed_data = []
104
109
  @touched_data = []
@@ -165,6 +170,9 @@ class WEEL
165
170
  def endpoints
166
171
  ManipulateHash.new(@__weel_endpoints,@touched_endpoints,@changed_endpoints)
167
172
  end
173
+ def local
174
+ @__weel_local.first
175
+ end
168
176
  def status
169
177
  @__weel_status
170
178
  end
@@ -543,6 +551,7 @@ class WEEL
543
551
  Thread.current[:branch_status] = false
544
552
  Thread.current[:branch_parent] = branch_parent
545
553
  Thread.current[:start_event] = Continue.new
554
+ Thread.current[:local] = local
546
555
  Thread.current[:branch_wait_count_cancel_active] = false
547
556
  branch_parent[:mutex].synchronize do
548
557
  Thread.current[:branch_traces_id] = branch_parent[:branch_traces_ids]
@@ -759,7 +768,7 @@ class WEEL
759
768
  def __weel_eval_condition(condition) #{{{
760
769
  begin
761
770
  connectionwrapper = @__weel_connectionwrapper.new @__weel_connectionwrapper_args unless condition.is_a?(Proc)
762
- condition.is_a?(Proc) ? condition.call : connectionwrapper.test_condition(ReadStructure.new(@__weel_data,@__weel_endpoints,connectionwrapper.additional),condition)
771
+ condition.is_a?(Proc) ? condition.call : connectionwrapper.test_condition(ReadStructure.new(@__weel_data,@__weel_endpoints,Thread.current[:local],connectionwrapper.additional),condition)
763
772
  rescue NameError => err # don't look into it, or it will explode
764
773
  # if you access $! here, BOOOM
765
774
  self.__weel_state = :stopping
@@ -844,10 +853,10 @@ class WEEL
844
853
  connectionwrapper.activity_manipulate_handle(parameters)
845
854
  connectionwrapper.inform_activity_manipulate
846
855
  if finalize.is_a?(Proc)
847
- mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,connectionwrapper.additional)
856
+ mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional)
848
857
  mr.instance_eval(&finalize)
849
858
  elsif finalize.is_a?(String)
850
- mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,connectionwrapper.additional)
859
+ mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional)
851
860
  connectionwrapper.manipulate(mr,finalize,'Activity ' + position.to_s)
852
861
  end
853
862
  connectionwrapper.inform_manipulate_change(
@@ -865,7 +874,7 @@ class WEEL
865
874
  begin
866
875
  again = catch Signal::Again do
867
876
  connectionwrapper.mem_guard
868
- rs = ReadStructure.new(@__weel_data,@__weel_endpoints,connectionwrapper.additional)
877
+ rs = ReadStructure.new(@__weel_data,@__weel_endpoints,Thread.current[:local],connectionwrapper.additional)
869
878
  if prepare
870
879
  if prepare.is_a?(Proc)
871
880
  rs.instance_exec(&prepare)
@@ -909,7 +918,7 @@ class WEEL
909
918
  if code.is_a?(Proc) || code.is_a?(String)
910
919
  connectionwrapper.inform_activity_manipulate
911
920
  if code.is_a?(Proc)
912
- mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,connectionwrapper.additional)
921
+ mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional)
913
922
  ma = catch Signal::Again do
914
923
  case code.arity
915
924
  when 1; mr.instance_exec(connectionwrapper.activity_result_value,&code)
@@ -920,7 +929,7 @@ class WEEL
920
929
  'yes' # ma sadly will have nil when i just throw
921
930
  end
922
931
  elsif code.is_a?(String)
923
- mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,connectionwrapper.additional)
932
+ mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional)
924
933
  ma = catch Signal::Again do
925
934
  connectionwrapper.manipulate(mr,code,'Activity ' + position.to_s,connectionwrapper.activity_result_value,connectionwrapper.activity_result_options)
926
935
  'yes' # ma sadly will have nil when i just throw
data/weel.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "weel"
3
- s.version = "1.99.105"
3
+ s.version = "1.99.106"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Workflow Execution Engine Library (WEEL)"
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.105
4
+ version: 1.99.106
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler