weel 1.99.47 → 1.99.48

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
  SHA1:
3
- metadata.gz: e512ed17d908d193bc911bbda62c98d86ba73637
4
- data.tar.gz: adbf3510bf0fac7e91ea79e052dcd259a072b19f
3
+ metadata.gz: 647bf30b67c32ae612517fed9eb84b12ac1076c5
4
+ data.tar.gz: 0d3b5c2e3dc17d34aa2ab2bb4c6d1fcd120c3e3b
5
5
  SHA512:
6
- metadata.gz: 40a4d4741e1eae8b1a0f494af2096cbe811b44c69289771e19c9072bf50567e1a754a0da846de306a4759deeee50dbdf091829b799a4b61d8e10c8cbe500ddb2
7
- data.tar.gz: defb457c23b4d3470ca588ef4951aa03e05e8c7461d52201056fca69e6fd01738ea63de5b0216df8ca397c1da27ba6aa5237285d170f2be8a6d374eb289dc715
6
+ metadata.gz: 8fe3e4735f2c837f8ea27608af0c9f1895b8ed63475ae5f119b0e32dc022670400e06a8c8668b396644680b3bd6cf6e8ba3bc6c5ce9bcc5916ff13a141dfbb09
7
+ data.tar.gz: 521a8f632c9912a2e31ed9db3ef01414cd77f8f77f43ae6c1ff0339fdbe94ad9951b77d3eff64256429848f9791783e26dcdc291767b65b98dbfa14fa2910049
data/lib/weel.rb CHANGED
@@ -331,7 +331,7 @@ class WEEL
331
331
 
332
332
  hw, pos = __weel_sim_start(:parallel) if __weel_sim
333
333
 
334
- __weel_protect_yield &Proc.new
334
+ __weel_protect_yield(&Proc.new)
335
335
 
336
336
  Thread.current[:branch_wait_count] = (type.is_a?(Hash) && type.size == 1 && type[:wait] != nil && (type[:wait].is_a?(Integer) && type[:wait] > 0) ? type[:wait] : Thread.current[:branches].size)
337
337
  1.upto Thread.current[:branches].size do
@@ -400,7 +400,7 @@ class WEEL
400
400
  handlerwrapper.simulate(:parallel_branch,:start,Thread.current[:branch_sim_pos],current_branch_sim_pos)
401
401
  end
402
402
 
403
- __weel_protect_yield *local, &Proc.new
403
+ __weel_protect_yield(*local, &Proc.new)
404
404
 
405
405
  __weel_sim_stop(:parallel_branch,handlerwrapper,current_branch_sim_pos) if __weel_sim
406
406
 
@@ -435,7 +435,7 @@ class WEEL
435
435
  Thread.current[:alternative_executed] << false
436
436
  Thread.current[:alternative_mode] << mode
437
437
  hw, pos = __weel_sim_start(:choose,:mode => Thread.current[:alternative_mode].last) if __weel_sim
438
- __weel_protect_yield &Proc.new
438
+ __weel_protect_yield(&Proc.new)
439
439
  __weel_sim_stop(:choose,hw,pos,:mode => Thread.current[:alternative_mode].last) if __weel_sim
440
440
  Thread.current[:alternative_executed].pop
441
441
  Thread.current[:alternative_mode].pop
@@ -476,7 +476,7 @@ class WEEL
476
476
  @__weel_critical_sections[id] = semaphore if id
477
477
  end
478
478
  semaphore.synchronize do
479
- __weel_protect_yield &Proc.new
479
+ __weel_protect_yield(&Proc.new)
480
480
  end
481
481
  end # }}}
482
482
 
@@ -488,7 +488,7 @@ class WEEL
488
488
  return if self.__weel_state == :stopping || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
489
489
  if __weel_is_in_search_mode
490
490
  catch :escape do
491
- __weel_protect_yield &Proc.new
491
+ __weel_protect_yield(&Proc.new)
492
492
  end
493
493
  return if __weel_is_in_search_mode
494
494
  end
@@ -496,7 +496,7 @@ class WEEL
496
496
  cond = condition[0].is_a?(Proc) ? true : condition[0]
497
497
  hw, pos = __weel_sim_start(:loop,args.merge(:testing=>condition[1],:condition=>cond))
