weel 1.99.112 → 1.99.113

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9fa3ffb360459331eeb431e4ec33bfd96406c5086df62a7b6473b6745d7972f4
4
- data.tar.gz: 7e7e29b38cb07c85acff75b73808e362683066ef0baecf269ee20dde1d8006a6
3
+ metadata.gz: ccdb4515278ad68f38a35abef85197ca3f0732131f93c2323fe3e8cb1123df39
4
+ data.tar.gz: c436c8bf90eca6a370d67a71c14ef094507b43802ce2bf6b10bb9d863034a814
5
5
  SHA512:
6
- metadata.gz: 2245be8b63155486e13b69bee90cc074820f1e8cf95e4757f5d163edc2a1541d4c3560737eebd8ba9e790d02677781e89cd8d428e5ea2c1605e5d07d014ae889
7
- data.tar.gz: 99a6c0666409e7ba2b1e8af6939a62bbbef140119aafe767efd7a8f7bdda3908eceb30b2b67e206ef11406c4ddc8752bf9869b6a4792b0ef7ac2b2a06e081111
6
+ metadata.gz: 055bc4890e45536bd725110f837b57f6fb810811ae9b17ce94c9f0f286ba73e3dc19bf6d6170455f3a687d3dac500e2dac6e5886922ba17e601034a562f808ff
7
+ data.tar.gz: 9e18656c48d1e8bb0d580e2eb0336161df469a38da3964eab0af0fa4d19593f85c40a20a55cd5a6299d113ccb4a1ef023531bf47d031f2ef5a0469ea8f23e13a
data/lib/weel.rb CHANGED
@@ -322,7 +322,7 @@ class WEEL
322
322
 
323
323
  def initialize(arguments,position=nil,continue=nil); end
324
324
 
325
- def prepare(readonly, endpoints, parameters, replay=false); parameters; end
325
+ def prepare(readonly, endpoints, parameters); parameters; end
326
326
  def additional; {}; end
327
327
 
328
328
  def activity_handle(passthrough, parameters); end
@@ -460,10 +460,9 @@ class WEEL
460
460
  @__weel_connectionwrapper_args = []
461
461
  @__weel_state = :ready
462
462
  @__weel_status = Status.new(0,"undefined")
463
- @__weel_replay = false
464
463
  @__weel_sim = -1
465
464
  end #}}}
466
- attr_accessor :__weel_search_positions, :__weel_positions, :__weel_main, :__weel_data, :__weel_endpoints, :__weel_connectionwrapper, :__weel_connectionwrapper_args, :__weel_replay
465
+ attr_accessor :__weel_search_positions, :__weel_positions, :__weel_main, :__weel_data, :__weel_endpoints, :__weel_connectionwrapper, :__weel_connectionwrapper_args
467
466
  attr_reader :__weel_state, :__weel_status
468
467
 
469
468
  # DSL-Constructs for atomic calls to external services (calls) and pure context manipulations (manipulate).
@@ -885,7 +884,7 @@ class WEEL
885
884
  connectionwrapper.manipulate(rs,prepare,'Activity ' + position.to_s)
886
885
  end
887
886
  end
888
- params = connectionwrapper.prepare(rs,endpoint,parameters,@__weel_replay)
887
+ params = connectionwrapper.prepare(rs,endpoint,parameters)
889
888
  raise Signal::Stop unless connectionwrapper.vote_sync_before(params)
890
889
  raise Signal::Skip if self.__weel_state == :stopping || self.__weel_state == :finishing
891
890
 
@@ -1101,7 +1100,6 @@ class WEEL
1101
1100
  if newState == :stopping || newState == :finishing
1102
1101
  @__weel_status.nudge!
1103
1102
  __weel_recursive_continue(@__weel_main)
1104
- __weel_replay = false
1105
1103
  end
1106
1104
 
1107
1105
  @__weel_connectionwrapper::inform_state_change @__weel_connectionwrapper_args, @__weel_state
@@ -1258,11 +1256,6 @@ public
1258
1256
  end
1259
1257
  end # }}}
1260
1258
 
1261
- def replay
1262
- @dslr.__weel_replay = true
1263
- start
1264
- end
1265
-
1266
1259
  def sim # {{{
1267
1260
  stat = @dslr.__weel_state
1268
1261
  return nil unless stat == :ready || stat == :stopped
@@ -18,26 +18,26 @@ class TestWorkflowControl < Test::Unit::TestCase
18
18
  assert(@wf.data[:x] == "begin_Handler_Dummy_Result_end", "Ending environment not correct, see result=#{@wf.data[:x].inspect}")
19
19
  end
20
20
 
21
- # def test_stop
22
- # @wf.description do
23
- # call :a_test_1_1, :endpoint1
24
- # call :a_test_1_2, :endpoint1, parameters: { :call => Proc.new{ sleep 0.5 } }
25
- # call :a_test_1_3, :endpoint1
26
- # end
27
- # @wf.search WEEL::Position.new(:a_test_1_1, :at)
28
- # wf = @wf.start
29
- # sleep(0.2)
30
- # @wf.stop.join
31
- # wf.join
32
- # wf_assert("DONE a_test_1_1")
33
- # wf_assert("STOPPED a_test_1_2")
34
- # wf_assert("DONE a_test_1_2",false)
35
- # wf_assert("CALL a_test_1_2:")
36
- # assert(@wf.state == :stopped, "Stopped workflow has wrong state, #{@wf.state} instead of :stopped")
37
- # assert(@wf.positions.is_a?(Array), "@wf.positions has wrong type, should be an array, it is: #{@wf.positions.inspect}")
38
- # assert(@wf.positions[0].position == :a_test_1_2, "Stop-position has wrong value: #{@wf.positions[0].position} instead of :a_test_2_1")
39
- # assert(@wf.positions[0].detail == :at, "Stop-Position is not :at")
40
- # end
21
+ def test_stop
22
+ @wf.description do
23
+ call :a_test_1_1, :endpoint1
24
+ call :a_test_1_2, :endpoint1, parameters: { :call => Proc.new{ sleep 0.5 } }
25
+ call :a_test_1_3, :endpoint1
26
+ end
27
+ @wf.search WEEL::Position.new(:a_test_1_1, :at)
28
+ wf = @wf.start
29
+ sleep(0.2)
30
+ @wf.stop.join
31
+ wf.join
32
+ wf_assert("DONE a_test_1_1")
33
+ wf_assert("STOPPED a_test_1_2")
34
+ wf_assert("DONE a_test_1_2",false)
35
+ wf_assert("CALL a_test_1_2:")
36
+ assert(@wf.state == :stopped, "Stopped workflow has wrong state, #{@wf.state} instead of :stopped")
37
+ assert(@wf.positions.is_a?(Array), "@wf.positions has wrong type, should be an array, it is: #{@wf.positions.inspect}")
38
+ assert(@wf.positions[0].position == :a_test_1_2, "Stop-position has wrong value: #{@wf.positions[0].position} instead of :a_test_2_1")
39
+ assert(@wf.positions[0].detail == :at, "Stop-Position is not :at")
40
+ end
41
41
  # def test_continue
42
42
  # @wf.description do
43
43
  # call :a_test_1_1, :endpoint1
@@ -0,0 +1,34 @@
1
+ require 'test/unit'
2
+ require File.expand_path(::File.dirname(__FILE__) + '/../TestWorkflow')
3
+
4
+ class TestWorkflowControl < Test::Unit::TestCase
5
+ include TestMixin
6
+
7
+ def test_stop
8
+ @wf.description do
9
+ call :a_test_1_1, :endpoint1
10
+ call :a_test_1_2, :endpoint1, parameters: { :call => Proc.new{ sleep 0.5 } }
11
+ call :a_test_1_3, :endpoint1
12
+ end
13
+ @wf.search WEEL::Position.new(:a_test_1_1, :at)
14
+ wf = @wf.start
15
+ sleep(0.2)
16
+ @wf.stop.join
17
+ wf.join
18
+ wf_assert("DONE a_test_1_1")
19
+ wf_assert("STOPPED a_test_1_2")
20
+ wf_assert("DONE a_test_1_2")
21
+ wf_assert("CALL a_test_1_2:")
22
+ assert(@wf.state == :stopped, "Stopped workflow has wrong state, #{@wf.state} instead of :stopped")
23
+ assert(@wf.positions.is_a?(Array), "@wf.positions has wrong type, should be an array, it is: #{@wf.positions.inspect}")
24
+ assert(@wf.positions[0].position == :a_test_1_2, "Stop-position has wrong value: #{@wf.positions[0].position} instead of :a_test_2_1")
25
+ assert(@wf.positions[0].detail == :after, "Stop-Position is not :at")
26
+ end
27
+
28
+ def test_stops
29
+ 1.upto 1000 do |i|
30
+ puts '.'
31
+ test_stop
32
+ end
33
+ end
34
+ end
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.112"
3
+ s.version = "1.99.113"
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.112
4
+ version: 1.99.113
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: 2023-10-10 00:00:00.000000000 Z
12
+ date: 2024-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit
@@ -58,6 +58,7 @@ files:
58
58
  - test/basic/tc_search.rb
59
59
  - test/basic/tc_state.rb
60
60
  - test/basic/tc_wf_control.rb
61
+ - test/basic/tc_wf_stop.rb
61
62
  - test/complex/tc_generalsynchonizingmerge_loopsearch.rb
62
63
  - test/complex/tc_parallel_stop.rb
63
64
  - test/complexsearch/tc_search.rb
@@ -122,6 +123,7 @@ test_files:
122
123
  - test/basic/tc_search.rb
123
124
  - test/basic/tc_state.rb
124
125
  - test/basic/tc_wf_control.rb
126
+ - test/basic/tc_wf_stop.rb
125
127
  - test/complex/tc_generalsynchonizingmerge_loopsearch.rb
126
128
  - test/complex/tc_parallel_stop.rb
127
129
  - test/complexsearch/tc_search.rb