cpee 1.4.16 → 1.4.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c4ab772efbcd09a954265c0dfa57c5421986af3d2eb83c93a63d10888ecae3b
4
- data.tar.gz: 9aadf410a77cd0ccaa953ede6245fb2cf8267db5ed3bf44e6b34b310b6209a26
3
+ metadata.gz: 9baa24fb02ca220f4344cd750fd772d1fc24de52452da1160b02f4a35c91a4d5
4
+ data.tar.gz: 461b4ba6643115fd138c12279e1e390db6cd90467e03af22b0764c85c777b064
5
5
  SHA512:
6
- metadata.gz: 0c65df8421ae382688a59ca0b41cdf95a12c9b806ea8cbcbc82e7aca9c519df4b007a7f64f34df5adaf1c7c3480e329dee216554db09529974ad60df8495cbc2
7
- data.tar.gz: e6e98a003d8fb24d1648c46eca4de49ccfd7cdfbfa2378aae4378ffcb5eff93f2fa7616686ecb365a62a464f5aaa1bd735962ae5e6517a47b1749a2598606d50
6
+ metadata.gz: 5f27e270cae8b682f4dade5025886518a901a3490989fb07b677d36c6922c83d8be91f2520cd252f22ef46b4bd471cb9456bd417c571630ac9df0d157fd31f9d
7
+ data.tar.gz: eda464b04ff47fcf180c0c3da1150ab51887d8627a1e31f28fe1479bddf034fe088ff89c79def55d195fd080d88dd9fe2c62ae6720181e267a24b2ad49a24db8
data/cpee.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.4.16"
3
+ s.version = "1.4.17"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
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"
@@ -230,7 +230,18 @@ module CPEE
230
230
  end
231
231
  end
232
232
  def state
233
- data.find("string(/p:properties/p:state)")
233
+ @properties.data.find("string(/p:properties/p:state)")
234
+ end
235
+ def state_changed
236
+ @properties.data.find("string(/p:properties/p:state/@changed)")
237
+ end
238
+ def state_change!(state=nil)
239
+ @properties.modify do |doc|
240
+ doc.find("/p:properties/p:state").each do |ele|
241
+ ele.attributes['changed'] = Time.now.xmlschema
242
+ ele.text = state if state
243
+ end
244
+ end
234
245
  end
235
246
 
236
247
  def finalize_if_finished
@@ -263,11 +274,7 @@ module CPEE
263
274
  @properties.activate_schema(:inactive) if @instance.state == :stopped || @instance.state == :ready
264
275
  @properties.activate_schema(:active) if @instance.state == :running || @instance.state == :simulating
265
276
  if [:finished, :stopped, :ready].include?(@instance.state)
266
- @properties.modify do |doc|
267
- node = doc.find("/p:properties/p:state").first
268
- node.attributes['changed'] = Time.now.xmlschema
269
- node.text = @instance.state
270
- end
277
+ state_change! @instance.state
271
278
  end
272
279
  end # }}}
273
280
  def serialize_positions! # {{{
@@ -387,7 +394,6 @@ module CPEE
387
394
  state = 'ready'
388
395
  @properties.modify do |doc|
389
396
  node = doc.find("/p:properties/p:state").first
390
- node.attributes['changed'] = Time.now.xmlschema
391
397
  state = node.text
392
398
  end
393
399
  if call_vote("state/change", :instance => @id, :info => info, :state => state)
@@ -142,7 +142,7 @@ module CPEE
142
142
  Riddl::Parameter::Complex.new("wis","text/xml") do
143
143
  ins = XML::Smart::string('<instances/>')
144
144
  controller.sort{|a,b| b[0] <=> a[0] }.each do |k,v|
145
- ins.root.add('instance', v.info, 'uuid' => v.uuid, 'id' => k, 'state' => v.state)
145
+ ins.root.add('instance', v.info, 'uuid' => v.uuid, 'id' => k, 'state' => v.state, 'state_changed' => v.state_changed )
146
146
  end
147
147
  ins.to_s
148
148
  end
@@ -166,6 +166,7 @@ module CPEE
166
166
 
167
167
  controller[id] = Controller.new(id,opts)
168
168
  controller[id].info = name
169
+ controller[id].state_change!
169
170
 
170
171
  Riddl::Parameter::Simple.new("id", id)
171
172
  end
@@ -34,6 +34,9 @@
34
34
  <attribute name='state'>
35
35
  <data type="string"/>
36
36
  </attribute>
37
+ <attribute name='state_changed'>
38
+ <data type="dateTime"/>
39
+ </attribute>
37
40
  <data type="string"/>
38
41
  </element>
39
42
  </define>
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.4.16
4
+ version: 1.4.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: tools
13
13
  cert_chain: []
14
- date: 2018-11-08 00:00:00.000000000 Z
14
+ date: 2018-11-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: riddl