cpee 1.3.220 → 1.3.221
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 +4 -4
- data/cockpit/js/instance.js +3 -3
- data/cockpit/js/wfadaptor.js +13 -8
- data/cpee.gemspec +2 -1
- data/log/chain.xml +27 -0
- data/log/logoverlay.xml +2 -2
- data/log/non_tamp.rb +156 -0
- data/log/yaml/server.rb +12 -12
- data/server/instances/313/notifications/crisp/consumer-secret +1 -0
- data/server/instances/313/notifications/crisp/producer-secret +1 -0
- data/server/instances/313/notifications/crisp/subscription.xml +7 -0
- data/server/instances/313/notifications/logging/consumer-secret +1 -0
- data/server/instances/313/notifications/logging/producer-secret +1 -0
- data/server/instances/313/notifications/logging/subscription.xml +7 -0
- data/server/instances/313/notifications/logging_yaml/consumer-secret +1 -0
- data/server/instances/313/notifications/logging_yaml/producer-secret +1 -0
- data/server/instances/313/notifications/logging_yaml/subscription.xml +7 -0
- data/server/instances/313/properties.xml +524 -0
- data/server/instances/6/properties.xml +5 -2
- data/server/instances/662/notifications/crisp/consumer-secret +1 -0
- data/server/instances/662/notifications/crisp/producer-secret +1 -0
- data/server/instances/662/notifications/crisp/subscription.xml +7 -0
- data/server/instances/662/notifications/logging/consumer-secret +1 -0
- data/server/instances/662/notifications/logging/producer-secret +1 -0
- data/server/instances/662/notifications/logging/subscription.xml +7 -0
- data/server/instances/662/notifications/logging_yaml/consumer-secret +1 -0
- data/server/instances/662/notifications/logging_yaml/producer-secret +1 -0
- data/server/instances/662/notifications/logging_yaml/subscription.xml +7 -0
- data/server/instances/662/properties.xml +427 -0
- data/server/instances/663/properties.xml +31 -0
- data/server/instances/664/properties.xml +425 -0
- data/server/instances/665/properties.xml +425 -0
- data/server/instances/666/properties.xml +427 -0
- data/server/instances/667/properties.xml +427 -0
- data/server/instances/668/properties.xml +425 -0
- data/server/instances/669/properties.xml +425 -0
- data/server/instances/670/properties.xml +31 -0
- data/server/instances/671/properties.xml +158 -0
- data/server/instances/672/properties.xml +199 -0
- data/server/instances/673/properties.xml +52 -0
- metadata +49 -5
- data/server/instances/33/notifications/d1b6606197334cda2bffaa2ea02707bf/consumer-secret +0 -1
- data/server/instances/33/notifications/d1b6606197334cda2bffaa2ea02707bf/producer-secret +0 -1
- data/server/instances/33/notifications/d1b6606197334cda2bffaa2ea02707bf/subscription.xml +0 -42
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c23db9cd13cd8f8fdfcdd918d389f58ca66024fd
         | 
| 4 | 
            +
              data.tar.gz: 5676d9a8d659f96c1f63cddd723fe94c06c96d04
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f2bc178e35aa0482f6485e2f13596390c00506e40c131f346998c17e5179ff4ac93fd7fc68eaad82eb0560fc02857c5ee41d3fad96000d636d1d58c680a3dc89
         | 
| 7 | 
            +
              data.tar.gz: a9c21bed26e25f5f820dc8415b33aef41606f006d0f7e932d0a141a083743e5f423d81bf04e5782f3e5403abc9d32d7b5b564e025003e67a423ff566ea4a0cfc
         | 
    
        data/cockpit/js/instance.js
    CHANGED
    
    | @@ -85,8 +85,8 @@ $(document).ready(function() {// {{{ | |
| 85 85 | 
             
                  });
         | 
| 86 86 | 
             
                  var q = $.parseQuerySimple();
         | 
