weel 1.99.129 → 1.99.130

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 +23 -22
  3. data/weel.gemspec +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52a9d1b00bfbd9df62e95f290c520c447b8cb2bb4d4add32efa2b7ec2e31fc54
4
- data.tar.gz: 8d0d3bb0a413fb1ad7a2d81ea63c2eade55e5f0173045daaced8f495fc6f1de0
3
+ metadata.gz: a65829729d2a2508096cec3ee8ab6ee5abbd32d718cc50a4b2c68fc5632728bc
4
+ data.tar.gz: 4c1a71c7a48f37a41fe99c8b79f70adc2fa175f44635ead7694c7d3a5a4865ba
5
5
  SHA512:
6
- metadata.gz: cce8bf3f578fd2700c317a011437fc6f806f5b4b51d335473a041c3e0253fa06e981d9dfd00edebbae8c9cad1b8a1bbfe20e4afab3445b1549eda6cab18b5281
7
- data.tar.gz: 8497d993333e112bf56c4431040ca454ee8eeeb57f6fd9437abe9c6deac2b6115c0b672aa28e8ce2f47d23dcc5b5f6226315fd6e0d9f01d7507bfe1460c48b86
6
+ metadata.gz: f6f771194196936be9d5b82fe7995fdf432bc61a59abfc51b004cd214a2b9738947e8eb90ef23bc0558dc5871d772358bff92109a21afa9cae18a303584dcfae
7
+ data.tar.gz: 5df275e55141dc2beb82530b968b0afa004985466f829acb59d7d48debb23f02180b96ddf2c6fb1dd0327049a61b0321a23dce67d8d7de42177ab524a2492482
data/lib/weel.rb CHANGED
@@ -355,9 +355,8 @@ class WEEL
355
355
  def activity_passthrough_value; end
356
356
  def activity_uuid; '42424242-cpee-cpee-cpee-424242424242'; end
357
357
 
358
- def activity_no_longer_necessary; end
359
-
360
358
  def inform_activity_done; end
359
+ def inform_activity_cancelled; end
361
360
  def inform_activity_manipulate; end
362
361
  def inform_activity_failed(err); end
363
362
  def inform_manipulate_change(status,changed_data,changed_endpoints,data,endpoints); end
@@ -380,8 +379,8 @@ class WEEL
380
379
  end
381
380
  end
382
381
 
383
- def join_branches(branches); end
384
- def split_branches(branches); end
382
+ def join_branches(id,branches=[]); end
383
+ def split_branches(id,branches=[]); end
385
384
  end # }}}
386
385
 
387
386
  class Position # {{{
@@ -534,7 +533,7 @@ class WEEL
534
533
  end
535
534
 
536
535
  cw = @__weel_connectionwrapper.new @__weel_connectionwrapper_args
537
- cw.split_branches(Thread.current[:branch_traces])
536
+ cw.split_branches Thread.current.__id__, Thread.current[:branch_traces]
538
537
 
539
538
  Thread.current[:branches].each do |thread|
540
539
  # decide after executing block in parallel cause for coopis
@@ -547,7 +546,7 @@ class WEEL
547
546
 
548
547
  Thread.current[:branch_event].wait unless self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped || Thread.current[:branches].length == 0
549
548
 
550
- cw.join_branches(Thread.current[:branch_traces])
549
+ cw.join_branches Thread.current.__id__, Thread.current[:branch_traces]
551
550
 
552
551
  unless self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped
553
552
  # first set all to no_longer_neccessary, just in case, but this should not be necessary
@@ -635,9 +634,11 @@ class WEEL
635
634
  Thread.current[:alternative_mode] << mode
636
635
 
637
636
  cw = @__weel_connectionwrapper.new @__weel_connectionwrapper_args
638
- cw.split_branches(Thread.current[:branch_traces])
639
637
 
638
+ cw.split_branches Thread.current.__id__
640
639
  __weel_protect_yield(&block)
640
+ cw.join_branches Thread.current.__id__
641
+
641
642
  Thread.current[:alternative_executed].pop
642
643
  Thread.current[:alternative_mode].pop
643
644
  nil
@@ -898,7 +899,6 @@ class WEEL
898
899
  waitingresult = Thread.current[:continue].wait unless Thread.current[:nolongernecessary] || self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped
899
900
 
900
901
  if Thread.current[:nolongernecessary]
901
- connectionwrapper.activity_no_longer_necessary
902
902
  raise Signal::NoLongerNecessary
903
903
  end
904
904
  if self.__weel_state == :stopping || self.__weel_state == :finishing
