cpee 1.5.20 → 2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{FEATURES → FEATURES.md} +7 -6
- data/INSTALL.md +1 -0
- data/{README → README.md} +3 -3
- data/Rakefile +1 -0
- data/cockpit/index.html +8 -8
- data/cockpit/js/details.js +13 -14
- data/cockpit/js/instance.js +192 -290
- data/cockpit/js/parameters.js +13 -3
- data/cockpit/js/ui.js +2 -2
- data/cockpit/rngs/attributes.rng +3 -3
- data/cockpit/rngs/dataelements.rng +3 -3
- data/cockpit/rngs/endpoints.rng +3 -3
- data/cockpit/{testsets → templates.legacy}/Async.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/BCO.xml +7 -10
- data/cockpit/{testsets → templates.legacy}/BCS.xml +7 -10
- data/cockpit/{testsets → templates.legacy}/Centurio.xml +6 -6
- data/cockpit/{testsets → templates.legacy}/Concurrent.xml +6 -6
- data/cockpit/{testsets → templates.legacy}/Coopis Testset.xml +6 -6
- data/cockpit/{testsets → templates.legacy}/Endpoints and Data Manipulation.xml +6 -6
- data/cockpit/{testsets → templates.legacy}/ICSOC Testset.xml +6 -6
- data/cockpit/{testsets → templates.legacy}/Infinity.xml +3 -3
- data/cockpit/{testsets → templates.legacy}/Lego Boxer.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Lego Conveyor.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Lego Crane.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Lego Ejector.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Lego Full.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Lego Liddy.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Lego Plate.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Lego Transporter.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Lego_Part_1.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/LgLinear.xml +6 -10
- data/cockpit/{testsets → templates.legacy}/Linear.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Log.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Mangler 1.xml +6 -6
- data/cockpit/{testsets → templates.legacy}/Mangler 2.xml +6 -6
- data/cockpit/{testsets → templates.legacy}/Manuel Labels.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Promise.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/SOPROMO Test Sonification.xml +6 -6
- data/cockpit/{testsets → templates.legacy}/Subprocess.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Syncing P34 1.xml +8 -11
- data/cockpit/{testsets → templates.legacy}/Syncing P34 2.xml +8 -11
- data/cockpit/{testsets → templates.legacy}/Syncing P34 3.xml +8 -11
- data/cockpit/{testsets → templates.legacy}/Syncing P34.xml +8 -11
- data/cockpit/{testsets → templates.legacy}/TEST - Bad Loop.xml +6 -6
- data/cockpit/{testsets → templates.legacy}/TEST - Wrong Positions.xml +6 -6
- data/cockpit/{testsets → templates.legacy}/Take_5.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Update.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Worklist Parallel.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Worklist Test CPEE.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Worklist Test.xml +7 -7
- data/cockpit/{testsets → templates.legacy}/Worklist Test2.xml +7 -7
- data/cockpit/templates.legacy/convert_cpee2.rb +15 -0
- data/cockpit/{testsets → templates.legacy}/convert_preset.rb +0 -0
- data/cockpit/{testsets → templates.legacy}/testsets.xml +1 -1
- data/cockpit/{testsets → templates.legacy}/transformations.xml +0 -0
- data/cockpit/templates/BPM 2020 Manual Adjust.xml +182 -0
- data/cockpit/templates/BPM 2020 Solution Baseline.xml +196 -0
- data/cockpit/templates/BPM 2020 Solution NN.xml +197 -0
- data/cockpit/templates/BPM 2020 Solution View.xml +144 -0
- data/cockpit/templates/BPM 2020.xml +26 -0
- data/cockpit/templates/Coopis 2010.xml +85 -0
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +77 -0
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +77 -0
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +77 -0
- data/cockpit/templates/Worklist.xml +42 -0
- data/cockpit/templates/convert_cpee2.rb +15 -0
- data/cockpit/themes/compact/rngs/alternative.rng +25 -0
- data/cockpit/themes/compact/rngs/call.rng +20 -14
- data/cockpit/themes/compact/rngs/callmanipulate.rng +28 -22
- data/cockpit/themes/compact/rngs/choose.rng +14 -0
- data/cockpit/themes/compact/rngs/critical.rng +5 -0
- data/cockpit/themes/compact/rngs/escape.rng +1 -0
- data/cockpit/themes/compact/rngs/group.rng +3 -0
- data/cockpit/themes/compact/rngs/loop.rng +22 -0
- data/cockpit/themes/compact/rngs/manipulate.rng +9 -0
- data/cockpit/themes/compact/rngs/otherwise.rng +22 -0
- data/cockpit/themes/compact/rngs/parallel.rng +21 -0
- data/cockpit/themes/compact/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/compact/rngs/scripts.rng +10 -11
- data/cockpit/themes/compact/rngs/stop.rng +5 -0
- data/cockpit/themes/compact/rngs/terminate.rng +1 -0
- data/cockpit/themes/compact/theme.js +1 -1
- data/cockpit/themes/convert_cpee2.rb +8 -0
- data/cockpit/themes/default/rngs/alternative.rng +8 -8
- data/cockpit/themes/default/rngs/call.rng +85 -49
- data/cockpit/themes/default/rngs/callmanipulate.rng +103 -64
- data/cockpit/themes/default/rngs/choose.rng +5 -3
- data/cockpit/themes/default/rngs/critical.rng +2 -2
- data/cockpit/themes/default/rngs/escape.rng +1 -1
- data/cockpit/themes/default/rngs/group.rng +3 -3
- data/cockpit/themes/default/rngs/loop.rng +8 -8
- data/cockpit/themes/default/rngs/manipulate.rng +3 -3
- data/cockpit/themes/default/rngs/otherwise.rng +8 -8
- data/cockpit/themes/default/rngs/parallel.rng +14 -6
- data/cockpit/themes/default/rngs/parallel_branch.rng +2 -2
- data/cockpit/themes/default/rngs/scripts.rng +23 -0
- data/cockpit/themes/default/rngs/stop.rng +2 -2
- data/cockpit/themes/default/rngs/terminate.rng +1 -1
- data/cockpit/themes/extended/rngs/alternative.rng +25 -0
- data/cockpit/themes/extended/rngs/call.rng +20 -14
- data/cockpit/themes/extended/rngs/callmanipulate.rng +28 -22
- data/cockpit/themes/extended/rngs/choose.rng +14 -0
- data/cockpit/themes/extended/rngs/critical.rng +5 -0
- data/cockpit/themes/extended/rngs/escape.rng +1 -0
- data/cockpit/themes/extended/rngs/group.rng +3 -0
- data/cockpit/themes/extended/rngs/loop.rng +22 -0
- data/cockpit/themes/extended/rngs/manipulate.rng +9 -0
- data/cockpit/themes/extended/rngs/otherwise.rng +22 -0
- data/cockpit/themes/extended/rngs/parallel.rng +21 -0
- data/cockpit/themes/extended/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/extended/rngs/scripts.rng +10 -11
- data/cockpit/themes/extended/rngs/stop.rng +5 -0
- data/cockpit/themes/extended/rngs/terminate.rng +1 -0
- data/cockpit/themes/extended/theme.js +14 -28
- data/cockpit/themes/model/rngs/alternative.rng +1 -1
- data/cockpit/themes/model/rngs/call.rng +16 -16
- data/cockpit/themes/model/rngs/callmanipulate.rng +17 -17
- data/cockpit/themes/model/rngs/choose.rng +1 -1
- data/cockpit/themes/model/rngs/critical.rng +1 -1
- data/cockpit/themes/model/rngs/escape.rng +1 -1
- data/cockpit/themes/model/rngs/group.rng +1 -1
- data/cockpit/themes/model/rngs/loop.rng +1 -1
- data/cockpit/themes/model/rngs/manipulate.rng +1 -1
- data/cockpit/themes/model/rngs/otherwise.rng +1 -1
- data/cockpit/themes/model/rngs/parallel.rng +1 -1
- data/cockpit/themes/model/rngs/parallel_branch.rng +1 -1
- data/cockpit/themes/model/rngs/scripts.rng +3 -4
- data/cockpit/themes/model/rngs/stop.rng +1 -1
- data/cockpit/themes/model/rngs/terminate.rng +1 -1
- data/cockpit/themes/model/theme.js +8 -7
- data/cockpit/themes/packed/rngs/alternative.rng +25 -0
- data/cockpit/themes/packed/rngs/call.rng +20 -14
- data/cockpit/themes/packed/rngs/callmanipulate.rng +28 -22
- data/cockpit/themes/packed/rngs/choose.rng +14 -0
- data/cockpit/themes/packed/rngs/critical.rng +5 -0
- data/cockpit/themes/packed/rngs/escape.rng +1 -0
- data/cockpit/themes/packed/rngs/group.rng +3 -0
- data/cockpit/themes/packed/rngs/loop.rng +22 -0
- data/cockpit/themes/packed/rngs/manipulate.rng +9 -0
- data/cockpit/themes/packed/rngs/otherwise.rng +22 -0
- data/cockpit/themes/packed/rngs/parallel.rng +21 -0
- data/cockpit/themes/packed/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/packed/rngs/scripts.rng +10 -11
- data/cockpit/themes/packed/rngs/stop.rng +5 -0
- data/cockpit/themes/packed/rngs/terminate.rng +1 -0
- data/cockpit/themes/packed/theme.js +8 -7
- data/cockpit/themes/preset/rngs/alternative.rng +25 -0
- data/cockpit/themes/preset/rngs/call.rng +20 -14
- data/cockpit/themes/preset/rngs/callmanipulate.rng +28 -22
- data/cockpit/themes/preset/rngs/choose.rng +14 -0
- data/cockpit/themes/preset/rngs/critical.rng +5 -0
- data/cockpit/themes/preset/rngs/escape.rng +1 -0
- data/cockpit/themes/preset/rngs/group.rng +3 -0
- data/cockpit/themes/preset/rngs/loop.rng +22 -0
- data/cockpit/themes/preset/rngs/manipulate.rng +9 -0
- data/cockpit/themes/preset/rngs/otherwise.rng +22 -0
- data/cockpit/themes/preset/rngs/parallel.rng +21 -0
- data/cockpit/themes/preset/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/preset/rngs/scripts.rng +10 -11
- data/cockpit/themes/preset/rngs/stop.rng +5 -0
- data/cockpit/themes/preset/rngs/terminate.rng +1 -0
- data/cockpit/themes/preset/theme.js +8 -7
- data/cpee.gemspec +9 -9
- data/{log/topics.xml → lib/callbacks.xml} +16 -6
- data/lib/{engine → callbacks}/callbacks.rng +2 -8
- data/lib/cpee.xml +10 -4
- data/lib/cpee/attributes_helper.rb +27 -0
- data/lib/cpee/controller.rb +113 -596
- data/lib/cpee/implementation.rb +152 -191
- data/lib/cpee/implementation_callbacks.rb +77 -0
- data/lib/cpee/implementation_notifications.rb +189 -0
- data/lib/cpee/implementation_properties.rb +707 -0
- data/lib/cpee/{callback.rb → message.rb} +20 -18
- data/lib/cpee/persistence.rb +135 -0
- data/lib/cpee/statemachine.rb +20 -0
- data/lib/cpee/transform.rb +95 -0
- data/lib/engine.xml +1 -59
- data/lib/properties.xml +236 -0
- data/lib/properties/arbitrary.rng +26 -0
- data/lib/properties/attributes.rng +10 -0
- data/lib/properties/dataelements.rng +10 -0
- data/lib/properties/description.rng +8 -0
- data/lib/properties/dsl.rng +7 -0
- data/lib/properties/dslx.rng +8 -0
- data/lib/properties/endpoints.rng +10 -0
- data/lib/properties/handlerwrapper.rng +9 -0
- data/lib/properties/position.rng +15 -0
- data/lib/properties/positions.rng +10 -0
- data/lib/properties/properties.rng +29 -0
- data/lib/properties/set-properties.rng +25 -0
- data/lib/properties/set-some-properties.rng +45 -0
- data/lib/properties/simple.rng +8 -0
- data/lib/properties/state.rng +33 -0
- data/lib/properties/status.rng +12 -0
- data/lib/properties/t_attributes.rng +7 -0
- data/lib/properties/t_dataelements.rng +7 -0
- data/lib/properties/t_endpoints.rng +7 -0
- data/lib/properties/t_position.rng +7 -0
- data/lib/properties/t_positions.rng +7 -0
- data/lib/properties/t_simple.rng +7 -0
- data/lib/properties/t_status.rng +7 -0
- data/lib/properties/t_transformation.rng +7 -0
- data/lib/properties/transformation.rng +40 -0
- data/server/dev.rb +1 -0
- data/server/handlerwrappers/default.rb +40 -34
- data/server/resources/backend/README.md +17 -0
- data/server/resources/backend/instance.rb +23 -0
- data/server/resources/backend/instance.template +19 -0
- data/server/resources/backend/opts.yaml +6 -0
- data/server/resources/backend/run +29 -0
- data/server/resources/notifications/logging/subscription.xml +1 -1
- data/server/resources/properties.empty +38 -0
- data/server/resources/properties.init +11 -11
- data/server/resources/states.dot +19 -0
- data/server/resources/states.xml +49 -0
- data/server/resources/transformation_dslx.xsl +3 -0
- data/server/routing/end.rb +44 -0
- data/server/routing/forward-events.rb +59 -0
- data/server/routing/forward-votes.rb +108 -0
- data/server/routing/persist.rb +155 -0
- data/server/server.rb +1 -0
- data/tools/cpee +19 -15
- metadata +126 -156
- data/INSTALL +0 -23
- data/cockpit/test.html +0 -40
- data/cockpit/themes/compact/rngs/alternative.rng +0 -1
- data/cockpit/themes/compact/rngs/choose.rng +0 -1
- data/cockpit/themes/compact/rngs/critical.rng +0 -1
- data/cockpit/themes/compact/rngs/escape.rng +0 -1
- data/cockpit/themes/compact/rngs/group.rng +0 -1
- data/cockpit/themes/compact/rngs/loop.rng +0 -1
- data/cockpit/themes/compact/rngs/manipulate.rng +0 -1
- data/cockpit/themes/compact/rngs/otherwise.rng +0 -1
- data/cockpit/themes/compact/rngs/parallel.rng +0 -1
- data/cockpit/themes/compact/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/compact/rngs/stop.rng +0 -1
- data/cockpit/themes/compact/rngs/terminate.rng +0 -1
- data/cockpit/themes/default/rngs/finalize.rng +0 -6
- data/cockpit/themes/default/rngs/update.rng +0 -6
- data/cockpit/themes/default/theme.js +0 -1286
- data/cockpit/themes/extended/rngs/alternative.rng +0 -1
- data/cockpit/themes/extended/rngs/choose.rng +0 -1
- data/cockpit/themes/extended/rngs/critical.rng +0 -1
- data/cockpit/themes/extended/rngs/escape.rng +0 -1
- data/cockpit/themes/extended/rngs/group.rng +0 -1
- data/cockpit/themes/extended/rngs/loop.rng +0 -1
- data/cockpit/themes/extended/rngs/manipulate.rng +0 -1
- data/cockpit/themes/extended/rngs/otherwise.rng +0 -1
- data/cockpit/themes/extended/rngs/parallel.rng +0 -1
- data/cockpit/themes/extended/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/extended/rngs/stop.rng +0 -1
- data/cockpit/themes/extended/rngs/terminate.rng +0 -1
- data/cockpit/themes/labels/rngs/alternative.rng +0 -25
- data/cockpit/themes/labels/rngs/call.rng +0 -81
- data/cockpit/themes/labels/rngs/callmanipulate.rng +0 -101
- data/cockpit/themes/labels/rngs/choose.rng +0 -12
- data/cockpit/themes/labels/rngs/critical.rng +0 -5
- data/cockpit/themes/labels/rngs/escape.rng +0 -1
- data/cockpit/themes/labels/rngs/finalize.rng +0 -6
- data/cockpit/themes/labels/rngs/group.rng +0 -3
- data/cockpit/themes/labels/rngs/loop.rng +0 -22
- data/cockpit/themes/labels/rngs/manipulate.rng +0 -9
- data/cockpit/themes/labels/rngs/otherwise.rng +0 -22
- data/cockpit/themes/labels/rngs/parallel.rng +0 -13
- data/cockpit/themes/labels/rngs/parallel_branch.rng +0 -8
- data/cockpit/themes/labels/rngs/stop.rng +0 -5
- data/cockpit/themes/labels/rngs/terminate.rng +0 -1
- data/cockpit/themes/labels/rngs/update.rng +0 -6
- data/cockpit/themes/labels/symbols/alternative.svg +0 -5
- data/cockpit/themes/labels/symbols/arrow.svg +0 -3
- data/cockpit/themes/labels/symbols/call.svg +0 -6
- data/cockpit/themes/labels/symbols/callmanipulate.svg +0 -8
- data/cockpit/themes/labels/symbols/choose.svg +0 -5
- data/cockpit/themes/labels/symbols/choose_exclusive.svg +0 -5
- data/cockpit/themes/labels/symbols/choose_inclusive.svg +0 -4
- data/cockpit/themes/labels/symbols/complex.svg +0 -8
- data/cockpit/themes/labels/symbols/critical.svg +0 -4
- data/cockpit/themes/labels/symbols/end.svg +0 -3
- data/cockpit/themes/labels/symbols/escape.svg +0 -5
- data/cockpit/themes/labels/symbols/event_end.svg +0 -3
- data/cockpit/themes/labels/symbols/loop.svg +0 -5
- data/cockpit/themes/labels/symbols/manipulate.svg +0 -4
- data/cockpit/themes/labels/symbols/otherwise.svg +0 -5
- data/cockpit/themes/labels/symbols/parallel.svg +0 -5
- data/cockpit/themes/labels/symbols/parallel_branch.svg +0 -5
- data/cockpit/themes/labels/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/labels/symbols/parallel_branch_event.svg +0 -14
- data/cockpit/themes/labels/symbols/parallel_branch_normal.svg +0 -5
- data/cockpit/themes/labels/symbols/scripts.svg +0 -4
- data/cockpit/themes/labels/symbols/start.svg +0 -3
- data/cockpit/themes/labels/symbols/stop.svg +0 -5
- data/cockpit/themes/labels/symbols/terminate.svg +0 -4
- data/cockpit/themes/packed/rngs/alternative.rng +0 -1
- data/cockpit/themes/packed/rngs/choose.rng +0 -1
- data/cockpit/themes/packed/rngs/critical.rng +0 -1
- data/cockpit/themes/packed/rngs/escape.rng +0 -1
- data/cockpit/themes/packed/rngs/group.rng +0 -1
- data/cockpit/themes/packed/rngs/loop.rng +0 -1
- data/cockpit/themes/packed/rngs/manipulate.rng +0 -1
- data/cockpit/themes/packed/rngs/otherwise.rng +0 -1
- data/cockpit/themes/packed/rngs/parallel.rng +0 -1
- data/cockpit/themes/packed/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/packed/rngs/stop.rng +0 -1
- data/cockpit/themes/packed/rngs/terminate.rng +0 -1
- data/cockpit/themes/preset/rngs/alternative.rng +0 -1
- data/cockpit/themes/preset/rngs/choose.rng +0 -1
- data/cockpit/themes/preset/rngs/critical.rng +0 -1
- data/cockpit/themes/preset/rngs/escape.rng +0 -1
- data/cockpit/themes/preset/rngs/group.rng +0 -1
- data/cockpit/themes/preset/rngs/loop.rng +0 -1
- data/cockpit/themes/preset/rngs/manipulate.rng +0 -1
- data/cockpit/themes/preset/rngs/otherwise.rng +0 -1
- data/cockpit/themes/preset/rngs/parallel.rng +0 -1
- data/cockpit/themes/preset/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/preset/rngs/stop.rng +0 -1
- data/cockpit/themes/preset/rngs/terminate.rng +0 -1
- data/lib/cpee/empty_workflow.rb +0 -28
- data/lib/cpee/handler_notifications.rb +0 -47
- data/lib/cpee/handler_properties.rb +0 -50
- data/lib/cpee/instantiation.rb +0 -368
- data/lib/cpee/processtransformation/bpel/Repository/booking.bpel +0 -125
- data/lib/cpee/processtransformation/bpel/Repository/booking.wsdl +0 -72
- data/lib/cpee/processtransformation/bpel/Repository/booking/airline.wsdl +0 -71
- data/lib/cpee/processtransformation/bpel/Repository/booking/hotel.wsdl +0 -64
- data/lib/cpee/processtransformation/bpel/Repository/booking/report.wsdl +0 -71
- data/lib/cpee/processtransformation/bpel/bpel2wee.rb +0 -34
- data/lib/cpee/processtransformation/bpel/bpelserver.ru +0 -64
- data/lib/cpee/processtransformation/bpel/bpelserver.xml +0 -70
- data/lib/cpee/processtransformation/bpel/lib/BPEL_Transform.rb +0 -367
- data/lib/cpee/processtransformation/bpmn2.rb +0 -297
- data/lib/cpee/processtransformation/cpee.rb +0 -119
- data/lib/cpee/processtransformation/structures.rb +0 -465
- data/lib/cpee/processtransformation/target.rb +0 -50
- data/log/azure.rb +0 -10
- data/log/azure_logger.rb +0 -136
- data/log/chain.xml +0 -27
- data/log/elasticsearch.rb +0 -15
- data/log/elasticsearch_logging.rb +0 -377
- data/log/legacy/test_es.rb +0 -26
- data/log/legacy/test_split.rb +0 -211
- data/log/log.xml +0 -13
- data/log/non_tamp.rb +0 -156
- data/log/sic.rb +0 -63
- data/log/template.xes_xml +0 -23
- data/log/template.xes_yaml +0 -28
- data/log/trace.yaml +0 -17717
- data/log/trace_sic.yaml +0 -18343
- data/log/xes_xml.rb +0 -121
- data/log/xes_yaml.rb +0 -96
- data/server/handlerwrappers/soap.rb +0 -146
- data/server/resources/notifications/logging/consumer-secret +0 -1
- data/server/resources/notifications/logging/producer-secret +0 -1
- data/server/resources/properties.schema.active +0 -139
- data/server/resources/properties.schema.finished +0 -139
- data/server/resources/properties.schema.inactive +0 -136
- data/server/resources/test1.xml +0 -58
- data/server/resources/test2.xml +0 -60
- data/server/resources/test3.xml +0 -217
- data/test/callback.rb +0 -9
data/log/legacy/test_es.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'faraday'
|
2
|
-
require 'elasticsearch'
|
3
|
-
require 'logger'
|
4
|
-
|
5
|
-
client = Elasticsearch::Client.new hosts: ['localhost:8400']
|
6
|
-
unless client.indices.exists? index: 'trace'
|
7
|
-
client.indices.create index: 'trace', body: {
|
8
|
-
"mappings" => {
|
9
|
-
"entry" => {
|
10
|
-
"properties" => {
|
11
|
-
"concept:name" => {
|
12
|
-
"type" => "integer"
|
13
|
-
},
|
14
|
-
"cpee:name" => {
|
15
|
-
"type" => "text"
|
16
|
-
},
|
17
|
-
"cpee:uuid": {
|
18
|
-
"type" => "text"
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
}
|
24
|
-
end
|
25
|
-
|
26
|
-
client.index index: 'trace', type: 'entry', id: , body: log["log"]["trace"]
|
data/log/legacy/test_split.rb
DELETED
@@ -1,211 +0,0 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
require 'pp'
|
3
|
-
|
4
|
-
#{{{
|
5
|
-
yaml1 = <<-END
|
6
|
-
event:
|
7
|
-
cpee:lifecycle:transition: activity/receiving
|
8
|
-
list:
|
9
|
-
data_receiver:
|
10
|
-
- message:
|
11
|
-
mimetype: application/json
|
12
|
-
content:
|
13
|
-
- ID: ns=2;s=/Channel/ProgramInfo/actBlock
|
14
|
-
meta:
|
15
|
-
StatusCodea: Good
|
16
|
-
- ID: ns=2;s=/Channel/Spindle/driveLoad
|
17
|
-
meta:
|
18
|
-
StatusCodeb: Good
|
19
|
-
- message:
|
20
|
-
mimetype: application/xml
|
21
|
-
content:
|
22
|
-
- ID: ns=2;s=/Channel/ProgramInfo/actBlock
|
23
|
-
meta:
|
24
|
-
StatusCodec: Good
|
25
|
-
- ID: ns=2;s=/Channel/Spindle/driveLoad
|
26
|
-
meta:
|
27
|
-
StatusCoded: Good
|
28
|
-
time:timestamp: '2018-05-03T14:08:14+02:00'
|
29
|
-
END
|
30
|
-
#}}}
|
31
|
-
#{{{
|
32
|
-
yaml2 = <<-END
|
33
|
-
event:
|
34
|
-
trace:id: '160'
|
35
|
-
concept:name: Fetch
|
36
|
-
concept:endpoint: https://centurio.work/data/mt45/queue/48623a67-7b67-4902-b5d4-7243f1d090e2/push
|
37
|
-
id:id: a1
|
38
|
-
lifecycle:transition: unknown
|
39
|
-
cpee:lifecycle:transition: activity/receiving
|
40
|
-
list:
|
41
|
-
data_receiver:
|
42
|
-
- message:
|
43
|
-
mimetype: application/json
|
44
|
-
content:
|
45
|
-
- ID: ns=2;s=/Channel/ProgramInfo/actBlock
|
46
|
-
source: opcua
|
47
|
-
name: Program/actBlock
|
48
|
-
description: Current part program block.
|
49
|
-
path: "/Object/Sinumerik/Channel/ProgramInfo/actBlock"
|
50
|
-
value:
|
51
|
-
timestamp: '2018-05-03 14:16:55.241000'
|
52
|
-
meta:
|
53
|
-
StatusCode: Good
|
54
|
-
ServerTimestamp: '2018-05-03 12:16:55.318853'
|
55
|
-
VariantType: VariantType.String
|
56
|
-
ClientHandle: '212'
|
57
|
-
- ID: ns=2;s=/Channel/Spindle/driveLoad
|
58
|
-
source: opcua
|
59
|
-
name: Spindle/driveLoad
|
60
|
-
description: Load
|
61
|
-
path: "/Object/Sinumerik/Channel/Spindle/driveLoad"
|
62
|
-
value: 0.030517578125
|
63
|
-
timestamp: '2018-05-03 14:16:55.241000'
|
64
|
-
meta:
|
65
|
-
StatusCode: Good
|
66
|
-
ServerTimestamp: '2018-05-03 12:16:55.318853'
|
67
|
-
VariantType: VariantType.Double
|
68
|
-
ClientHandle: '217'
|
69
|
-
- ID: ns=2;s=/Channel/MachineAxis/aaLeadP[u1,3]
|
70
|
-
source: opcua
|
71
|
-
name: Axis/Z/aaLeadP
|
72
|
-
description: ''
|
73
|
-
path: "/Object/Sinumerik/Channel/MachineAxis/aaLeadP[u1,3]"
|
74
|
-
value: 162.51611
|
75
|
-
timestamp: '2018-05-03 14:16:55.241000'
|
76
|
-
meta:
|
77
|
-
StatusCode: Good
|
78
|
-
ServerTimestamp: '2018-05-03 12:16:55.318853'
|
79
|
-
VariantType: VariantType.Double
|
80
|
-
ClientHandle: '222'
|
81
|
-
- ID: ns=2;s=/Channel/MachineAxis/aaTorque[u1,1]
|
82
|
-
source: opcua
|
83
|
-
name: Axis/X/aaTorque
|
84
|
-
description: ''
|
85
|
-
path: "/Object/Sinumerik/Channel/MachineAxis/aaTorque[u1,1]"
|
86
|
-
value: -2.072
|
87
|
-
timestamp: '2018-05-03 14:16:55.241000'
|
88
|
-
meta:
|
89
|
-
StatusCode: Good
|
90
|
-
ServerTimestamp: '2018-05-03 12:16:55.318853'
|
91
|
-
VariantType: VariantType.Double
|
92
|
-
ClientHandle: '223'
|
93
|
-
- ID: ns=2;s=/Channel/MachineAxis/aaTorque[u1,2]
|
94
|
-
source: opcua
|
95
|
-
name: Axis/Y/aaTorque
|
96
|
-
description: ''
|
97
|
-
path: "/Object/Sinumerik/Channel/MachineAxis/aaTorque[u1,2]"
|
98
|
-
value: 0.107
|
99
|
-
timestamp: '2018-05-03 14:16:55.241000'
|
100
|
-
meta:
|
101
|
-
StatusCode: Good
|
102
|
-
ServerTimestamp: '2018-05-03 12:16:55.318853'
|
103
|
-
VariantType: VariantType.Double
|
104
|
-
ClientHandle: '224'
|
105
|
-
time:timestamp: '2018-05-03T14:08:14+02:00'
|
106
|
-
END
|
107
|
-
#}}}
|
108
|
-
|
109
|
-
def traverse(node,paths=[[]],anal=[],depth=0)
|
110
|
-
cpath = paths.last.dup
|
111
|
-
case node
|
112
|
-
when Hash
|
113
|
-
node.each do |k,v|
|
114
|
-
unless cpath.empty?
|
115
|
-
paths.last << [] unless paths.last.last.class == Array
|
116
|
-
paths << cpath.dup
|
117
|
-
end
|
118
|
-
paths.last << k
|
119
|
-
traverse(v,paths,anal,depth+1)
|
120
|
-
end
|
121
|
-
when Array
|
122
|
-
node.each_with_index do |e,i|
|
123
|
-
posanal = [depth,paths.length,nil,[]]
|
124
|
-
anal << posanal
|
125
|
-
|
126
|
-
unless cpath.empty?
|
127
|
-
paths.last << [] unless paths.last.last.class == Array
|
128
|
-
paths << cpath.dup
|
129
|
-
end
|
130
|
-
paths.last << i
|
131
|
-
traverse(e,paths,posanal.last,depth+1)
|
132
|
-
dp = cpath.dup
|
133
|
-
dp << [] unless dp.last.class == Array
|
134
|
-
paths << dp unless paths.include?(dp)
|
135
|
-
|
136
|
-
posanal[2] = paths.length - 1
|
137
|
-
end
|
138
|
-
else
|
139
|
-
paths.last << [] unless paths.last.last.class == Array
|
140
|
-
end
|
141
|
-
end
|
142
|
-
|
143
|
-
def duplicate(doc,paths,anal)
|
144
|
-
res = []
|
145
|
-
deep_cloned = Marshal::load(Marshal.dump(paths))
|
146
|
-
anal.each_with_index do |e,ei|
|
147
|
-
local_cloned = Marshal::load(Marshal.dump(deep_cloned))
|
148
|
-
anal.select{ |a| a == e }.each do |a|
|
149
|
-
(a[1]).upto(a[2]) do |i|
|
150
|
-
local_cloned[i].last << a[0]
|
151
|
-
end
|
152
|
-
end
|
153
|
-
anal.reject{ |a| a == e }.each do |a|
|
154
|
-
(a[1]).upto(a[2]) do |i|
|
155
|
-
local_cloned[i] = nil
|
156
|
-
end
|
157
|
-
end
|
158
|
-
if !e[3]&.empty?
|
159
|
-
e[3..-1].each_with_index do |ee,eei|
|
160
|
-
ret = duplicate(doc,local_cloned,ee)
|
161
|
-
res.concat ret
|
162
|
-
end
|
163
|
-
else
|
164
|
-
res << extract_from_doc(doc,local_cloned.compact)
|
165
|
-
end
|
166
|
-
end
|
167
|
-
res
|
168
|
-
end
|
169
|
-
|
170
|
-
def extract_from_doc(doc,paths)
|
171
|
-
ret = {}
|
172
|
-
paths.each do |p|
|
173
|
-
next if p.nil?
|
174
|
-
a = doc.dig(*p[0..-2])
|
175
|
-
|
176
|
-
py = p.dup
|
177
|
-
p[-1].each_with_index do |px,i|
|
178
|
-
py.delete_at(px-i)
|
179
|
-
end
|
180
|
-
|
181
|
-
x1 = py[-2]
|
182
|
-
x2 = py[0..-3]
|
183
|
-
where = ret
|
184
|
-
if x2.any?
|
185
|
-
where = ret.dig(*x2)
|
186
|
-
end
|
187
|
-
where[x1] = {}
|
188
|
-
|
189
|
-
unless a.class == Hash || a.class == Array
|
190
|
-
where[x1] = a
|
191
|
-
end
|
192
|
-
end
|
193
|
-
ret
|
194
|
-
end
|
195
|
-
|
196
|
-
doc = YAML.load(yaml2)
|
197
|
-
|
198
|
-
paths = [[]]
|
199
|
-
anal = []
|
200
|
-
traverse(doc,paths,anal)
|
201
|
-
anal.uniq!
|
202
|
-
|
203
|
-
paths.each do |p|
|
204
|
-
p p
|
205
|
-
end
|
206
|
-
|
207
|
-
res = duplicate(doc,paths,anal)
|
208
|
-
|
209
|
-
res.each do |r|
|
210
|
-
pp r
|
211
|
-
end
|
data/log/log.xml
DELETED
@@ -1,13 +0,0 @@
|
|
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
|
-
|
6
|
-
<facade>
|
7
|
-
<tile>
|
8
|
-
<layer name="events">
|
9
|
-
<apply-to>/</apply-to>
|
10
|
-
</layer>
|
11
|
-
</tile>
|
12
|
-
</facade>
|
13
|
-
</declaration>
|
data/log/non_tamp.rb
DELETED
@@ -1,156 +0,0 @@
|
|
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/sic.rb
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
require 'yaml'
|
3
|
-
require 'typhoeus'
|
4
|
-
require 'stringio'
|
5
|
-
require 'xml/smart'
|
6
|
-
|
7
|
-
def follow(fname,io,deep=0)
|
8
|
-
if ARGV[1] == 'copy'
|
9
|
-
File.write(File.basename(fname,'.xes.yaml') + '.xes.yaml',io.read)
|
10
|
-
io.rewind
|
11
|
-
end
|
12
|
-
YAML.load_stream(io) do |e|
|
13
|
-
if name = e.dig('log','trace','cpee:name')
|
14
|
-
puts " " * deep + name + " (#{File.basename(fname,'.xes.yaml')}) - #{e.dig('log','trace','concept:name')}"
|
15
|
-
end
|
16
|
-
if e.dig('event','concept:endpoint') == 'https://centurio.work/flow/start/url/' && e.dig('event','cpee:lifecycle:transition') == 'task/instantiation'
|
17
|
-
base = e.dig('event','data','data_receiver')
|
18
|
-
val = base.dig('CPEE-INSTANCE') rescue nil
|
19
|
-
if val.nil?
|
20
|
-
val = File.basename(base)
|
21
|
-
end
|
22
|
-
uuid = base.dig('CPEE-INSTANCE-UUID') rescue nil
|
23
|
-
unless uuid
|
24
|
-
res = Typhoeus.get(File.join('https://centurio.work/flow/engine/',val,'/properties/values/attributes/uuid/'))
|
25
|
-
if res.success?
|
26
|
-
uuid = XML::Smart.string(res.body).find('string(/*)')
|
27
|
-
end
|
28
|
-
end
|
29
|
-
react File.dirname(fname) + "/#{uuid}.xes.yaml",deep + 2
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def react(name,deep=0)
|
35
|
-
if name.nil?
|
36
|
-
help
|
37
|
-
elsif name =~ /^https?:\/\//
|
38
|
-
res = Typhoeus.get(name)
|
39
|
-
if res.success?
|
40
|
-
file = Tempfile.new('sic')
|
41
|
-
file.write(res.body)
|
42
|
-
file.rewind
|
43
|
-
follow name, file, deep
|
44
|
-
file.close
|
45
|
-
file.unlink
|
46
|
-
end
|
47
|
-
elsif File.exists? name
|
48
|
-
follow name, File.open(name), deep
|
49
|
-
else
|
50
|
-
help
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def help
|
55
|
-
puts 'Views or copies log file trees to current directory.'
|
56
|
-
puts
|
57
|
-
puts ' View: sic.rb https://centurio.work/log/865916c6-2b18-4e9d-81d4-0fab0df248f4.xes.yaml'
|
58
|
-
puts ' Copy: sic.rb https://centurio.work/log/865916c6-2b18-4e9d-81d4-0fab0df248f4.xes.yaml copy'
|
59
|
-
puts ' Copy: sic.rb ~/Projects/cpee/log/logs/865916c6-2b18-4e9d-81d4-0fab0df248f4.xes.yaml copy'
|
60
|
-
puts ' View: sic.rb 865916c6-2b18-4e9d-81d4-0fab0df248f4.xes.yaml'
|
61
|
-
end
|
62
|
-
|
63
|
-
react(ARGV[0]) || help
|