| 87 87 | 
             
                  if (q.min || q.min == "") {
         | 
| 88 | 
            -
                    ui_toggle_vis_tab($('#instance | 
| 89 | 
            -
                    ui_toggle_vis_tab($('#parameters | 
| 88 | 
            +
                    ui_toggle_vis_tab($('#instance'));
         | 
| 89 | 
            +
                    ui_toggle_vis_tab($('#parameters'));
         | 
| 90 90 | 
             
                  }
         | 
| 91 91 | 
             
                  if (q.monitor && q.load) {
         | 
| 92 92 | 
             
                    $("input[name=instance-url]").val(q.monitor);
         | 
| @@ -208,7 +208,7 @@ function monitor_instance(load,exec) {// {{{ | |
| 208 208 | 
             
                  history.replaceState({}, '', '?' + (q.min || q.min=="" ? "min&" : "") + 'monitor='+url);
         | 
| 209 209 |  | 
| 210 210 | 
             
                  // Change url to return to current instance when reloading (because new subscription is made)
         | 
| 211 | 
            -
                  $("input[name=votecontinue]"). | 
| 211 | 
            +
                  $("input[name=votecontinue]").prop( "checked", false );
         | 
| 212 212 | 
             
                  subscription_state = 'less';
         | 
| 213 213 |  | 
| 214 214 | 
             
                  $.ajax({
         | 
    
        data/cockpit/js/wfadaptor.js
    CHANGED
    
    | @@ -179,10 +179,11 @@ function WfIllustrator(wf_adaptor) { // View  {{{ | |
| 179 179 | 
             
              } // }}}
         | 
| 180 180 | 
             
              // }}}
         | 
| 181 181 | 
             
              // Helper Functions {{{
         | 
| 182 | 
            -
              var draw_label = this.draw.draw_label = function ( | 
| 182 | 
            +
              var draw_label = this.draw.draw_label = function (tname, id, label, row, col, group) { // {{{
         | 
| 183 183 | 
             
                var g = $X('<text class="label" transform="translate(' + String((col*self.width)-((self.width*0.39))) + ',' + String(row*self.height+20-((self.height*0.74))) + ')" xmlns="http://www.w3.org/2000/svg"></text>');
         | 
| 184 184 | 
             
                    g.text((label != '' ? '◤ ' : '')  + label);
         | 
| 185 | 
            -
                 | 
| 185 | 
            +
                bind_event(g,tname);
         | 
| 186 | 
            +
                if(group) { group.find('g.element[element-id=' + id + ']').append(g); }
         | 
| 186 187 | 
             
                else {self.svg.container.children('g:first').append(g);}
         | 
| 187 188 | 
             
                return g;
         | 
| 188 189 | 
             
              } // }}}
         | 
| @@ -205,14 +206,18 @@ function WfIllustrator(wf_adaptor) { // View  {{{ | |
| 205 206 | 
             
                $(g[0].childNodes[0]).append(sym);
         | 
| 206 207 |  | 
| 207 208 | 
             
                // Binding events for symbol
         | 
| 208 | 
            -
                 | 
| 209 | 
            -
             | 
| 210 | 
            -
                  if(event_name == 'mousedown') sym.bind('contextmenu', false);
         | 
| 211 | 
            -
                }
         | 
| 209 | 
            +
                bind_event(sym,tname);
         | 
| 210 | 
            +
             | 
| 212 211 | 
             
                if(group) {group.append(g);}
         | 
| 213 212 | 
             
                else {self.svg.container.children('g:first').append(g);}
         | 
| 214 213 | 
             
                return g;
         | 
| 215 214 | 
             
              } // }}}
         | 
| 215 | 
            +
              var bind_event = this.draw.bind_event = function(sym,tname) { //{{{
         | 
| 216 | 
            +
                for(event_name in adaptor.elements[tname]) {
         | 
| 217 | 
            +
                  sym.bind(event_name, {'function_call':adaptor.elements[tname][event_name]}, function(e) { e.data.function_call($(this).parents('.element:first').attr('element-id'),e)});
         | 
| 218 | 
            +
                  if(event_name == 'mousedown') sym.bind('contextmenu', false);
         | 
| 219 | 
            +
                }
         | 
| 220 | 
            +
              } //}}}
         | 
| 216 221 | 
             
              var draw_border = this.draw.draw_border = function(id, p1, p2, group) { // {{{
         | 
| 217 222 | 
             
                group.prepend($X('<rect element-id="' + id + '" x="' + (p1.col-0.50)*self.width + '" ' +
         | 
| 218 223 | 
             
                    'y="' + (p1.row-0.80)*self.height + '" ' +
         | 
| @@ -306,7 +311,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{ | |
| 306 311 | 
             
                if (illustrator.compact == false) {
         | 
| 307 312 | 
             
                  if (labels.length > 0) {
         | 
| 308 313 | 
             
                    _.each(labels,function(a,key) {
         | 
| 309 | 
            -
                      illustrator.draw.draw_label(a.row, graph.max.col + 1,  | 
| 314 | 
            +
                      illustrator.draw.draw_label(a.tname, a.element_id, a.label, a.row, graph.max.col + 1, graph.svg);
         | 
| 310 315 | 
             
                    });
         | 
| 311 316 | 
             
                    graph.max.col += 4;
         | 
| 312 317 | 
             
                  }
         | 
| @@ -509,7 +514,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{ | |
| 509 514 | 
             
                  if (illustrator.elements[tname].label) {
         | 
| 510 515 | 
             
                    var lab = illustrator.elements[tname].label(this);
         | 
| 511 516 | 
             
                    $(this).attr('svg-label', lab);
         | 
| 512 | 
            -
                    labels.push({row: pos.row, element_id: $(this).attr('svg-id'), label: lab});
         | 
| 517 | 
            +
                    labels.push({row: pos.row, element_id: $(this).attr('svg-id'), tname: tname, label: lab});
         | 
| 513 518 | 
             
                  } else {
         | 
| 514 519 | 
             
                    $(this).attr('svg-label', '');
         | 
| 515 520 | 
             
                  } // }}}
         | 
    
        data/cpee.gemspec
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            Gem::Specification.new do |s|
         | 
| 2 2 | 
             
              s.name             = "cpee"
         | 
| 3 | 
            -
              s.version          = "1.3. | 
| 3 | 
            +
              s.version          = "1.3.221"
         | 
| 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"
         | 
| @@ -25,4 +25,5 @@ Gem::Specification.new do |s| | |
| 25 25 | 
             
              s.add_runtime_dependency 'weel', '~> 1.99'
         | 
| 26 26 | 
             
              s.add_runtime_dependency 'savon', '~> 2'
         | 
| 27 27 | 
             
              s.add_runtime_dependency 'highline', '~> 1.6'
         | 
| 28 | 
            +
              s.add_runtime_dependency 'json', '~>2.1'
         | 
| 28 29 | 
             
            end
         | 
    
        data/log/chain.xml
    ADDED
    
    | @@ -0,0 +1,27 @@ | |
| 1 | 
            +
            <declaration xmlns="http://riddl.org/ns/declaration/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
         | 
| 2 | 
            +
              <interface name="events">
         | 
| 3 | 
            +
                <xi:include href="http://www.riddl.org/ns/common-patterns/notifications-consumer/1.0/consumer.xml"/>
         | 
| 4 | 
            +
              </interface>
         | 
| 5 | 
            +
              <interface name="cpee" location="http://cpee.org:9298">
         | 
| 6 | 
            +
                <xi:include href="http://cpee.org:9298/?riddl-description"/>
         | 
| 7 | 
            +
              </interface>
         | 
| 8 | 
            +
              <interface name="logoverlay">
         | 
| 9 | 
            +
                <xi:include href="logoverlay.xml"/>
         | 
| 10 | 
            +
              </interface>
         | 
| 11 | 
            +
             | 
| 12 | 
            +
              <facade>
         | 
| 13 | 
            +
                <tile>
         | 
| 14 | 
            +
                  <layer name="cpee"/>
         | 
| 15 | 
            +
                </tile>
         | 
| 16 | 
            +
                <tile>
         | 
| 17 | 
            +
                  <layer name="events">
         | 
| 18 | 
            +
                    <apply-to>/log</apply-to>
         | 
| 19 | 
            +
                  </layer>
         | 
| 20 | 
            +
                </tile>
         | 
| 21 | 
            +
                <tile>
         | 
| 22 | 
            +
                  <layer name="logoverlay">
         | 
| 23 | 
            +
                    <apply-to>/chain</apply-to>
         | 
| 24 | 
            +
                  </layer>
         | 
| 25 | 
            +
                </tile>
         | 
| 26 | 
            +
              </facade>
         | 
| 27 | 
            +
            </declaration>
         | 
    
        data/log/logoverlay.xml
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 | 
            -
            <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"> | 
| 1 | 
            +
            <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">
         | 
| 2 2 | 
             
              <message name="logresponse">
         | 
| 3 | 
            -
                <parameter name="file" mimetype=" | 
| 3 | 
            +
                <parameter name="file" mimetype="*"/>
         | 
| 4 4 | 
             
              </message>
         | 
| 5 5 |  | 
| 6 6 | 
             
              <resource>
         | 
    
        data/log/non_tamp.rb
    ADDED
    
    | @@ -0,0 +1,156 @@ | |
| 1 | 
            +
            #!/usr/bin/ruby
         | 
| 2 | 
            +
            require 'pp'
         | 
| 3 | 
            +
            require 'json'
         | 
| 4 | 
            +
            require 'rubygems'
         | 
| 5 | 
            +
            require 'fileutils'
         | 
| 6 | 
            +
            require 'riddl/server'
         | 
| 7 | 
            +
            require 'riddl/client'
         | 
| 8 | 
            +
            require 'riddl/utils/notifications_producer'
         | 
| 9 | 
            +
            require 'riddl/utils/properties'
         | 
| 10 | 
            +
            require 'riddl/utils/downloadify'
         | 
| 11 | 
            +
            require 'riddl/utils/turtle'
         | 
| 12 | 
            +
            require 'time'
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            class FileServe < Riddl::Implementation
         | 
| 15 | 
            +
              def response
         | 
| 16 | 
            +
                path = File.file?(@a[0]) ? @a[0] : "#{@a[0]}/#{@r[@match.length-1..-1].join('/')}".gsub(/\/+/,'/')
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                if File.directory?(path)
         | 
| 19 | 
            +
                  @status = 404
         | 
| 20 | 
            +
                  return []
         | 
| 21 | 
            +
                end
         | 
| 22 | 
            +
                if File.exists?(path)
         | 
| 23 | 
            +
            			fmt = @a[1] || begin
         | 
| 24 | 
            +
            				mt = MIME::Types.type_for(path).first
         | 
| 25 | 
            +
            				if mt.nil?
         | 
| 26 | 
            +
            					'text/plain;charset=utf-8'
         | 
| 27 | 
            +
            				else
         | 
| 28 | 
            +
            					apx = ''
         | 
| 29 | 
            +
            					if mt.ascii?
         | 
| 30 | 
            +
            						tstr = File.read(path,CharlockHolmes::EncodingDetector::DEFAULT_BINARY_SCAN_LEN)
         | 
| 31 | 
            +
            						apx = ';charset=' + CharlockHolmes::EncodingDetector.detect(tstr)[:encoding]
         | 
| 32 | 
            +
            					end
         | 
| 33 | 
            +
            					mt.to_s + apx
         | 
| 34 | 
            +
            				end
         | 
| 35 | 
            +
            			end
         | 
| 36 | 
            +
            			return Riddl::Parameter::Complex.new('file',fmt,File.open(path,'r'))
         | 
| 37 | 
            +
                end
         | 
| 38 | 
            +
                @status = 404
         | 
| 39 | 
            +
              end
         | 
| 40 | 
            +
            end
         | 
| 41 | 
            +
             | 
| 42 | 
            +
            class Logging < Riddl::Implementation #{{{
         | 
| 43 | 
            +
              LOGTEMPLATE = {"log" =>
         | 
| 44 | 
            +
                {"extension" =>
         | 
| 45 | 
            +
                  { "time" =>"http://www.xes-standard.org/time.xesext",
         | 
| 46 | 
            +
                    "concept" => "http://www.xes-standard.org/concept.xesext",
         | 
| 47 | 
            +
                    "organisational" => "http://www.xes-standard.org/org.xesext",
         | 
| 48 | 
            +
                    "lifecylce" => "http://www.xes-standard.org/lifecycle.xesext"
         | 
| 49 | 
            +
                  },
         | 
| 50 | 
            +
                  "global" =>
         | 
| 51 | 
            +
                    {
         | 
| 52 | 
            +
                      "trace" =>{"concept:name" => "__INVALID__"},
         | 
| 53 | 
            +
                      "event"=> {
         | 
| 54 | 
            +
                        "concept:name"=>"__INVALID__",
         | 
| 55 | 
            +
                        "concept:endpoint" => "",
         | 
| 56 | 
            +
                        "id:id" => "",
         | 
| 57 | 
            +
                        "lifecycle:transition" => "complete",
         | 
| 58 | 
            +
                        "time:timestamp" => ""
         | 
| 59 | 
            +
                      }
         | 
| 60 | 
            +
                    },
         | 
| 61 | 
            +
                  "classifier" =>{
         | 
| 62 | 
            +
                    "Data" => "data_send data_received",
         | 
| 63 | 
            +
                    "Data_Received"=>"data_receiver",
         | 
| 64 | 
            +
                    "Data_Send" => "data_send"
         | 
| 65 | 
            +
                  },
         | 
| 66 | 
            +
                  "trace" => {}
         | 
| 67 | 
            +
                }
         | 
| 68 | 
            +
              }
         | 
| 69 | 
            +
             | 
| 70 | 
            +
             | 
| 71 | 
            +
             | 
| 72 | 
            +
              def doc(event_name,log_dir,instancenr,notification)
         | 
| 73 | 
            +
                x = Time.now
         | 
| 74 | 
            +
                log = LOGTEMPLATE
         | 
| 75 | 
            +
                uuid = notification['instance_uuid']
         | 
| 76 | 
            +
                activity = notification["activity"]
         | 
| 77 | 
            +
                parameters = notification['parameters']
         | 
| 78 | 
            +
                receiving = notification['received']
         | 
| 79 | 
            +
                time_added=false
         | 
| 80 | 
            +
                log["log"]["trace"]["concept:name"] ||= "Instance #{instancenr}" unless log["log"]["trace"]["concept:name"]
         | 
| 81 | 
            +
                if File.exists? log_dir+'/log.xes'
         | 
| 82 | 
            +
                  previous_hash = File.read(log_dir+'/last.event').strip
         | 
| 83 | 
            +
                else
         | 
| 84 | 
            +
                  File.open(log_dir+'/log.xes','w'){|f| f.puts log.to_yaml}
         | 
| 85 | 
            +
                  previous_hash = "0"
         | 
| 86 | 
            +
                end
         | 
| 87 | 
            +
                event = {}
         | 
| 88 | 
            +
                event["trace:id"] = instancenr
         | 
| 89 | 
            +
                if parameters && parameters.has_key?('label')
         | 
| 90 | 
            +
                  event["concept:name"] = parameters["label"]
         | 
| 91 | 
            +
                else
         | 
| 92 | 
            +
                  event["concept:name"]= log["log"]["trace"]["concept:name"]
         | 
| 93 | 
            +
                end
         | 
| 94 | 
            +
                event["concept:endpoint"] = notification["endpoint"] if notification["endpoint"]
         | 
| 95 | 
            +
                event["id:id"] = activity
         | 
| 96 | 
            +
                unless event_name=='receiving'
         | 
| 97 | 
            +
                  event["lifecycle:transition"]= event_name=='done'?"complete":"start"
         | 
| 98 | 
            +
                else
         | 
| 99 | 
            +
                  event["lifecycle:transition"]="unknown"
         | 
| 100 | 
            +
                end
         | 
| 101 | 
            +
                data_send = ((parameters["arguments"].nil? ? [] : parameters["arguments"]) rescue [])
         | 
| 102 | 
            +
                event["list"] = {"data_send" => data_send} unless data_send.empty?
         | 
| 103 | 
            +
                if receiving && receiving.any?
         | 
| 104 | 
            +
                  if event.has_key? "list"
         | 
| 105 | 
            +
                    event["list"]["data_received"] ||= receiving
         | 
| 106 | 
            +
                  else
         | 
| 107 | 
            +
                    event["list"] = {"data_receiver" => receiving}
         | 
| 108 | 
            +
                  end
         | 
| 109 | 
            +
                end
         | 
| 110 | 
            +
                event["time:timestamp"]= Time.now.iso8601 unless time_added
         | 
| 111 | 
            +
                event["bc:hash"]= calc_hash(event.to_yaml,previous_hash)
         | 
| 112 | 
            +
                event["bc:previous_hash"]= previous_hash
         | 
| 113 | 
            +
                File.open(log_dir+'/log.xes',"a") do |f|
         | 
| 114 | 
            +
                  f << {'event' => event}.to_yaml
         | 
| 115 | 
            +
                end
         | 
| 116 | 
            +
                File.open(log_dir+'/last.event',"w"){ |fl| fl << event["bc:hash"] }
         | 
| 117 | 
            +
              end
         | 
| 118 | 
            +
             | 
| 119 | 
            +
              def calc_hash(data, previous_hash) # data includes timestamp, index and payload
         | 
| 120 | 
            +
                sha = Digest::SHA256.new
         | 
| 121 | 
            +
                sha.update(data.to_s + previous_hash)
         | 
| 122 | 
            +
                sha.hexdigest
         | 
| 123 | 
            +
              end
         | 
| 124 | 
            +
             | 
| 125 | 
            +
              def response
         | 
| 126 | 
            +
                log_dir = @a[0]
         | 
| 127 | 
            +
                library = Riddl::Client.new(@h['CPEE_INSTANCE'] + "/properties/values/attributes/bc")
         | 
| 128 | 
            +
                status, res = library.get
         | 
| 129 | 
            +
                if status == 200
         | 
| 130 | 
            +
                  topic = @p[1].value
         | 
| 131 | 
            +
                  event_name = @p[2].value
         | 
| 132 | 
            +
                  notification = JSON.parse(@p[3].value)
         | 
| 133 | 
            +
                  if topic == 'state' && notification['state'] == 'ready' && XML::Smart.string(res[0].value.read).find('string(/*)') == "start"
         | 
| 134 | 
            +
                    FileUtils.rm_f Dir.glob(log_dir+'/*')
         | 
| 135 | 
            +
                  end
         | 
| 136 | 
            +
                  if topic == 'activity'
         | 
| 137 | 
            +
                    instancenr = @h['CPEE_INSTANCE'].split('/').last
         | 
| 138 | 
            +
                    doc(event_name,log_dir,instancenr,notification)
         | 
| 139 | 
            +
                  end
         | 
| 140 | 
            +
                end
         | 
| 141 | 
            +
              end
         | 
| 142 | 
            +
            end  #}}}
         | 
| 143 | 
            +
             | 
| 144 | 
            +
            Riddl::Server.new(::File.dirname(__FILE__) + '/chain.xml', :host => "coruscant.wst.univie.ac.at", :port => 9399) do #{{{
         | 
| 145 | 
            +
              accessible_description true
         | 
| 146 | 
            +
              cross_site_xhr true
         | 
| 147 | 
            +
             | 
| 148 | 
            +
              @riddl_opts[:log_dir] = ::File.dirname(__FILE__) + "/non_tamp"
         | 
| 149 | 
            +
             | 
| 150 | 
            +
              interface 'events' do
         | 
| 151 | 
            +
                run Logging, @riddl_opts[:log_dir] if post 'event'
         | 
| 152 | 
            +
              end
         | 
| 153 | 
            +
              interface 'logoverlay' do |r|
         | 
| 154 | 
            +
                run FileServe, "#{@riddl_opts[:log_dir]}/log.xes","application/x-yaml" if get '*'
         | 
| 155 | 
            +
              end
         | 
| 156 | 
            +
            end.loop! #}}}
         | 
    
        data/log/yaml/server.rb
    CHANGED
    
    | @@ -13,20 +13,20 @@ require 'riddl/utils/turtle' | |
| 13 13 | 
             
            require 'time'
         | 
| 14 14 |  | 
| 15 15 | 
             
            class Logging < Riddl::Implementation #{{{
         | 
| 16 | 
            -
              LOGTEMPLATE = {"log" => | 
| 16 | 
            +
              LOGTEMPLATE = {"log" =>
         | 
| 17 17 | 
             
                {"extension" =>
         | 
| 18 | 
            -
                  { "time" =>"http://www.xes-standard.org/time.xesext", | 
| 19 | 
            -
                    "concept" => "http://www.xes-standard.org/concept.xesext", | 
| 20 | 
            -
                    "organisational" => "http://www.xes-standard.org/org.xesext", | 
| 18 | 
            +
                  { "time" =>"http://www.xes-standard.org/time.xesext",
         | 
| 19 | 
            +
                    "concept" => "http://www.xes-standard.org/concept.xesext",
         | 
| 20 | 
            +
                    "organisational" => "http://www.xes-standard.org/org.xesext",
         | 
| 21 21 | 
             
                    "lifecylce" => "http://www.xes-standard.org/lifecycle.xesext"
         | 
| 22 22 | 
             
                  },
         | 
| 23 | 
            -
                  "global" => | 
| 23 | 
            +
                  "global" =>
         | 
| 24 24 | 
             
                    {
         | 
| 25 25 | 
             
                      "trace" =>{"concept:name" => "__INVALID__"},
         | 
| 26 26 | 
             
                      "event"=> {
         | 
| 27 27 | 
             
                        "concept:name"=>"__INVALID__",
         | 
| 28 | 
            -
                        "concept:endpoint" => "", | 
| 29 | 
            -
                        "id:id" => "", | 
| 28 | 
            +
                        "concept:endpoint" => "",
         | 
| 29 | 
            +
                        "id:id" => "",
         | 
| 30 30 | 
             
                        "lifecycle:transition" => "complete",
         | 
| 31 31 | 
             
                        "time:timestamp" => ""
         | 
| 32 32 | 
             
                      }
         | 
| @@ -68,9 +68,9 @@ class Logging < Riddl::Implementation #{{{ | |
| 68 68 | 
             
                event["list"] = {"data_send" => data_send} unless data_send.empty?
         | 
| 69 69 | 
             
                if receiving && receiving.any?
         | 
| 70 70 | 
             
                  if event.has_key? "list"
         | 
| 71 | 
            -
                    event["list"]["data_received"] ||= receiving | 
| 71 | 
            +
                    event["list"]["data_received"] ||= receiving
         | 
| 72 72 | 
             
                  else
         | 
| 73 | 
            -
                    event["list"] = {"data_receiver" => receiving} | 
| 73 | 
            +
                    event["list"] = {"data_receiver" => receiving}
         | 
| 74 74 | 
             
                  end
         | 
| 75 75 | 
             
                end
         | 
| 76 76 | 
             
                event["time:timestamp"]= Time.now.iso8601 unless time_added
         | 
| @@ -83,7 +83,7 @@ class Logging < Riddl::Implementation #{{{ | |
| 83 83 | 
             
                z = y-x
         | 
| 84 84 | 
             
                File.open(log_dir+'/'+uuid+'/time.file',"a+"){ |f| f<< z << "\n" }
         | 
| 85 85 | 
             
              end
         | 
| 86 | 
            -
             | 
| 86 | 
            +
             | 
| 87 87 | 
             
            	def rec_unjson(value,list,key)
         | 
| 88 88 | 
             
            		case value
         | 
| 89 89 | 
             
            			when Array then
         | 
| @@ -115,13 +115,13 @@ end  #}}} | |
| 115 115 | 
             
            Riddl::Server.new(::File.dirname(__FILE__) + '/log.xml', :host => "coruscant.wst.univie.ac.at", :port => 9300) do #{{{
         | 
| 116 116 | 
             
              accessible_description true
         | 
| 117 117 | 
             
              cross_site_xhr true
         | 
| 118 | 
            -
               | 
| 118 | 
            +
              log_dir = "/home/demo/Projects/cpee-helpers/log/logs_yaml"
         | 
| 119 119 |  | 
| 120 120 | 
             
              interface 'events' do
         | 
| 121 121 | 
             
            	    run Logging if post 'event'
         | 
| 122 122 | 
             
              end
         | 
| 123 123 | 
             
              interface 'logoverlay' do |r|
         | 
| 124 | 
            -
                run Riddl::Utils::FileServe,  | 
| 124 | 
            +
                run Riddl::Utils::FileServe, log_dir + r[:h]["RIDDL_DECLARATION_PATH"]+ ".xes","text/xml" if get
         | 
| 125 125 | 
             
              end
         | 
| 126 126 |  | 
| 127 127 |  | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            f7c77861ac613eeac8fb9829c9a545a2
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            2a24d172b1aeb05fe94fdc5e095dec32
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            f7c77861ac613eeac8fb9829c9a545a2
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            2a24d172b1aeb05fe94fdc5e095dec32
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            f7c77861ac613eeac8fb9829c9a545a2
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            2a24d172b1aeb05fe94fdc5e095dec32
         | 
| @@ -0,0 +1,524 @@ | |
| 1 | 
            +
            <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
         | 
| 2 | 
            +
              <attributes>
         | 
| 3 | 
            +
                <uuid>d68fff80-2238-426f-9579-e3e7e0ee46eb</uuid>
         | 
| 4 | 
            +
                <info>a01406222</info>
         | 
| 5 | 
            +
                <modeltype>CPEE</modeltype>
         | 
| 6 | 
            +
                <theme>default</theme>
         | 
| 7 | 
            +
              </attributes>
         | 
| 8 | 
            +
              <state>stopped</state>
         | 
| 9 | 
            +
              <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
         | 
| 10 | 
            +
              <positions>
         | 
| 11 | 
            +
                <a9>after</a9>
         | 
| 12 | 
            +
              </positions>
         | 
| 13 | 
            +
              <dataelements>
         | 
| 14 | 
            +
                <runtime>45</runtime>
         | 
| 15 | 
            +
                <timeleft>51</timeleft>
         | 
| 16 | 
            +
                <traintime>15</traintime>
         | 
| 17 | 
            +
                <startblock>B</startblock>
         | 
| 18 | 
            +
                <startnumber>28</startnumber>
         | 
| 19 | 
            +
                <runsteps>9518</runsteps>
         | 
| 20 | 
            +
                <contact>Desktopapp</contact>
         | 
| 21 | 
            +
                <drink>what</drink>
         | 
| 22 | 
            +
                <gothere>from where</gothere>
         | 
| 23 | 
            +
              </dataelements>
         | 
| 24 | 
            +
              <endpoints>
         | 
| 25 | 
            +
                <startnumber>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startnumber.php</startnumber>
         | 
| 26 | 
            +
                <runtime>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/runtime.php</runtime>
         | 
| 27 | 
            +
                <traintime>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/traintime.php</traintime>
         | 
| 28 | 
            +
                <startblock>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblock.php</startblock>
         | 
| 29 | 
            +
                <timeleft>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/timeleft.php</timeleft>
         | 
| 30 | 
            +
                <result>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/result.php</result>
         | 
| 31 | 
            +
                <run>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/run.php</run>
         | 
| 32 | 
            +
                <contactapp>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/contactapp.php</contactapp>
         | 
| 33 | 
            +
                <drink>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/drink.php</drink>
         | 
| 34 | 
            +
                <gothere>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/gothere.php</gothere>
         | 
| 35 | 
            +
                <saveblock>http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/saveblock.php</saveblock>
         | 
| 36 | 
            +
              </endpoints>
         | 
| 37 | 
            +
              <dsl>call :a1, :startblock, parameters: { :label => "select starting block", :method => :get, :arguments => [⭐(:name => :role, :value => "Runner"), ⭐(:name => :organization, :value => "Privat"), ⭐(:name => :link, :value => "http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html")] }, finalize: <<-END
         | 
| 38 | 
            +
              data.startblock = result
         | 
| 39 | 
            +
            END
         | 
| 40 | 
            +
            call :a2, :saveblock, parameters: { :label => "save starting block", :method => :post, :arguments => [⭐(:name => :startblock, :value => data.startblock)] }
         | 
| 41 | 
            +
            parallel :wait => -1 do
         | 
| 42 | 
            +
              parallel_branch  do ||
         | 
| 43 | 
            +
                call :a3, :run, parameters: { :label => "run", :method => :get, :arguments => [⭐(:name => :role, :value => "Runner"), ⭐(:name => :organization, :value => "Privat"), ⭐(:name => :link, :value => "http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html")] }, finalize: <<-END
         | 
| 44 | 
            +
                  data.runsteps = data.runsteps + result;
         | 
| 45 | 
            +
                END
         | 
| 46 | 
            +
              end
         | 
| 47 | 
            +
              parallel_branch  do ||
         | 
| 48 | 
            +
                call :a4, :traintime, parameters: { :label => "measure time", :method => :get, :arguments => nil }, finalize: <<-END
         | 
| 49 | 
            +
                  data.traintime = result
         | 
| 50 | 
            +
                END
         | 
| 51 | 
            +
              end
         | 
| 52 | 
            +
            end
         | 
| 53 | 
            +
            loop pre_test{data.traintime > 25}  do
         | 
| 54 | 
            +
              parallel :wait => -1 do
         | 
| 55 | 
            +
                parallel_branch  do ||
         | 
| 56 | 
            +
                  call :a5, :run, parameters: { :label => "run", :method => :get, :arguments => [⭐(:name => :role, :value => "Runner"), ⭐(:name => :organization, :value => "Privat"), ⭐(:name => :link, :value => "http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html")] }, finalize: <<-END
         | 
| 57 | 
            +
                    data.runsteps = data.runsteps + result;
         | 
| 58 | 
            +
                  END
         | 
| 59 | 
            +
                end
         | 
| 60 | 
            +
                parallel_branch  do ||
         | 
| 61 | 
            +
                  call :a6, :traintime, parameters: { :label => "measure time", :method => :get, :arguments => nil }, finalize: <<-END
         | 
| 62 | 
            +
                    data.traintime = result
         | 
| 63 | 
            +
                  END
         | 
| 64 | 
            +
                end
         | 
| 65 | 
            +
              end
         | 
| 66 | 
            +
            end
         | 
| 67 | 
            +
            call :a7, :contactapp, parameters: { :label => "contact app", :method => :get, :arguments => [⭐(:name => :role, :value => "Runner"), ⭐(:name => :organization, :value => "Privat"), ⭐(:name => :link, :value => "http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html")] }, finalize: <<-END
         | 
| 68 | 
            +
              data.contact = result
         | 
| 69 | 
            +
            END
         | 
| 70 | 
            +
            call :a8, :startnumber, parameters: { :label => "allocate start number", :method => :get, :arguments => nil }, finalize: <<-END
         | 
| 71 | 
            +
              data.startnumber= result
         | 
| 72 | 
            +
            END
         | 
| 73 | 
            +
            call :a16, :timeleft, parameters: { :label => "timeLeftERSATZ", :method => :post, :arguments => nil }, finalize: <<-END
         | 
| 74 | 
            +
              data.timeleft = result
         | 
| 75 | 
            +
            END
         | 
| 76 | 
            +
            choose :exclusive do
         | 
| 77 | 
            +
              alternative test{data.timeleft > 60} do
         | 
| 78 | 
            +
                call :a10, :gothere, parameters: { :label => "go home", :method => :post, :arguments => [⭐(:name => :home, :value => yes), ⭐(:name => :role, :value => "Runner"), ⭐(:name => :organization, :value => "Privat"), ⭐(:name => :link, :value => "http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html")] }, finalize: <<-END
         | 
| 79 | 
            +
                  data.gothere = result
         | 
| 80 | 
            +
                END
         | 
| 81 | 
            +
              end
         | 
| 82 | 
            +
              otherwise  do
         | 
| 83 | 
            +
                call :a11, :gothere, parameters: { :label => "go there directly", :method => :post, :arguments => [⭐(:name => :role, :value => "Runner"), ⭐(:name => :organization, :value => "Privat"), ⭐(:name => :link, :value => "http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"), ⭐(:name => :home, :value => no)] }, finalize: <<-END
         | 
| 84 | 
            +
                  data.gothere = result
         | 
| 85 | 
            +
                END
         | 
| 86 | 
            +
              end
         | 
| 87 | 
            +
            end
         | 
| 88 | 
            +
            parallel :wait => -1 do
         | 
| 89 | 
            +
              parallel_branch  do ||
         | 
| 90 | 
            +
                call :a12, :run, parameters: { :label => "run", :method => :post, :arguments => [⭐(:name => :role, :value => "Runner"), ⭐(:name => :organization, :value => "Privat"), ⭐(:name => :link, :value => "http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html")] }, finalize: <<-END
         | 
| 91 | 
            +
                  data.runsteps = data.runsteps + result;
         | 
| 92 | 
            +
                END
         | 
| 93 | 
            +
              end
         | 
| 94 | 
            +
              parallel_branch  do ||
         | 
| 95 | 
            +
                call :a13, :runtime, parameters: { :label => "measure time", :method => :get, :arguments => nil }, finalize: <<-END
         | 
| 96 | 
            +
                  data.runtime = result
         | 
| 97 | 
            +
                END
         | 
| 98 | 
            +
              end
         | 
| 99 | 
            +
              parallel_branch  do ||
         | 
| 100 | 
            +
                call :a14, :drink, parameters: { :label => "drink", :method => :get, :arguments => [⭐(:name => :role, :value => "Runner"), ⭐(:name => :organization, :value => "Privat"), ⭐(:name => :link, :value => "http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html")] }, finalize: <<-END
         | 
| 101 | 
            +
                  data.drink = result
         | 
| 102 | 
            +
                END
         | 
| 103 | 
            +
              end
         | 
| 104 | 
            +
            end
         | 
| 105 | 
            +
            call :a15, :result, parameters: { :label => "read results", :method => :post, :arguments => [⭐(:name => :runtime, :value => data.runtime)] }
         | 
| 106 | 
            +
            </dsl>
         | 
| 107 | 
            +
              <dslx>
         | 
| 108 | 
            +
                <description xmlns="http://cpee.org/ns/description/1.0">
         | 
| 109 | 
            +
                  <call id="a1" endpoint="startblock">
         | 
| 110 | 
            +
                    <parameters>
         | 
| 111 | 
            +
                      <label>select starting block</label>
         | 
| 112 | 
            +
                      <method>:get</method>
         | 
| 113 | 
            +
                      <arguments>
         | 
| 114 | 
            +
                        <role>"Runner"</role>
         | 
| 115 | 
            +
                        <organization>"Privat"</organization>
         | 
| 116 | 
            +
                        <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 117 | 
            +
                      </arguments>
         | 
| 118 | 
            +
                    </parameters>
         | 
| 119 | 
            +
                    <finalize output="result">data.startblock = result</finalize>
         | 
| 120 | 
            +
                    <update output="result"/>
         | 
| 121 | 
            +
                  </call>
         | 
| 122 | 
            +
                  <call id="a2" endpoint="saveblock">
         | 
| 123 | 
            +
                    <parameters>
         | 
| 124 | 
            +
                      <label>save starting block</label>
         | 
| 125 | 
            +
                      <method>:post</method>
         | 
| 126 | 
            +
                      <arguments>
         | 
| 127 | 
            +
                        <startblock>data.startblock</startblock>
         | 
| 128 | 
            +
                      </arguments>
         | 
| 129 | 
            +
                    </parameters>
         | 
| 130 | 
            +
                    <finalize output="result"/>
         | 
| 131 | 
            +
                    <update output="result"/>
         | 
| 132 | 
            +
                  </call>
         | 
| 133 | 
            +
                  <parallel wait="-1">
         | 
| 134 | 
            +
                    <parallel_branch pass="" local="">
         | 
| 135 | 
            +
                      <call id="a3" endpoint="run">
         | 
| 136 | 
            +
                        <parameters>
         | 
| 137 | 
            +
                          <label>run</label>
         | 
| 138 | 
            +
                          <method>:get</method>
         | 
| 139 | 
            +
                          <arguments>
         | 
| 140 | 
            +
                            <role>"Runner"</role>
         | 
| 141 | 
            +
                            <organization>"Privat"</organization>
         | 
| 142 | 
            +
                            <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 143 | 
            +
                          </arguments>
         | 
| 144 | 
            +
                        </parameters>
         | 
| 145 | 
            +
                        <finalize output="result">data.runsteps = data.runsteps + result;</finalize>
         | 
| 146 | 
            +
                        <update output="result"/>
         | 
| 147 | 
            +
                      </call>
         | 
| 148 | 
            +
                    </parallel_branch>
         | 
| 149 | 
            +
                    <parallel_branch pass="" local="">
         | 
| 150 | 
            +
                      <call id="a4" endpoint="traintime">
         | 
| 151 | 
            +
                        <parameters>
         | 
| 152 | 
            +
                          <label>measure time</label>
         | 
| 153 | 
            +
                          <method>:get</method>
         | 
| 154 | 
            +
                          <arguments/>
         | 
| 155 | 
            +
                        </parameters>
         | 
| 156 | 
            +
                        <finalize output="result">data.traintime = result</finalize>
         | 
| 157 | 
            +
                        <update output="result"/>
         | 
| 158 | 
            +
                      </call>
         | 
| 159 | 
            +
                    </parallel_branch>
         | 
| 160 | 
            +
                  </parallel>
         | 
| 161 | 
            +
                  <loop mode="pre_test" condition="data.traintime > 25">
         | 
| 162 | 
            +
                    <parallel wait="-1">
         | 
| 163 | 
            +
                      <parallel_branch pass="" local="">
         | 
| 164 | 
            +
                        <call id="a5" endpoint="run">
         | 
| 165 | 
            +
                          <parameters>
         | 
| 166 | 
            +
                            <label>run</label>
         | 
| 167 | 
            +
                            <method>:get</method>
         | 
| 168 | 
            +
                            <arguments>
         | 
| 169 | 
            +
                              <role>"Runner"</role>
         | 
| 170 | 
            +
                              <organization>"Privat"</organization>
         | 
| 171 | 
            +
                              <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 172 | 
            +
                            </arguments>
         | 
| 173 | 
            +
                          </parameters>
         | 
| 174 | 
            +
                          <finalize output="result">data.runsteps = data.runsteps + result;</finalize>
         | 
| 175 | 
            +
                          <update output="result"/>
         | 
| 176 | 
            +
                        </call>
         | 
| 177 | 
            +
                      </parallel_branch>
         | 
| 178 | 
            +
                      <parallel_branch pass="" local="">
         | 
| 179 | 
            +
                        <call id="a6" endpoint="traintime">
         | 
| 180 | 
            +
                          <parameters>
         | 
| 181 | 
            +
                            <label>measure time</label>
         | 
| 182 | 
            +
                            <method>:get</method>
         | 
| 183 | 
            +
                            <arguments/>
         | 
| 184 | 
            +
                          </parameters>
         | 
| 185 | 
            +
                          <finalize output="result">data.traintime = result</finalize>
         | 
| 186 | 
            +
                          <update output="result"/>
         | 
| 187 | 
            +
                        </call>
         | 
| 188 | 
            +
                      </parallel_branch>
         | 
| 189 | 
            +
                    </parallel>
         | 
| 190 | 
            +
                  </loop>
         | 
| 191 | 
            +
                  <call id="a7" endpoint="contactapp">
         | 
| 192 | 
            +
                    <parameters>
         | 
| 193 | 
            +
                      <label>contact app</label>
         | 
| 194 | 
            +
                      <method>:get</method>
         | 
| 195 | 
            +
                      <arguments>
         | 
| 196 | 
            +
                        <role>"Runner"</role>
         | 
| 197 | 
            +
                        <organization>"Privat"</organization>
         | 
| 198 | 
            +
                        <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 199 | 
            +
                      </arguments>
         | 
| 200 | 
            +
                    </parameters>
         | 
| 201 | 
            +
                    <finalize output="result">data.contact = result</finalize>
         | 
| 202 | 
            +
                    <update output="result"/>
         | 
| 203 | 
            +
                  </call>
         | 
| 204 | 
            +
                  <call id="a8" endpoint="startnumber">
         | 
| 205 | 
            +
                    <parameters>
         | 
| 206 | 
            +
                      <label>allocate start number</label>
         | 
| 207 | 
            +
                      <method>:get</method>
         | 
| 208 | 
            +
                      <arguments/>
         | 
| 209 | 
            +
                    </parameters>
         | 
| 210 | 
            +
                    <finalize output="result">data.startnumber= result</finalize>
         | 
| 211 | 
            +
                    <update output="result"/>
         | 
| 212 | 
            +
                  </call>
         | 
| 213 | 
            +
                  <call id="a16" endpoint="timeleft">
         | 
| 214 | 
            +
                    <parameters>
         | 
| 215 | 
            +
                      <label>timeLeftERSATZ</label>
         | 
| 216 | 
            +
                      <method>:post</method>
         | 
| 217 | 
            +
                      <arguments/>
         | 
| 218 | 
            +
                    </parameters>
         | 
| 219 | 
            +
                    <finalize output="result">data.timeleft = result</finalize>
         | 
| 220 | 
            +
                    <update output="result"/>
         | 
| 221 | 
            +
                  </call>
         | 
| 222 | 
            +
                  <choose mode="exclusive">
         | 
| 223 | 
            +
                    <alternative condition="data.timeleft > 60">
         | 
| 224 | 
            +
                      <call id="a10" endpoint="gothere">
         | 
| 225 | 
            +
                        <parameters>
         | 
| 226 | 
            +
                          <label>go home</label>
         | 
| 227 | 
            +
                          <method>:post</method>
         | 
| 228 | 
            +
                          <arguments>
         | 
| 229 | 
            +
                            <home>yes</home>
         | 
| 230 | 
            +
                            <role>"Runner"</role>
         | 
| 231 | 
            +
                            <organization>"Privat"</organization>
         | 
| 232 | 
            +
                            <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 233 | 
            +
                          </arguments>
         | 
| 234 | 
            +
                        </parameters>
         | 
| 235 | 
            +
                        <finalize output="result">data.gothere = result</finalize>
         | 
| 236 | 
            +
                        <update output="result"/>
         | 
| 237 | 
            +
                      </call>
         | 
| 238 | 
            +
                    </alternative>
         | 
| 239 | 
            +
                    <otherwise>
         | 
| 240 | 
            +
                      <call id="a11" endpoint="gothere">
         | 
| 241 | 
            +
                        <parameters>
         | 
| 242 | 
            +
                          <label>go there directly</label>
         | 
| 243 | 
            +
                          <method>:post</method>
         | 
| 244 | 
            +
                          <arguments>
         | 
| 245 | 
            +
                            <role>"Runner"</role>
         | 
| 246 | 
            +
                            <organization>"Privat"</organization>
         | 
| 247 | 
            +
                            <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 248 | 
            +
                            <home>no</home>
         | 
| 249 | 
            +
                          </arguments>
         | 
| 250 | 
            +
                        </parameters>
         | 
| 251 | 
            +
                        <finalize output="result">data.gothere = result</finalize>
         | 
| 252 | 
            +
                        <update output="result"/>
         | 
| 253 | 
            +
                      </call>
         | 
| 254 | 
            +
                    </otherwise>
         | 
| 255 | 
            +
                  </choose>
         | 
| 256 | 
            +
                  <parallel wait="-1">
         | 
| 257 | 
            +
                    <parallel_branch pass="" local="">
         | 
| 258 | 
            +
                      <call id="a12" endpoint="run">
         | 
| 259 | 
            +
                        <parameters>
         | 
| 260 | 
            +
                          <label>run</label>
         | 
| 261 | 
            +
                          <method>:post</method>
         | 
| 262 | 
            +
                          <arguments>
         | 
| 263 | 
            +
                            <role>"Runner"</role>
         | 
| 264 | 
            +
                            <organization>"Privat"</organization>
         | 
| 265 | 
            +
                            <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 266 | 
            +
                          </arguments>
         | 
| 267 | 
            +
                        </parameters>
         | 
| 268 | 
            +
                        <finalize output="result">data.runsteps = data.runsteps + result;</finalize>
         | 
| 269 | 
            +
                        <update output="result"/>
         | 
| 270 | 
            +
                      </call>
         | 
| 271 | 
            +
                    </parallel_branch>
         | 
| 272 | 
            +
                    <parallel_branch pass="" local="">
         | 
| 273 | 
            +
                      <call id="a13" endpoint="runtime">
         | 
| 274 | 
            +
                        <parameters>
         | 
| 275 | 
            +
                          <label>measure time</label>
         | 
| 276 | 
            +
                          <method>:get</method>
         | 
| 277 | 
            +
                          <arguments/>
         | 
| 278 | 
            +
                        </parameters>
         | 
| 279 | 
            +
                        <finalize output="result">data.runtime = result</finalize>
         | 
| 280 | 
            +
                        <update output="result"/>
         | 
| 281 | 
            +
                      </call>
         | 
| 282 | 
            +
                    </parallel_branch>
         | 
| 283 | 
            +
                    <parallel_branch pass="" local="">
         | 
| 284 | 
            +
                      <call id="a14" endpoint="drink">
         | 
| 285 | 
            +
                        <parameters>
         | 
| 286 | 
            +
                          <label>drink</label>
         | 
| 287 | 
            +
                          <method>:get</method>
         | 
| 288 | 
            +
                          <arguments>
         | 
| 289 | 
            +
                            <role>"Runner"</role>
         | 
| 290 | 
            +
                            <organization>"Privat"</organization>
         | 
| 291 | 
            +
                            <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 292 | 
            +
                          </arguments>
         | 
| 293 | 
            +
                        </parameters>
         | 
| 294 | 
            +
                        <finalize output="result">data.drink = result</finalize>
         | 
| 295 | 
            +
                        <update output="result"/>
         | 
| 296 | 
            +
                      </call>
         | 
| 297 | 
            +
                    </parallel_branch>
         | 
| 298 | 
            +
                  </parallel>
         | 
| 299 | 
            +
                  <call id="a15" endpoint="result">
         | 
| 300 | 
            +
                    <parameters>
         | 
| 301 | 
            +
                      <label>read results</label>
         | 
| 302 | 
            +
                      <method>:post</method>
         | 
| 303 | 
            +
                      <arguments>
         | 
| 304 | 
            +
                        <runtime>data.runtime</runtime>
         | 
| 305 | 
            +
                      </arguments>
         | 
| 306 | 
            +
                    </parameters>
         | 
| 307 | 
            +
                    <finalize output="result"/>
         | 
| 308 | 
            +
                  </call>
         | 
| 309 | 
            +
                </description>
         | 
| 310 | 
            +
              </dslx>
         | 
| 311 | 
            +
              <status>
         | 
| 312 | 
            +
                <id>0</id>
         | 
| 313 | 
            +
                <message>undefined</message>
         | 
| 314 | 
            +
              </status>
         | 
| 315 | 
            +
              <description>
         | 
| 316 | 
            +
                <description xmlns="http://cpee.org/ns/description/1.0">
         | 
| 317 | 
            +
                  <call id="a1" endpoint="startblock">
         | 
| 318 | 
            +
                    <parameters>
         | 
| 319 | 
            +
                      <label>select starting block</label>
         | 
| 320 | 
            +
                      <method>:get</method>
         | 
| 321 | 
            +
                      <arguments>
         | 
| 322 | 
            +
                        <role>"Runner"</role>
         | 
| 323 | 
            +
                        <organization>"Privat"</organization>
         | 
| 324 | 
            +
                        <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 325 | 
            +
                      </arguments>
         | 
| 326 | 
            +
                    </parameters>
         | 
| 327 | 
            +
                    <finalize output="result">data.startblock = result</finalize>
         | 
| 328 | 
            +
                    <update output="result"/>
         | 
| 329 | 
            +
                  </call>
         | 
| 330 | 
            +
                  <call id="a2" endpoint="saveblock">
         | 
| 331 | 
            +
                    <parameters>
         | 
| 332 | 
            +
                      <label>save starting block</label>
         | 
| 333 | 
            +
                      <method>:post</method>
         | 
| 334 | 
            +
                      <arguments>
         | 
| 335 | 
            +
                        <startblock>data.startblock</startblock>
         | 
| 336 | 
            +
                      </arguments>
         | 
| 337 | 
            +
                    </parameters>
         | 
| 338 | 
            +
                    <finalize output="result"/>
         | 
| 339 | 
            +
                    <update output="result"/>
         | 
| 340 | 
            +
                  </call>
         | 
| 341 | 
            +
                  <parallel wait="-1">
         | 
| 342 | 
            +
                    <parallel_branch pass="" local="">
         | 
| 343 | 
            +
                      <call id="a3" endpoint="run">
         | 
| 344 | 
            +
                        <parameters>
         | 
| 345 | 
            +
                          <label>run</label>
         | 
| 346 | 
            +
                          <method>:get</method>
         | 
| 347 | 
            +
                          <arguments>
         | 
| 348 | 
            +
                            <role>"Runner"</role>
         | 
| 349 | 
            +
                            <organization>"Privat"</organization>
         | 
| 350 | 
            +
                            <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 351 | 
            +
                          </arguments>
         | 
| 352 | 
            +
                        </parameters>
         | 
| 353 | 
            +
                        <finalize output="result">data.runsteps = data.runsteps + result;</finalize>
         | 
| 354 | 
            +
                        <update output="result"/>
         | 
| 355 | 
            +
                      </call>
         | 
| 356 | 
            +
                    </parallel_branch>
         | 
| 357 | 
            +
                    <parallel_branch pass="" local="">
         | 
| 358 | 
            +
                      <call id="a4" endpoint="traintime">
         | 
| 359 | 
            +
                        <parameters>
         | 
| 360 | 
            +
                          <label>measure time</label>
         | 
| 361 | 
            +
                          <method>:get</method>
         | 
| 362 | 
            +
                          <arguments/>
         | 
| 363 | 
            +
                        </parameters>
         | 
| 364 | 
            +
                        <finalize output="result">data.traintime = result</finalize>
         | 
| 365 | 
            +
                        <update output="result"/>
         | 
| 366 | 
            +
                      </call>
         | 
| 367 | 
            +
                    </parallel_branch>
         | 
| 368 | 
            +
                  </parallel>
         | 
| 369 | 
            +
                  <loop mode="pre_test" condition="data.traintime > 25">
         | 
| 370 | 
            +
                    <parallel wait="-1">
         | 
| 371 | 
            +
                      <parallel_branch pass="" local="">
         | 
| 372 | 
            +
                        <call id="a5" endpoint="run">
         | 
| 373 | 
            +
                          <parameters>
         | 
| 374 | 
            +
                            <label>run</label>
         | 
| 375 | 
            +
                            <method>:get</method>
         | 
| 376 | 
            +
                            <arguments>
         | 
| 377 | 
            +
                              <role>"Runner"</role>
         | 
| 378 | 
            +
                              <organization>"Privat"</organization>
         | 
| 379 | 
            +
                              <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 380 | 
            +
                            </arguments>
         | 
| 381 | 
            +
                          </parameters>
         | 
| 382 | 
            +
                          <finalize output="result">data.runsteps = data.runsteps + result;</finalize>
         | 
| 383 | 
            +
                          <update output="result"/>
         | 
| 384 | 
            +
                        </call>
         | 
| 385 | 
            +
                      </parallel_branch>
         | 
| 386 | 
            +
                      <parallel_branch pass="" local="">
         | 
| 387 | 
            +
                        <call id="a6" endpoint="traintime">
         | 
| 388 | 
            +
                          <parameters>
         | 
| 389 | 
            +
                            <label>measure time</label>
         | 
| 390 | 
            +
                            <method>:get</method>
         | 
| 391 | 
            +
                            <arguments/>
         | 
| 392 | 
            +
                          </parameters>
         | 
| 393 | 
            +
                          <finalize output="result">data.traintime = result</finalize>
         | 
| 394 | 
            +
                          <update output="result"/>
         | 
| 395 | 
            +
                        </call>
         | 
| 396 | 
            +
                      </parallel_branch>
         | 
| 397 | 
            +
                    </parallel>
         | 
| 398 | 
            +
                  </loop>
         | 
| 399 | 
            +
                  <call id="a7" endpoint="contactapp">
         | 
| 400 | 
            +
                    <parameters>
         | 
| 401 | 
            +
                      <label>contact app</label>
         | 
| 402 | 
            +
                      <method>:get</method>
         | 
| 403 | 
            +
                      <arguments>
         | 
| 404 | 
            +
                        <role>"Runner"</role>
         | 
| 405 | 
            +
                        <organization>"Privat"</organization>
         | 
| 406 | 
            +
                        <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 407 | 
            +
                      </arguments>
         | 
| 408 | 
            +
                    </parameters>
         | 
| 409 | 
            +
                    <finalize output="result">data.contact = result</finalize>
         | 
| 410 | 
            +
                    <update output="result"/>
         | 
| 411 | 
            +
                  </call>
         | 
| 412 | 
            +
                  <call id="a8" endpoint="startnumber">
         | 
| 413 | 
            +
                    <parameters>
         | 
| 414 | 
            +
                      <label>allocate start number</label>
         | 
| 415 | 
            +
                      <method>:get</method>
         | 
| 416 | 
            +
                      <arguments/>
         | 
| 417 | 
            +
                    </parameters>
         | 
| 418 | 
            +
                    <finalize output="result">data.startnumber= result</finalize>
         | 
| 419 | 
            +
                    <update output="result"/>
         | 
| 420 | 
            +
                  </call>
         | 
| 421 | 
            +
                  <call id="a16" endpoint="timeleft">
         | 
| 422 | 
            +
                    <parameters>
         | 
| 423 | 
            +
                      <label>timeLeftERSATZ</label>
         | 
| 424 | 
            +
                      <method>:post</method>
         | 
| 425 | 
            +
                      <arguments/>
         | 
| 426 | 
            +
                    </parameters>
         | 
| 427 | 
            +
                    <finalize output="result">data.timeleft = result</finalize>
         | 
| 428 | 
            +
                    <update output="result"/>
         | 
| 429 | 
            +
                  </call>
         | 
| 430 | 
            +
                  <choose mode="exclusive">
         | 
| 431 | 
            +
                    <alternative condition="data.timeleft > 60">
         | 
| 432 | 
            +
                      <call id="a10" endpoint="gothere">
         | 
| 433 | 
            +
                        <parameters>
         | 
| 434 | 
            +
                          <label>go home</label>
         | 
| 435 | 
            +
                          <method>:post</method>
         | 
| 436 | 
            +
                          <arguments>
         | 
| 437 | 
            +
                            <home>yes</home>
         | 
| 438 | 
            +
                            <role>"Runner"</role>
         | 
| 439 | 
            +
                            <organization>"Privat"</organization>
         | 
| 440 | 
            +
                            <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 441 | 
            +
                          </arguments>
         | 
| 442 | 
            +
                        </parameters>
         | 
| 443 | 
            +
                        <finalize output="result">data.gothere = result</finalize>
         | 
| 444 | 
            +
                        <update output="result"/>
         | 
| 445 | 
            +
                      </call>
         | 
| 446 | 
            +
                    </alternative>
         | 
| 447 | 
            +
                    <otherwise>
         | 
| 448 | 
            +
                      <call id="a11" endpoint="gothere">
         | 
| 449 | 
            +
                        <parameters>
         | 
| 450 | 
            +
                          <label>go there directly</label>
         | 
| 451 | 
            +
                          <method>:post</method>
         | 
| 452 | 
            +
                          <arguments>
         | 
| 453 | 
            +
                            <role>"Runner"</role>
         | 
| 454 | 
            +
                            <organization>"Privat"</organization>
         | 
| 455 | 
            +
                            <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 456 | 
            +
                            <home>no</home>
         | 
| 457 | 
            +
                          </arguments>
         | 
| 458 | 
            +
                        </parameters>
         | 
| 459 | 
            +
                        <finalize output="result">data.gothere = result</finalize>
         | 
| 460 | 
            +
                        <update output="result"/>
         | 
| 461 | 
            +
                      </call>
         | 
| 462 | 
            +
                    </otherwise>
         | 
| 463 | 
            +
                  </choose>
         | 
| 464 | 
            +
                  <parallel wait="-1">
         | 
| 465 | 
            +
                    <parallel_branch pass="" local="">
         | 
| 466 | 
            +
                      <call id="a12" endpoint="run">
         | 
| 467 | 
            +
                        <parameters>
         | 
| 468 | 
            +
                          <label>run</label>
         | 
| 469 | 
            +
                          <method>:post</method>
         | 
| 470 | 
            +
                          <arguments>
         | 
| 471 | 
            +
                            <role>"Runner"</role>
         | 
| 472 | 
            +
                            <organization>"Privat"</organization>
         | 
| 473 | 
            +
                            <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 474 | 
            +
                          </arguments>
         | 
| 475 | 
            +
                        </parameters>
         | 
| 476 | 
            +
                        <finalize output="result">data.runsteps = data.runsteps + result;</finalize>
         | 
| 477 | 
            +
                        <update output="result"/>
         | 
| 478 | 
            +
                      </call>
         | 
| 479 | 
            +
                    </parallel_branch>
         | 
| 480 | 
            +
                    <parallel_branch pass="" local="">
         | 
| 481 | 
            +
                      <call id="a13" endpoint="runtime">
         | 
| 482 | 
            +
                        <parameters>
         | 
| 483 | 
            +
                          <label>measure time</label>
         | 
| 484 | 
            +
                          <method>:get</method>
         | 
| 485 | 
            +
                          <arguments/>
         | 
| 486 | 
            +
                        </parameters>
         | 
| 487 | 
            +
                        <finalize output="result">data.runtime = result</finalize>
         | 
| 488 | 
            +
                        <update output="result"/>
         | 
| 489 | 
            +
                      </call>
         | 
| 490 | 
            +
                    </parallel_branch>
         | 
| 491 | 
            +
                    <parallel_branch pass="" local="">
         | 
| 492 | 
            +
                      <call id="a14" endpoint="drink">
         | 
| 493 | 
            +
                        <parameters>
         | 
| 494 | 
            +
                          <label>drink</label>
         | 
| 495 | 
            +
                          <method>:get</method>
         | 
| 496 | 
            +
                          <arguments>
         | 
| 497 | 
            +
                            <role>"Runner"</role>
         | 
| 498 | 
            +
                            <organization>"Privat"</organization>
         | 
| 499 | 
            +
                            <link>"http://wwwlab.cs.univie.ac.at/~sumeredera95/wt17/startblockChose.html"</link>
         | 
| 500 | 
            +
                          </arguments>
         | 
| 501 | 
            +
                        </parameters>
         | 
| 502 | 
            +
                        <finalize output="result">data.drink = result</finalize>
         | 
| 503 | 
            +
                        <update output="result"/>
         | 
| 504 | 
            +
                      </call>
         | 
| 505 | 
            +
                    </parallel_branch>
         | 
| 506 | 
            +
                  </parallel>
         | 
| 507 | 
            +
                  <call id="a15" endpoint="result">
         | 
| 508 | 
            +
                    <parameters>
         | 
| 509 | 
            +
                      <label>read results</label>
         | 
| 510 | 
            +
                      <method>:post</method>
         | 
| 511 | 
            +
                      <arguments>
         | 
| 512 | 
            +
                        <runtime>data.runtime</runtime>
         | 
| 513 | 
            +
                      </arguments>
         | 
| 514 | 
            +
                    </parameters>
         | 
| 515 | 
            +
                    <finalize output="result"/>
         | 
| 516 | 
            +
                  </call>
         | 
| 517 | 
            +
                </description>
         | 
| 518 | 
            +
              </description>
         | 
| 519 | 
            +
              <transformation>
         | 
| 520 | 
            +
                <description type="copy"/>
         | 
| 521 | 
            +
                <dataelements type="none"/>
         | 
| 522 | 
            +
                <endpoints type="none"/>
         | 
| 523 | 
            +
              </transformation>
         | 
| 524 | 
            +
            </properties>
         |