@@ -912,7 +912,11 @@ class WEEL
912
912
  code, cmess = if waitingresult == WEEL::Signal::UpdateAgain
913
913
  [update, 'update']
914
914
  elsif waitingresult == WEEL::Signal::Salvage
915
- [salvage, 'salvage'] || raise('HTTP Error. The service return status was not between 200 and 300.')
915
+ if salvage
916
+ [salvage, 'salvage']
917
+ else
918
+ raise('HTTP Error. The service return status was not between 200 and 300.')
919
+ end
916
920
  else
917
921
  [finalize, 'finalize']
918
922
  end
@@ -933,6 +937,8 @@ class WEEL
933
937
  @__weel_endpoints
934
938
  )
935
939
  throw(Signal::Again, Signal::Again) if ma.nil? || ma == Signal::Again # this signal again loops "there is a catch" because rescue signal throw that throughly restarts the task
940
+ else
941
+
936
942
  end
937
943
  end while waitingresult == Signal::UpdateAgain # this signal again loops because async update, proposal: rename to UpdateAgain
938
944
  if connectionwrapper.activity_passthrough_value.nil?
@@ -951,6 +957,7 @@ class WEEL
951
957
  wp.detail = :unmark
952
958
  end
953
959
  rescue Signal::NoLongerNecessary
960
+ connectionwrapper.inform_activity_cancelled
954
961
  connectionwrapper.inform_activity_done
955
962
  @__weel_positions.delete wp
956
963
  Thread.current[:branch_position] = nil
@@ -1064,7 +1071,7 @@ class WEEL
1064
1071
  def __weel_state=(newState)# {{{
1065
1072
  return @__weel_state if newState == @__weel_state && @__weel_state != :ready
1066
1073
 
1067
- @__weel_positions = Array.new if newState == :running || @dslr.__weel_state == :simulating
1074
+ @__weel_positions = Array.new if newState == :running
1068
1075
  @__weel_state = newState
1069
1076
 
1070
1077
  if newState == :stopping || newState == :finishing
@@ -1145,7 +1152,7 @@ public
1145
1152
  @dslr.__weel_state = :stopping
1146
1153
  @dslr.__weel_connectionwrapper::inform_syntax_error(@dslr.__weel_connectionwrapper_args,err,code)
1147
1154
  end
1148
- if @dslr.__weel_state == :running || @dslr.__weel_state == :finishing || @dslr.__weel_state == :simulating
1155
+ if @dslr.__weel_state == :running || @dslr.__weel_state == :finishing
1149
1156
  ipc = { :unmark => [] }
1150
1157
  @dslr.__weel_positions.each{ |wp| ipc[:unmark] << wp }
1151
1158
  @dslr.__weel_positions.clear
@@ -1204,7 +1211,7 @@ public
1204
1211
  # Stop the workflow execution
1205
1212
  def stop # {{{
1206
1213
  Thread.new do
1207
- if @dslr.__weel_state == :running || @dslr.__weel_state == :simulating
1214
+ if @dslr.__weel_state == :running
1208
1215
  @dslr.__weel_state = :stopping
1209
1216
  @dslr.__weel_main.join if @dslr.__weel_main
1210
1217
  elsif @dslr.__weel_state == :ready || @dslr.__weel_state == :stopped
@@ -1226,18 +1233,12 @@ public
1226
1233
  end
1227
1234
  end
1228
1235
  end # }}}
1229
- # Sim the workflow execution
1236
+
1230
1237
  def sim # {{{
1231
- return nil if @dslr.__weel_state != :ready && @dslr.__weel_state != :stopped
1238
+ stat = @dslr.__weel_state
1239
+ return nil unless stat == :ready || stat == :stopped
1232
1240
  @dslr.__weel_main = Thread.new do
1233
- Thread.current[:branch_search] = true if @dslr.__weel_search_positions.any?
1234
- begin
1235
- __weel_control_flow(:simulating, stat)
1236
- rescue => e
1237
- puts e.message
1238
- puts e.backtrace
1239
- connectionwrapper::inform_connectionwrapper_error connectionwrapper_args, e
1240
- end
1241
+ __weel_control_flow :simulating, stat
1241
1242
  end
1242
1243
  end # }}}
1243
1244
 
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.129"
3
+ s.version = "1.99.130"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0-or-later"
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.129
4
+ version: 1.99.130
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: 2024-10-01 00:00:00.000000000 Z
12
+ date: 2024-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubygems_version: 3.5.11
103
+ rubygems_version: 3.5.16
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Workflow Execution Engine Library (WEEL)