498
498
  catch :escape do
499
- __weel_protect_yield &Proc.new
499
+ __weel_protect_yield(&Proc.new)
500
500
  end
501
501
  __weel_sim_stop(:loop,hw,pos,args.merge(:testing=>condition[1],:condition=>cond))
502
502
  return
@@ -505,11 +505,11 @@ class WEEL
505
505
  case condition[1]
506
506
  when :pre_test
507
507
  while __weel_eval_condition(condition[0]) && self.__weel_state != :stopping && self.__weel_state != :stopped
508
- __weel_protect_yield &Proc.new
508
+ __weel_protect_yield(&Proc.new)
509
509
  end
510
510
  when :post_test
511
511
  begin
512
- __weel_protect_yield &Proc.new
512
+ __weel_protect_yield(&Proc.new)
513
513
  end while __weel_eval_condition(condition[0]) && self.__weel_state != :stopping && self.__weel_state != :stopped
514
514
  end
515
515
  end
@@ -538,7 +538,7 @@ class WEEL
538
538
  def __weel_protect_yield(*local)
539
539
  begin
540
540
  yield(*local) if block_given?
541
- rescue => err
541
+ rescue # => err # don't look into it, or it will explode
542
542
  self.__weel_state = :stopping
543
543
  @__weel_handlerwrapper::inform_syntax_error(@__weel_handlerwrapper_args,Exception.new("DSL error. I don't want to tell you where and why."),nil)
544
544
  nil
@@ -549,7 +549,7 @@ class WEEL
549
549
  begin
550
550
  handlerwrapper = @__weel_handlerwrapper.new @__weel_handlerwrapper_args unless condition.is_a?(Proc)
551
551
  condition.is_a?(Proc) ? condition.call : handlerwrapper.test_condition(ReadStructure.new(@__weel_data,@__weel_endpoints),condition)
552
- rescue => err
552
+ rescue # => err # don't look into it, or it will explode
553
553
  # if you access $! here, BOOOM
554
554
  self.__weel_state = :stopping
555
555
  @__weel_handlerwrapper::inform_syntax_error(@__weel_handlerwrapper_args,Exception.new("Condition error. I don't want to tell you where and why."),nil)
@@ -916,7 +916,7 @@ public
916
916
  else
917
917
  @dslr.instance_eval(code)
918
918
  end
919
- rescue Exception => err
919
+ rescue # => err # don't look into it, or it will explode
920
920
  @dslr.__weel_state = :stopping
921
921
  @dslr.__weel_handlerwrapper::inform_syntax_error(@dslr.__weel_handlerwrapper_args,Exception.new("DSL error. I don't want to tell you where and why."),code)
922
922
  end
@@ -1,4 +1,14 @@
1
1
  class TestHandlerWrapper < WEEL::HandlerWrapperBase
2
+ def self::inform_state_change(arguments,newstate)
3
+ $long_track += "---> STATE #{newstate}\n"
4
+ $short_track << "|#{newstate}|"
5
+ end
6
+ def self::inform_syntax_error(arguments,err,code)
7
+ $long_track += "ERROR: Syntax messed with error #{err}\n"
8
+ $short_track << "E"
9
+ raise(err)
10
+ end
11
+
2
12
  def initialize(args,endpoint=nil,position=nil,continue=nil)
3
13
  @__myhandler_stopped = false
4
14
  @__myhandler_position = position
@@ -9,7 +19,7 @@ class TestHandlerWrapper < WEEL::HandlerWrapperBase
9
19
 
10
20
  # executes a ws-call to the given endpoint with the given parameters. the call
11
21
  # can be executed asynchron, see finished_call & return_value
12
- def activity_handle(passthrough, parameters)
22
+ def activity_handle(passthrough, parameters) #{{{
13
23
  $long_track << "CALL #{@__myhandler_position}: passthrough=[#{passthrough}], endpoint=[#{@__myhandler_endpoint}], parameters=[#{parameters.inspect}]\n"
14
24
  $short_track << "C#{@__myhandler_position}"
15
25
 
@@ -23,7 +33,7 @@ class TestHandlerWrapper < WEEL::HandlerWrapperBase
23
33
  @__myhandler_continue.continue WEEL::Signal::Again
24
34
  sleep 1
25
35
  end
26
- @__myhandler_continue.continue
36
+ @__myhandler_continue.continue
27
37
  end
28
38
  return
29
39
  end
@@ -32,70 +42,61 @@ class TestHandlerWrapper < WEEL::HandlerWrapperBase
32
42
  parameters[:call].call
33
43
  @__myhandler_returnValue = parameters.has_key?(:result) ? parameters[:result] : 'Handler_Dummy_Result'
34
44
  @__myhandler_continue.continue
35
- end
36
- # give nothing back
45
+ end
46
+ # give nothing back
37
47
  else
38
48
  @__myhandler_returnValue = parameters.has_key?(:result) ? parameters[:result] : 'Handler_Dummy_Result'
39
49
  @__myhandler_continue.continue
40
- end
41
- end
42
-
50
+ end
51
+ end #}}}
52
+
43
53
  # returns the result of the last handled call
44
- def activity_result_value
54
+ def activity_result_value #{{{
45
55
  @__myhandler_returnValue
46
- end
56
+ end #}}}
47
57
  # Called if the WS-Call should be interrupted. The decision how to deal
48
58
  # with this situation is given to the handler. To provide the possibility
49
59
  # of a continue the Handler will be asked for a passthrough
50
- def activity_stop
60
+ def activity_stop #{{{
51
61
  $long_track += "STOPPED #{@__myhandler_position}\n"
52
62
  $short_track << "S#{@__myhandler_position}"
53
63
  @t.exit if @t
54
64
  @__myhandler_stopped = true
55
- end
65
+ end #}}}
56
66
  # is called from WEEL after stop_call to ask for a passthrough-value that may give
57
67
  # information about how to continue the call. This passthrough-value is given
58
68
  # to activity_handle if the workflow is configured to do so.
59
- def activity_passthrough_value
69
+ def activity_passthrough_value #{{{
60
70
  "SOME passthrough"
61
- end
71
+ end #}}}
62
72
 
63
73
  # Called if the execution of the actual activity_handle is not necessary anymore
64
74
  # It is definit that the call will not be continued.
65
75
  # At this stage, this is only the case if parallel branches are not needed
66
76
  # anymore to continue the workflow
67
- def activity_no_longer_necessary
77
+ def activity_no_longer_necessary #{{{
68
78
  $long_track += "NO_LONGER_NECCESARY #{@__myhandler_position}\n"
69
79
  $short_track << "NLN#{@__myhandler_position}"
70
80
  @t.exit if @t
71
81
  @__myhandler_returnValue = "No longer necessary"
72
82
  @__myhandler_stopped = true
73
- end
83
+ end #}}}
74
84
  # Is called if a Activity is executed correctly
75
- def inform_activity_manipulate
85
+ def inform_activity_manipulate #{{{
76
86
  $long_track += "MANIPULATE #{@__myhandler_position}\n"
77
87
  $short_track << "M#{@__myhandler_position}"
78
- end
88
+ end #}}}
79
89
  # Is called if a Activity is executed correctly
80
- def inform_activity_done
90
+ def inform_activity_done #{{{
81
91
  $long_track += "DONE #{@__myhandler_position}\n"
82
92
  $short_track << "D#{@__myhandler_position}"
83
- end
93
+ end #}}}
84
94
  # Is called if a Activity is executed with an error
85
- def inform_activity_failed(err)
95
+ def inform_activity_failed(err) #{{{
86
96
  $long_track += "FAILED #{@__myhandler_position}: #{err}\n"
87
97
  $short_track << "F#{@__myhandler_position}"
88
98
  raise(err)
89
- end
90
- def inform_syntax_error(err,code)
91
- $long_track += "ERROR: Syntax messed with error #{err}\n"
92
- $short_track << "E"
93
- raise(err)
94
- end
95
- def inform_state_change(newstate)
96
- $long_track += "---> STATE #{newstate}\n"
97
- $short_track << "|#{newstate}|"
98
- end
99
+ end #}}}
99
100
 
100
101
  def manipulate(mr,code,result=nil,status=nil)
101
102
  mr.instance_eval(code)
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.47"
3
+ s.version = "1.99.48"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Preliminary release of the 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.47
4
+ version: 1.99.48
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: 2017-01-05 00:00:00.000000000 Z
12
+ date: 2017-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit