cpee 2.1.13 → 2.1.17

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: a36325365a950ed863e1d8f225d3d9c0fe955c03d9e8d54ef5a3b92366bffeea
4
- data.tar.gz: 2579cb64ec6d53369b89f9ae2bd296422d5a9aafb527cfe4d7b4397702e15571
3
+ metadata.gz: 7ea62a69f615adda56866c02d31f1ea478bd49f7eb8e96f8855ed4b81397257b
4
+ data.tar.gz: 2f357f76cf73517f41d17c18dbbc594c05e16f99548599f1dd596119c01f2a91
5
5
  SHA512:
6
- metadata.gz: 198bfa6332b16087dd108170166e4d91b92e82bb51e9853d72ad1fd2e152a3a5bee856c138a91598f63881a49897dbfed16fa4193732e1d55f7a5484476aa6fd
7
- data.tar.gz: a068a5abf6abb788b8759ced41339db138b4775d0ca2c1be4f89e1d191205379632c8c36069b799f6475f04f57b53aac2f646aad8265e2ab6182733200780535
6
+ metadata.gz: fe3a326563ddab5daaf80aa114751fa17251579e3f6e33d3aa52031696f48b0fd5271e46f2a44f905366f7a82de57b2946d1815799ef175860b58c8d68f4dc27
7
+ data.tar.gz: 72ae028ddd526053ef10e40552ac84813502c3728e3c68bae9fc9d152f372796d4f57f313c9d025aec335d2784b1f124dc5f64cefab4fe54c079380dff150c71
@@ -56,7 +56,7 @@ var sub_more = 'topic' + '=' + 'activity' + '&' +// {{{
56
56
  'events' + '=' + 'instantiation' + '&' +
57
57
  'topic' + '=' + 'transformation' + '&' +
58
58
  'events' + '=' + 'change' + '&' +
59
- 'topic' + '=' + 'connectionwrapper' + '&' +
59
+ 'topic' + '=' + 'executionhandler' + '&' +
60
60
  'events' + '=' + 'error,change' + '&' +
61
61
  'topic' + '=' + 'handlers' + '&' +
62
62
  'events' + '=' + 'change';// }}}
@@ -78,7 +78,7 @@ var sub_less = 'topic' + '=' + 'activity' + '&' +// {{{
78
78
  'events' + '=' + 'instantiation' + '&' +
79
79
  'topic' + '=' + 'transformation' + '&' +
80
80
  'events' + '=' + 'change' + '&' +
81
- 'topic' + '=' + 'connectionwrapper' + '&' +
81
+ 'topic' + '=' + 'executionhandler' + '&' +
82
82
  'events' + '=' + 'error,change' + '&' +
83
83
  'topic' + '=' + 'handlers' + '&' +
84
84
  'events' + '=' + 'change';// }}}
@@ -1366,7 +1366,16 @@ function append_to_log(what,type,message) {//{{{
1366
1366
  message = message.replace(/:\"/g,': "');
1367
1367
  message = message.replace(/:\{/g,': {');
1368
1368
  message = message.replace(/:\[/g,': [');
1369
- $("#dat_log").prepend("<tr><td class='fixed'><a title=\"" + d.strftime("[%d/%b/%Y %H:%M:%S]") + "\">D</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'><a title=\"" + what + "\">T</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'>" + type + "</td><td class='fixed'>&#160;-&#160;</td><td class='long'>" + message + "</td></tr>");
1369
+ message = message.replace(/&/g, '&amp;');
1370
+ message = message.replace(/</g, '&lt;');
1371
+ message = message.replace(/>/g, '&gt;');
1372
+ message = message.replace(/"/g, '&quot;');
1373
+ message = message.replace(/'/g, '&apos;');
1374
+ if (type == 'description/change') {
1375
+ $("#dat_log").prepend("<tr><td class='fixed'><a title=\"" + d.strftime("[%d/%b/%Y %H:%M:%S]") + "\">D</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'><a title=\"" + what + "\">T</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'>" + type + "</td><td class='fixed'>&#160;-&#160;</td><td class='long'>... check in persistent log ...</td></tr>");
1376
+ } else {
1377
+ $("#dat_log").prepend("<tr><td class='fixed'><a title=\"" + d.strftime("[%d/%b/%Y %H:%M:%S]") + "\">D</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'><a title=\"" + what + "\">T</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'>" + type + "</td><td class='fixed'>&#160;-&#160;</td><td class='long'>" + message + "</td></tr>");
1378
+ }
1370
1379
  var dle = $("#dat_log").children();
1371
1380
  if (dle.length > 100) {
1372
1381
  dle.slice(100).each((k,ele) => {
data/cpee.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.1.13"
3
+ s.version = "2.1.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.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
@@ -13,6 +13,7 @@
13
13
  # <http://www.gnu.org/licenses/>.
14
14
 
15
15
  require 'charlock_holmes'
16
+ require 'base64'
16
17
 
17
18
  class ConnectionWrapper < WEEL::ConnectionWrapperBase
18
19
  def self::loop_guard(arguments,id,count) # {{{
@@ -197,11 +198,12 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
197
198
  unless status.nil?
198
199
  @controller.notify("status/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :id => status.id, :message => status.message)
199
200
  end
200
- unless changed_dataelements.nil?
201
- @controller.notify("dataelements/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_dataelements, :values => dataelements)
201
+ unless changed_dataelements.nil? || changed_dataelements.empty?
202
+ de = dataelements.slice(*changed_dataelements).transform_values { |v| detect_encoding(v) == 'UTF-8' ? v : convert_to_base64(v) }
203
+ @controller.notify("dataelements/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_dataelements, :values => de)
202
204
  end
203
- unless changed_endpoints.nil?
204
- @controller.notify("endpoints/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints)
205
+ unless changed_endpoints.nil? || changed_endpoints.empty?
206
+ @controller.notify("endpoints/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints.slice(*changed_endpoints))
205
207
  end
206
208
  end # }}}
207
209
 
@@ -241,12 +243,12 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
241
243
  result
242
244
  end
243
245
 
244
- def detected_encoding(text)
246
+ def detect_encoding(text)
245
247
  CharlockHolmes::EncodingDetector.detect(text)[:encoding] || 'ISO-8859-1'
246
248
  end
247
249
 
248
- def convert_to_utf8(text)
249
- CharlockHolmes::Converter.convert(text, detected_encoding(text), "UTF-8")
250
+ def convert_to_base64(text)
251
+ 'data:application/octet-stream;base64,' + Base64::urlsafe_encode64(text)
250
252
  end
251
253
 
252
254
  def structurize_result(result)
@@ -267,7 +269,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
267
269
  tmp = {
268
270
  'name' => r.name == '' ? 'result' : r.name,
269
271
  'mimetype' => r.mimetype,
270
- 'data' => res
272
+ 'data' => (detect_encoding(res) == 'UTF-8' ? res : convert_to_base64(res))
271
273
  }
272
274
  r.value.rewind
273
275
  tmp
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: 2.1.13
4
+ version: 2.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler