cpee 2.1.85 → 2.1.86

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.
@@ -1249,7 +1249,7 @@ function WFAdaptorManifestationBase(adaptor) {
1249
1249
  var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for &gt;/&lt; version of stuff as only conditions are in attributes, and conditions can not contain assignments
1250
1250
  var reg_not_assi = /data\.([a-zA-Z_]+)\s*/g;
1251
1251
 
1252
- $('call, loop[condition], alternative[condition]',node).each(function(i,n) {
1252
+ $('call, manipulate, loop[condition], alternative[condition]',node).each(function(i,n) {
1253
1253
  let item = '';
1254
1254
  if (n.hasAttribute('condition')) {
1255
1255
  item = n.getAttribute('condition');
@@ -1257,12 +1257,17 @@ function WFAdaptorManifestationBase(adaptor) {
1257
1257
  $('call > code > prepare',n).each(function(j,m){
1258
1258
  item += m.textContent + '\n';
1259
1259
  });
1260
+ if (n.nodeName == 'manipulate') { // css selector can not directly access manipulate
1261
+ item += n.textContent + '\n';
1262
+ }
1260
1263
  $('call > parameters > arguments > *, call > code > finalize, call > code > update, call > code > rescue',n).each(function(j,m){
1264
+ console.log('aaa');
1261
1265
  let x = m.textContent;
1262
1266
  if (m.parentNode.nodeName == 'arguments' && x.charAt(0) != '!' ) { return }
1263
1267
  item += x + '\n';
1264
1268
  });
1265
1269
  }
1270
+ console.log(item);
1266
1271
  if (item == '') { return; }
1267
1272
 
1268
1273
  let indices = [];
data/cockpit/track.html CHANGED
@@ -139,9 +139,11 @@
139
139
  <span id="state_text">loading ...</span>
140
140
  </div>
141
141
  </div>
142
- <div id='graphgrid'>
143
- <div class="resource-label" style="display: none"></div>
144
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
142
+ <div id="modelling">
143
+ <div id='graphgrid'>
144
+ <div class="resource-label" style="display: none"></div>
145
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
146
+ </div>
145
147
  </div>
146
148
  </div>
147
149
  <div id='trackcolumn'>
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.85"
3
+ s.version = "2.1.86"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0-or-later"
6
6
  s.summary = "The cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
@@ -62,7 +62,6 @@ module CPEE
62
62
  opts[:topics] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','topics.xml'))
63
63
  opts[:properties_init] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','properties.init'))
64
64
  opts[:properties_empty] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','properties.empty'))
65
- opts[:transformation_service] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','transformation.xml'))
66
65
  opts[:empty_dslx] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','empty_dslx.xml'))
67
66
  opts[:notifications_init] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','notifications'))
68
67
  opts[:states] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','states.xml'))
@@ -13,6 +13,7 @@
13
13
  # <http://www.gnu.org/licenses/>.
14
14
 
15
15
  require 'json'
16
+ require 'charlock_holmes'
16
17
  require_relative 'fail'
17
18
 
18
19
  module CPEE
@@ -84,10 +84,11 @@ module CPEE
84
84
  end
85
85
  on resource 'dslx' do
86
86
  run CPEE::Properties::GetComplex, 'dslx', 'text/xml', id, opts if get
87
+ run CPEE::Properties::PutDescription, id, opts, true if put 'dslx'
87
88
  end
88
89
  on resource 'description' do
89
90
  run CPEE::Properties::GetComplex, 'description', 'text/xml', id, opts if get
90
- run CPEE::Properties::PutDescription, id, opts if put 'description'
91
+ run CPEE::Properties::PutDescription, id, opts, false if put 'description'
91
92
  end
92
93
  on resource 'transformation' do
93
94
  run CPEE::Properties::GetTransformation, id, opts if get
@@ -694,10 +695,10 @@ module CPEE
694
695
  ep = {}
695
696
 
696
697
  ### endpoints extraction
697
- addit = if tendptype == 'rest' && !tdata.empty?
698
- srv = Riddl::Client.interface(tendp,opts[:transformation_service])
698
+ addit = if tendptype == 'rest' && !tendp.empty?
699
+ srv = Riddl::Client.new(tendp)
699
700
  status, res = srv.post [
700
- Riddl::Parameter::Complex.new("description","text/xml",descxml),
701
+ desc.nil? ? Riddl::Parameter::Complex.new("description","text/plain",descxml) : Riddl::Parameter::Complex.new("description","text/xml",descxml),
701
702
  Riddl::Parameter::Simple.new("type","endpoints")
702
703
  ]
703
704
  if status >= 200 && status < 300
@@ -705,7 +706,7 @@ module CPEE
705
706
  else
706
707
  raise 'Could not extract endpoints'
707
708
  end
708
- elsif tendptype == 'xslt' && !tdata.empty?
709
+ elsif tendptype == 'xslt' && !tendp.empty?
709
710
  trans = XML::Smart::open_unprotected(tendp.text)
710
711
  desc.transform_with(trans)
711
712
  elsif tendptype == 'clean'
@@ -723,9 +724,9 @@ module CPEE
723
724
  addit = if tdesctype == 'copy' || tdesc.empty?
724
725
  desc || ''
725
726
  elsif tdesctype == 'rest' && !tdesc.empty?
726
- srv = Riddl::Client.interface(tdesc,opts[:transformation_service])
727
+ srv = Riddl::Client.new(tdesc)
727
728
  status, res = srv.post [
728
- Riddl::Parameter::Complex.new("description","text/xml",descxml),
729
+ desc.nil? ? Riddl::Parameter::Complex.new("description","text/plain",descxml) : Riddl::Parameter::Complex.new("description","text/xml",descxml),
729
730
  Riddl::Parameter::Simple.new("type","description")
730
731
  ]
731
732
  if status >= 200 && status < 300
@@ -748,9 +749,9 @@ module CPEE
748
749
 
749
750
  ### dataelements extraction
750
751
  addit = if tdatatype == 'rest' && !tdata.empty?
751
- srv = Riddl::Client.interface(tdata,opts[:transformation_service])
752
+ srv = Riddl::Client.new(tdata)
752
753
  status, res = srv.post [
753
- Riddl::Parameter::Complex.new("description","text/xml",descxml),
754
+ desc.nil? ? Riddl::Parameter::Complex.new("description","text/plain",descxml) : Riddl::Parameter::Complex.new("description","text/xml",descxml),
754
755
  Riddl::Parameter::Simple.new("type","dataelements")
755
756
  ]
756
757
  if status >= 200 && status < 300
@@ -775,40 +776,67 @@ module CPEE
775
776
  [dslx, dsl, de, ep]
776
777
  end #}}}
777
778
 
778
- def self::set(id,opts,xml)
779
- dslx, dsl, de, ep = PutDescription::transform(
780
- xml,
781
- CPEE::Persistence::extract_item(id,opts,'transformation/description'),
782
- CPEE::Persistence::extract_item(id,opts,'transformation/description/@type'),
783
- CPEE::Persistence::extract_item(id,opts,'transformation/dataelements'),
784
- CPEE::Persistence::extract_item(id,opts,'transformation/dataelements/@type'),
785
- CPEE::Persistence::extract_item(id,opts,'transformation/endpoints'),
786
- CPEE::Persistence::extract_item(id,opts,'transformation/endpoints/@type'),
787
- CPEE::Persistence::extract_item(id,opts,'executionhandler'),
788
- id,
789
- opts
790
- )
779
+ def self::set(id,opts,xml,exposition=[],copy=false)
780
+ dslx, dsl, de, ep = if copy
781
+ PutDescription::transform(
782
+ xml,
783
+ '',
784
+ 'copy',
785
+ '',
786
+ 'none',
787
+ '',
788
+ 'none',
789
+ CPEE::Persistence::extract_item(id,opts,'executionhandler'),
790
+ id,
791
+ opts
792
+ )
793
+ else
794
+ PutDescription::transform(
795
+ xml,
796
+ CPEE::Persistence::extract_item(id,opts,'transformation/description'),
797
+ CPEE::Persistence::extract_item(id,opts,'transformation/description/@type'),
798
+ CPEE::Persistence::extract_item(id,opts,'transformation/dataelements'),
799
+ CPEE::Persistence::extract_item(id,opts,'transformation/dataelements/@type'),
800
+ CPEE::Persistence::extract_item(id,opts,'transformation/endpoints'),
801
+ CPEE::Persistence::extract_item(id,opts,'transformation/endpoints/@type'),
802
+ CPEE::Persistence::extract_item(id,opts,'executionhandler'),
803
+ id,
804
+ opts
805
+ )
806
+ end
807
+ attrs = CPEE::Persistence::extract_list(id,opts,'attributes').to_h
808
+ change_uuid = Digest::SHA1.hexdigest(dslx)
791
809
  CPEE::Persistence::set_item(id,opts,'description',
792
810
  :description => xml,
793
811
  :dslx => dslx,
812
+ :change_uuid => change_uuid,
794
813
  :dsl => dsl,
795
814
  :dataelements => CPEE::Persistence::extract_list(id,opts,'dataelements').to_h,
796
815
  :endpoints => CPEE::Persistence::extract_list(id,opts,'endpoints').to_h,
797
- :attributes => CPEE::Persistence::extract_list(id,opts,'attributes').to_h
816
+ :attributes => attrs
798
817
  )
799
818
  PatchItems::set_hash('dataelements',id,opts,de) unless de.empty?
800
- PatchItems::set_hash('dataelements',id,opts,ep) unless ep.empty?
819
+ PatchItems::set_hash('endpoints',id,opts,ep) unless ep.empty?
820
+ exposition.each do |exp|
821
+ content = {
822
+ :change_uuid => change_uuid,
823
+ :exposition => exp.value.read,
824
+ :attributes => attrs
825
+ }
826
+ CPEE::Message::send(:event,'description/exposition',File.join(opts[:url],'/'),id,attrs['uuid'],attrs['info'],content,opts[:redis])
827
+ end
801
828
  end
802
829
 
803
830
  def response
804
831
  id = @a[0]
805
832
  opts = @a[1]
833
+ copy = @a[2]
806
834
  if opts[:statemachine].readonly? id
807
835
  @status = 422 # semantic error
808
836
  else
809
837
  begin
810
838
  # force-encoding because johannes managed to sneak in ascii special characters. why the browser is not sanitizing it is beyond me.
811
- PutDescription::set(id,opts,@p[0].value.read.force_encoding('UTF-8'))
839
+ PutDescription::set(id,opts,@p[0].value.read.force_encoding('UTF-8'),@p[1..-1],copy)
812
840
  rescue => e
813
841
  puts e.message
814
842
  puts e.backtrace
data/lib/properties.xml CHANGED
@@ -130,9 +130,15 @@
130
130
  </message> <!--}}}-->
131
131
  <message name="dslx"> <!--{{{-->
132
132
  <parameter name="dslx" mimetype="*/xml"/>
133
+ <zeroOrMore>
134
+ <parameter name="exposition" mimetype="*"/>
135
+ </zeroOrMore>
133
136
  </message> <!--}}}-->
134
137
  <message name="description"> <!--{{{-->
135
138
  <parameter name="description" mimetype="*"/>
139
+ <zeroOrMore>
140
+ <parameter name="exposition" mimetype="*"/>
141
+ </zeroOrMore>
136
142
  </message> <!--}}}-->
137
143
 
138
144
  <message name="transformation"> <!--{{{-->
@@ -221,6 +227,7 @@
221
227
  </resource> <!--}}}-->
222
228
  <resource relative="dslx"> <!--{{{-->
223
229
  <get out="dslx"/>
230
+ <put in="dslx"/>
224
231
  </resource> <!--}}}-->
225
232
  <resource relative="description"> <!--{{{-->
226
233
  <get out="description"/>
@@ -0,0 +1,100 @@
1
+ <description xmlns="http://cpee.org/ns/description/1.0">
2
+ <_generic/>
3
+ <_shifting>
4
+ <_shifting_factor>45 minutes</_shifting_factor>
5
+ <_shifting_start>!data.basedate + ", 12:00"</_shifting_start>
6
+ <_shifting_modifier>2</_shifting_modifier>
7
+ </_shifting>
8
+ <_context_data_analysis>
9
+ <probes/>
10
+ <ips/>
11
+ </_context_data_analysis>
12
+ <loop mode="pre_test" condition="true">
13
+ <_probability>
14
+ <_probability_min/>
15
+ <_probability_max/>
16
+ <_probability_avg/>
17
+ </_probability>
18
+ <parallel wait="-1" cancel="last">
19
+ <parallel_branch pass="" local="">
20
+ <call id="a1" endpoint="send">
21
+ <parameters>
22
+ <label>send message</label>
23
+ <arguments>
24
+ <timeout>1</timeout>
25
+ <ignore/>
26
+ </arguments>
27
+ </parameters>
28
+ <annotations>
29
+ <_generic/>
30
+ <_timing>
31
+ <_timing_weight/>
32
+ <_timing_avg/>
33
+ <explanations/>
34
+ </_timing>
35
+ <_shifting>
36
+ <_shifting_type>Duration</_shifting_type>
37
+ <_shifting_expression>!rand(1.. 3) + " days"</_shifting_expression>
38
+ </_shifting>
39
+ <_context_data_analysis>
40
+ <probes/>
41
+ <ips/>
42
+ </_context_data_analysis>
43
+ <report>
44
+ <url/>
45
+ </report>
46
+ <_notes>
47
+ <_notes_general/>
48
+ </_notes>
49
+ </annotations>
50
+ <documentation>
51
+ <input/>
52
+ <output/>
53
+ <implementation>
54
+ <description/>
55
+ </implementation>
56
+ </documentation>
57
+ </call>
58
+ </parallel_branch>
59
+ <parallel_branch pass="" local="">
60
+ <call id="a5" endpoint="timeout">
61
+ <parameters>
62
+ <label>Wait till 16:00</label>
63
+ <arguments>
64
+ <timeout>2</timeout>
65
+ </arguments>
66
+ </parameters>
67
+ <annotations>
68
+ <_timing>
69
+ <_timing_weight/>
70
+ <_timing_avg/>
71
+ <explanations/>
72
+ </_timing>
73
+ <_shifting>
74
+ <_shifting_type>Ends</_shifting_type>
75
+ <_shifting_expression>same day, 16:00</_shifting_expression>
76
+ </_shifting>
77
+ <_context_data_analysis>
78
+ <probes/>
79
+ <ips/>
80
+ </_context_data_analysis>
81
+ <report>
82
+ <url/>
83
+ </report>
84
+ <_notes>
85
+ <_notes_general/>
86
+ </_notes>
87
+ </annotations>
88
+ <documentation>
89
+ <input/>
90
+ <output/>
91
+ <implementation>
92
+ <description/>
93
+ </implementation>
94
+ </documentation>
95
+ </call>
96
+ </parallel_branch>
97
+ </parallel>
98
+ <stop id="a4"/>
99
+ </loop>
100
+ </description>
@@ -467,7 +467,8 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
467
467
  end #}}}
468
468
  def join_branches(id, branches = []) # factual, so for inclusive or [[a],[b],[c,d,e]] {{{
469
469
  payload = { :instance_uuid => @controller.uuid, :ecid => id.to_s }
470
- payload[:branches] = branches.length if branches.length > 0
470
+ payload[:branches] = branches if branches.length > 0
471
+ payload[:branches_length] = branches.length if branches.length > 0
471
472
  @controller.notify("gateway/join", payload )
472
473
  end #}}}
473
474
  end
@@ -519,7 +519,9 @@
519
519
  <xsl:otherwise>
520
520
  <xsl:choose>
521
521
  <xsl:when test="substring(text(),1,1) = '!'">
522
- <xsl:value-of select="substring(text(),2)"/>
522
+ <xsl:text>🠊("</xsl:text>
523
+ <xsl:value-of select="str:replace(str:replace(substring(text(),2),'\','\\'),'&quot;','\&quot;')"/>
524
+ <xsl:text>")</xsl:text>
523
525
  </xsl:when>
524
526
  <xsl:otherwise>
525
527
  <xsl:text>"</xsl:text>
@@ -548,7 +550,9 @@
548
550
  <xsl:otherwise>
549
551
  <xsl:choose>
550
552
  <xsl:when test="substring(text(),1,1) = '!'">
551
- <xsl:value-of select="substring(text(),2)"/>
553
+ <xsl:text>🠊("</xsl:text>
554
+ <xsl:value-of select="str:replace(str:replace(substring(text(),2),'\','\\'),'&quot;','\&quot;')"/>
555
+ <xsl:text>")</xsl:text>
552
556
  </xsl:when>
553
557
  <xsl:otherwise>
554
558
  <xsl:text>"</xsl:text>
@@ -577,7 +581,9 @@
577
581
  <xsl:otherwise>
578
582
  <xsl:choose>
579
583
  <xsl:when test="substring(text(),1,1) = '!'">
580
- <xsl:value-of select="substring(text(),2)"/>
584
+ <xsl:text>🠊("</xsl:text>
585
+ <xsl:value-of select="str:replace(str:replace(substring(text(),2),'\','\\'),'&quot;','\&quot;')"/>
586
+ <xsl:text>")</xsl:text>
581
587
  </xsl:when>
582
588
  <xsl:otherwise>
583
589
  <xsl:text>"</xsl:text>
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.85
4
+ version: 2.1.86
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -9,7 +9,7 @@ authors:
9
9
  - Gerhard Stuermer
10
10
  bindir: tools
11
11
  cert_chain: []
12
- date: 2025-05-13 00:00:00.000000000 Z
12
+ date: 2025-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: riddl
@@ -209,6 +209,7 @@ files:
209
209
  - cockpit/contrib/transformation2.xsl
210
210
  - cockpit/contrib/tree_example.svg
211
211
  - cockpit/css/graph.css
212
+ - cockpit/css/llm.css
212
213
  - cockpit/css/model.css
213
214
  - cockpit/css/resources-label.css
214
215
  - cockpit/css/resources-svg.css
@@ -221,6 +222,8 @@ files:
221
222
  - cockpit/js/details.js
222
223
  - cockpit/js/edit.js
223
224
  - cockpit/js/instance.js
225
+ - cockpit/js/llm.js
226
+ - cockpit/js/llm_alternative.js
224
227
  - cockpit/js/model.js
225
228
  - cockpit/js/modifiers.js
226
229
  - cockpit/js/parameters.js
@@ -229,6 +232,8 @@ files:
229
232
  - cockpit/js/ui.js
230
233
  - cockpit/js/wfadaptor.js
231
234
  - cockpit/js_libs.zip
235
+ - cockpit/llm.html
236
+ - cockpit/llm_alternative.html
232
237
  - cockpit/model.html
233
238
  - cockpit/rngs/attributes.rng
234
239
  - cockpit/rngs/dataelements.rng
@@ -907,6 +912,7 @@ files:
907
912
  - server/executionhandlers/eval/controller.rb
908
913
  - server/executionhandlers/eval/dsl_to_dslx.xsl
909
914
  - server/executionhandlers/eval/execution.rb
915
+ - server/executionhandlers/ruby/ShiftingTestSimple.xml
910
916
  - server/executionhandlers/ruby/backend/README.md
911
917
  - server/executionhandlers/ruby/backend/instance.template
912
918
  - server/executionhandlers/ruby/backend/opts.yaml
@@ -922,14 +928,9 @@ files:
922
928
  - server/resources/states.dot
923
929
  - server/resources/states.xml
924
930
  - server/resources/topics.xml
925
- - server/resources/transformation.xml
926
- - server/routing/end.pid
927
931
  - server/routing/end.rb
928
- - server/routing/forward-events-00.pid
929
932
  - server/routing/forward-events.rb
930
- - server/routing/forward-votes.pid
931
933
  - server/routing/forward-votes.rb
932
- - server/routing/persist.pid
933
934
  - server/routing/persist.rb
934
935
  - server/server.pid
935
936
  - tools/cpee
@@ -1,53 +0,0 @@
1
- <!--
2
- This file is part of CPEE.
3
-
4
- CPEE is free software: you can redistribute it and/or modify it under the terms
5
- of the GNU General Public License as published by the Free Software Foundation,
6
- either version 3 of the License, or (at your option) any later version.
7
-
8
- CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
9
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
- PARTICULAR PURPOSE. See the GNU General Public License for more details.
11
-
12
- You should have received a copy of the GNU General Public License along with
13
- CPEE (file COPYING in the main directory). If not, see
14
- <http://www.gnu.org/licenses/>.
15
- -->
16
-
17
- <description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
18
-
19
- <message name="description">
20
- <parameter name="description" mimetype="text/xml"/>
21
- </message>
22
- <message name="dataelements">
23
- <zeroOrMore>
24
- <parameter name="name" type="string"/>
25
- <parameter name="value" type="string"/>
26
- </zeroOrMore>
27
- </message>
28
- <message name="endpoints">
29
- <zeroOrMore>
30
- <parameter name="name" type="string"/>
31
- <parameter name="value" type="string"/>
32
- </zeroOrMore>
33
- </message>
34
-
35
- <message name="dedesc">
36
- <parameter name="description" mimetype="text/xml"/>
37
- <parameter name="type" fixed="description"/>
38
- </message>
39
- <message name="dadesc">
40
- <parameter name="description" mimetype="text/xml"/>
41
- <parameter name="type" fixed="dataelements"/>
42
- </message>
43
- <message name="endesc">
44
- <parameter name="description" mimetype="text/xml"/>
45
- <parameter name="type" fixed="endpoints"/>
46
- </message>
47
-
48
- <resource>
49
- <post in="dedesc" out="description"/>
50
- <post in="dadesc" out="dataelements"/>
51
- <post in="endesc" out="endpoints"/>
52
- </resource>
53
- </description>
@@ -1 +0,0 @@
1
- 88347
@@ -1 +0,0 @@
1
- 88365
@@ -1 +0,0 @@
1
- 88359
@@ -1 +0,0 @@
1
- 88353