cpee 1.3.122 → 1.3.123

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,6 +32,7 @@
32
32
  <script type="text/javascript" src="lib/underscore.min.js"></script>
33
33
  <script type="text/javascript" src="lib/jquery.caret.min.js"></script>
34
34
  <script type="text/javascript" src="lib/jquery.cookie.js"></script>
35
+ <script type="text/javascript" src="lib/jquery.redraw.js"></script>
35
36
 
36
37
  <script type="text/javascript" src="lib/contextmenu.js"></script>
37
38
  <script type="text/javascript" src="lib/wfadaptor.js"></script>
@@ -312,6 +312,7 @@ function monitor_instance_dsl() {// {{{
312
312
  save_description();
313
313
  manifestation.events.click(svgid,undefined);
314
314
  };
315
+ $('#graphcanvas').redraw();
315
316
 
316
317
  monitor_instance_pos();
317
318
  }
@@ -0,0 +1,3 @@
1
+ $.fn.redraw = function(){
2
+ $(this).parent().parent().append(' ');
3
+ };
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.3.122"
3
+ s.version = "1.3.123"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
6
6
  s.summary = "Preliminary release of cloud process execution engine (cpee). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
@@ -60,7 +60,7 @@ module CPEE
60
60
  @votes_results = {}
61
61
  @communication = {}
62
62
  @callbacks = {}
63
- @instance = EmptyWorkflow.new(self,opts[:url])
63
+ @instance = EmptyWorkflow.new(self)
64
64
  @positions = []
65
65
  @thread = nil
66
66
  @mutex = Mutex.new
@@ -101,9 +101,18 @@ module CPEE
101
101
  attr_reader :callbacks
102
102
  attr_reader :mutex
103
103
 
104
+ def base_url
105
+ @opts[:url]
106
+ end
107
+ def base_jid
108
+ @opts[:jid]
109
+ end
104
110
  def instance_url
105
111
  "#{@opts[:url]}/#{@id}"
106
112
  end
113
+ def instance_jid
114
+ "#{@opts[:jid]}/#{@id}"
115
+ end
107
116
  def xmpp
108
117
  @opts[:xmpp]
109
118
  end
@@ -15,7 +15,6 @@
15
15
  class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
16
16
  def initialize(arguments,endpoint=nil,position=nil,continue=nil) # {{{
17
17
  @controller = arguments[0]
18
- @url = arguments[1]
19
18
  @handler_continue = continue
20
19
  @handler_endpoint = endpoint
21
20
  @handler_position = position
@@ -24,7 +23,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
24
23
  end # }}}
25
24
 
26
25
  def activity_handle(passthrough, parameters) # {{{
27
- @controller.notify("running/activity_calling", :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
26
+ @controller.notify("running/activity_calling", :instance => @controller.instance_url, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
28
27
 
29
28
  if passthrough.nil?
30
29
  params = []
@@ -32,8 +31,8 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
32
31
  (parameters[:parameters] || {}).each do |k,v|
33
32
  params << Riddl::Parameter::Simple.new("#{k}",CPEE::ValueHelper::generate(v))
34
33
  end
35
- params << Riddl::Header.new("CPEE_BASE",@url)
36
- params << Riddl::Header.new("CPEE_INSTANCE","#{@url}/#{@controller.id}")
34
+ params << Riddl::Header.new("CPEE_BASE",@controller.base_url)
35
+ params << Riddl::Header.new("CPEE_INSTANCE",@controller.instance_url)
37
36
  params << Riddl::Header.new("CPEE_CALLBACK",callback)
38
37
 
39
38
  type = parameters[:method] || 'post'
@@ -92,53 +91,52 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
92
91
  end # }}}
93
92
 
94
93
  def inform_activity_done # {{{
95
- @controller.notify("running/activity_done", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
94
+ @controller.notify("running/activity_done", :endpoint => @handler_endpoint, :instance => @controller.instance_url, :activity => @handler_position)
96
95
  end # }}}
97
96
  def inform_activity_manipulate # {{{
98
- @controller.notify("running/activity_manipulating", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
97
+ @controller.notify("running/activity_manipulating", :endpoint => @handler_endpoint, :instance => @controller.instance_url, :activity => @handler_position)
99
98
  end # }}}
100
99
  def inform_activity_failed(err) # {{{
101
100
  puts err.message
102
101
  puts err.backtrace
103
- @controller.notify("running/activity_failed", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
102
+ @controller.notify("running/activity_failed", :endpoint => @handler_endpoint, :instance => @controller.instance_url, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
104
103
  end # }}}
105
104
 
106
105
  def inform_syntax_error(err,code)# {{{
107
106
  puts err.message
108
107
  puts err.backtrace
109
- @controller.notify("properties/description/error", :instance => "#{@url}/#{@controller.id}", :message => err.message)
108
+ @controller.notify("properties/description/error", :instance => @controller.instance_url, :message => err.message)
110
109
  end# }}}
111
110
  def inform_manipulate_change(status,dataelements,endpoints) # {{{
112
111
  unless status.nil?
113
112
  @controller.serialize_status!
114
- @controller.notify("properties/status/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :id => status.id, :message => status.message)
113
+ @controller.notify("properties/status/change", :endpoint => @handler_endpoint, :instance => @controller.instance_url, :activity => @handler_position, :id => status.id, :message => status.message)
115
114
  end
116
115
  unless dataelements.nil?
117
116
  @controller.serialize_dataelements!
118
- @controller.notify("properties/dataelements/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :changed => dataelements)
117
+ @controller.notify("properties/dataelements/change", :endpoint => @handler_endpoint, :instance => @controller.instance_url, :activity => @handler_position, :changed => dataelements)
119
118
  end
120
119
  unless endpoints.nil?
121
120
  @controller.serialize_endpoints!
122
- @controller.notify("properties/endpoints/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :changed => endpoints)
121
+ @controller.notify("properties/endpoints/change", :endpoint => @handler_endpoint, :instance => @controller.instance_url, :activity => @handler_position, :changed => endpoints)
123
122
  end
124
123
  end # }}}
125
124
  def inform_position_change(ipc={}) # {{{
126
125
  @controller.serialize_positions!
127
- ipc[:instance] = "#{@url}/#{@controller.id}"
128
- @controller.notify("properties/position/change", ipc)
126
+ @controller.notify("properties/position/change", :instance => @controller.instance_url)
129
127
  end # }}}
130
128
  def inform_state_change(newstate) # {{{
131
129
  if @controller
132
130
  @controller.serialize_state!
133
- @controller.notify("properties/state/change", :instance => "#{@url}/#{@controller.id}", :state => newstate)
131
+ @controller.notify("properties/state/change", :instance => @controller.instance_url, :state => newstate)
134
132
  end
135
133
  end # }}}
136
134
 
137
135
  def vote_sync_after # {{{
138
- @controller.call_vote("running/syncing_after", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
136
+ @controller.call_vote("running/syncing_after", :endpoint => @handler_endpoint, :instance => @controller.instance_url, :activity => @handler_position)
139
137
  end # }}}
140
138
  def vote_sync_before(parameters=nil) # {{{
141
- @controller.call_vote("running/syncing_before", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
139
+ @controller.call_vote("running/syncing_before", :endpoint => @handler_endpoint, :instance => @controller.instance_url, :activity => @handler_position)
142
140
  end # }}}
143
141
 
144
142
  def callback(result)
@@ -166,7 +164,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
166
164
 
167
165
  @controller.call_vote("simulating/step",
168
166
  :endpoint => @handler_endpoint,
169
- :instance => "#{@url}/#{@controller.id}",
167
+ :instance => @controller.instance_url,
170
168
  :activity => tid,
171
169
  :type => type,
172
170
  :nesting => nesting,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.122
4
+ version: 1.3.123
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-03-27 00:00:00.000000000 Z
14
+ date: 2014-04-01 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: riddl
@@ -126,6 +126,7 @@ files:
126
126
  - cockpit/lib/contextmenu.css
127
127
  - cockpit/lib/util.js
128
128
  - cockpit/lib/underscore.min.js
129
+ - cockpit/lib/jquery.redraw.js
129
130
  - cockpit/lib/strftime.min.js
130
131
  - cockpit/lib/printf.js
131
132
  - cockpit/lib/jquery.min.js