cpee 1.5.24 → 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 -10
- 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 -38
- 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/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 -176
- 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 -369
- 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
@@ -0,0 +1,26 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<define name="arbitrary" combine="choice">
|
3
|
+
<zeroOrMore>
|
4
|
+
<choice>
|
5
|
+
<text/>
|
6
|
+
<ref name="any"/>
|
7
|
+
</choice>
|
8
|
+
</zeroOrMore>
|
9
|
+
</define>
|
10
|
+
<define name="any" combine="choice">
|
11
|
+
<element>
|
12
|
+
<anyName/>
|
13
|
+
<zeroOrMore>
|
14
|
+
<attribute>
|
15
|
+
<anyName/>
|
16
|
+
</attribute>
|
17
|
+
</zeroOrMore>
|
18
|
+
<zeroOrMore>
|
19
|
+
<choice>
|
20
|
+
<text/>
|
21
|
+
<ref name="any"/>
|
22
|
+
</choice>
|
23
|
+
</zeroOrMore>
|
24
|
+
</element>
|
25
|
+
</define>
|
26
|
+
</grammar>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<include href="simple.rng"/>
|
3
|
+
<define name="attributes">
|
4
|
+
<element name="attributes" ns="http://cpee.org/ns/properties/2.0">
|
5
|
+
<zeroOrMore>
|
6
|
+
<ref name="simple"/>
|
7
|
+
</zeroOrMore>
|
8
|
+
</element>
|
9
|
+
</define>
|
10
|
+
</grammar>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<include href="simple.rng"/>
|
3
|
+
<define name="dataelements">
|
4
|
+
<element name="dataelements" ns="http://cpee.org/ns/properties/2.0">
|
5
|
+
<zeroOrMore>
|
6
|
+
<ref name="simple"/>
|
7
|
+
</zeroOrMore>
|
8
|
+
</element>
|
9
|
+
</define>
|
10
|
+
</grammar>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<include href="arbitrary.rng"/>
|
3
|
+
<define name="description">
|
4
|
+
<element name="description" ns="http://cpee.org/ns/properties/2.0">
|
5
|
+
<ref name="arbitrary"/>
|
6
|
+
</element>
|
7
|
+
</define>
|
8
|
+
</grammar>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<include href="arbitrary.rng"/>
|
3
|
+
<define name="dslx">
|
4
|
+
<element name="dslx" ns="http://cpee.org/ns/properties/2.0">
|
5
|
+
<ref name="arbitrary"/>
|
6
|
+
</element>
|
7
|
+
</define>
|
8
|
+
</grammar>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<include href="simple.rng"/>
|
3
|
+
<define name="endpoints">
|
4
|
+
<element name="endpoints" ns="http://cpee.org/ns/properties/2.0">
|
5
|
+
<zeroOrMore>
|
6
|
+
<ref name="simple"/>
|
7
|
+
</zeroOrMore>
|
8
|
+
</element>
|
9
|
+
</define>
|
10
|
+
</grammar>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<define name="handlerwrapper">
|
3
|
+
<element name="handlerwrapper" ns="http://cpee.org/ns/properties/2.0">
|
4
|
+
<data type="string">
|
5
|
+
<param name="pattern">[A-Z][a-zA-Z]*</param>
|
6
|
+
</data>
|
7
|
+
</element>
|
8
|
+
</define>
|
9
|
+
</grammar>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<define name="position">
|
3
|
+
<element ns="http://cpee.org/ns/properties/2.0">
|
4
|
+
<anyName/>
|
5
|
+
<optional>
|
6
|
+
<attribute name="passthrough">
|
7
|
+
<data type="string"/>
|
8
|
+
</attribute>
|
9
|
+
</optional>
|
10
|
+
<data type="string">
|
11
|
+
<param name="pattern">(at|after)</param>
|
12
|
+
</data>
|
13
|
+
</element>
|
14
|
+
</define>
|
15
|
+
</grammar>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<include href="position.rng"/>
|
3
|
+
<define name="positions">
|
4
|
+
<element name="positions" ns="http://cpee.org/ns/properties/2.0">
|
5
|
+
<zeroOrMore>
|
6
|
+
<ref name="position"/>
|
7
|
+
</zeroOrMore>
|
8
|
+
</element>
|
9
|
+
</define>
|
10
|
+
</grammar>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<include href="state.rng"/>
|
3
|
+
<include href="status.rng"/>
|
4
|
+
<include href="handlerwrapper.rng"/>
|
5
|
+
<include href="positions.rng"/>
|
6
|
+
<include href="dataelements.rng"/>
|
7
|
+
<include href="endpoints.rng"/>
|
8
|
+
<include href="attributes.rng"/>
|
9
|
+
<include href="dsl.rng"/>
|
10
|
+
<include href="dslx.rng"/>
|
11
|
+
<include href="description.rng"/>
|
12
|
+
<include href="transformation.rng"/>
|
13
|
+
|
14
|
+
<start>
|
15
|
+
<element name="properties" ns="http://cpee.org/ns/properties/2.0">
|
16
|
+
<ref name="state"/>
|
17
|
+
<ref name="status"/>
|
18
|
+
<ref name="handlerwrapper"/>
|
19
|
+
<ref name="positions"/>
|
20
|
+
<ref name="dataelements"/>
|
21
|
+
<ref name="endpoints"/>
|
22
|
+
<ref name="attributes"/>
|
23
|
+
<ref name="dsl"/>
|
24
|
+
<ref name="dslx"/>
|
25
|
+
<ref name="description"/>
|
26
|
+
<ref name="transformation"/>
|
27
|
+
</element>
|
28
|
+
</start>
|
29
|
+
</grammar>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<include href="state.rng"/>
|
3
|
+
<include href="status.rng"/>
|
4
|
+
<include href="handlerwrapper.rng"/>
|
5
|
+
<include href="positions.rng"/>
|
6
|
+
<include href="dataelements.rng"/>
|
7
|
+
<include href="endpoints.rng"/>
|
8
|
+
<include href="attributes.rng"/>
|
9
|
+
<include href="description.rng"/>
|
10
|
+
<include href="transformation.rng"/>
|
11
|
+
|
12
|
+
<start>
|
13
|
+
<element name="properties" ns="http://cpee.org/ns/properties/2.0">
|
14
|
+
<ref name="set-state"/>
|
15
|
+
<ref name="status"/>
|
16
|
+
<ref name="handlerwrapper"/>
|
17
|
+
<ref name="positions"/>
|
18
|
+
<ref name="dataelements"/>
|
19
|
+
<ref name="endpoints"/>
|
20
|
+
<ref name="attributes"/>
|
21
|
+
<ref name="description"/>
|
22
|
+
<ref name="transformation"/>
|
23
|
+
</element>
|
24
|
+
</start>
|
25
|
+
</grammar>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<include href="state.rng"/>
|
3
|
+
<include href="status.rng"/>
|
4
|
+
<include href="handlerwrapper.rng"/>
|
5
|
+
<include href="positions.rng"/>
|
6
|
+
<include href="dataelements.rng"/>
|
7
|
+
<include href="endpoints.rng"/>
|
8
|
+
<include href="attributes.rng"/>
|
9
|
+
<include href="description.rng"/>
|
10
|
+
<include href="transformation.rng"/>
|
11
|
+
|
12
|
+
<start>
|
13
|
+
<element name="properties" ns="http://cpee.org/ns/properties/2.0">
|
14
|
+
<interleave>
|
15
|
+
<optional>
|
16
|
+
<ref name="set-state"/>
|
17
|
+
</optional>
|
18
|
+
<optional>
|
19
|
+
<ref name="status"/>
|
20
|
+
</optional>
|
21
|
+
<optional>
|
22
|
+
<ref name="handlerwrapper"/>
|
23
|
+
</optional>
|
24
|
+
<optional>
|
25
|
+
<ref name="positions"/>
|
26
|
+
</optional>
|
27
|
+
<optional>
|
28
|
+
<ref name="dataelements"/>
|
29
|
+
</optional>
|
30
|
+
<optional>
|
31
|
+
<ref name="endpoints"/>
|
32
|
+
</optional>
|
33
|
+
<optional>
|
34
|
+
<ref name="attributes"/>
|
35
|
+
</optional>
|
36
|
+
<optional>
|
37
|
+
<ref name="description"/>
|
38
|
+
</optional>
|
39
|
+
<optional>
|
40
|
+
<ref name="transformation"/>
|
41
|
+
</optional>
|
42
|
+
</interleave>
|
43
|
+
</element>
|
44
|
+
</start>
|
45
|
+
</grammar>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<define name="simple" combine="choice">
|
3
|
+
<element ns="http://cpee.org/ns/properties/2.0">
|
4
|
+
<anyName/>
|
5
|
+
<text/>
|
6
|
+
</element>
|
7
|
+
</define>
|
8
|
+
</grammar>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<define name="state">
|
3
|
+
<element name="state" ns="http://cpee.org/ns/properties/2.0">
|
4
|
+
<attribute name="changed">
|
5
|
+
<data type="dateTime"/>
|
6
|
+
</attribute>
|
7
|
+
<choice>
|
8
|
+
<value>ready</value>
|
9
|
+
<value>running</value>
|
10
|
+
<value>simulating</value>
|
11
|
+
<value>replaying</value>
|
12
|
+
<value>stopping</value>
|
13
|
+
<value>stopped</value>
|
14
|
+
<value>abandoned</value>
|
15
|
+
<value>finished</value>
|
16
|
+
</choice>
|
17
|
+
</element>
|
18
|
+
</define>
|
19
|
+
<define name="set-state">
|
20
|
+
<element name="state" ns="http://cpee.org/ns/properties/2.0">
|
21
|
+
<choice>
|
22
|
+
<value>ready</value>
|
23
|
+
<value>running</value>
|
24
|
+
<value>simulating</value>
|
25
|
+
<value>replaying</value>
|
26
|
+
<value>stopping</value>
|
27
|
+
<value>stopped</value>
|
28
|
+
<value>abandoned</value>
|
29
|
+
<value>finished</value>
|
30
|
+
</choice>
|
31
|
+
</element>
|
32
|
+
</define>
|
33
|
+
</grammar>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<define name="status">
|
3
|
+
<element name="status" ns="http://cpee.org/ns/properties/2.0">
|
4
|
+
<element name="id">
|
5
|
+
<data type="integer"/>
|
6
|
+
</element>
|
7
|
+
<element name="message">
|
8
|
+
<data type="string"/>
|
9
|
+
</element>
|
10
|
+
</element>
|
11
|
+
</define>
|
12
|
+
</grammar>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<define name="transformation">
|
3
|
+
<element name="transformation" ns="http://cpee.org/ns/properties/2.0">
|
4
|
+
<element name="description">
|
5
|
+
<attribute name="type">
|
6
|
+
<choice>
|
7
|
+
<value>copy</value>
|
8
|
+
<value>rest</value>
|
9
|
+
<value>xslt</value>
|
10
|
+
<value>clean</value>
|
11
|
+
<value>none</value>
|
12
|
+
</choice>
|
13
|
+
</attribute>
|
14
|
+
<data type="anyURI"/>
|
15
|
+
</element>
|
16
|
+
<element name="dataelements">
|
17
|
+
<attribute name="type">
|
18
|
+
<choice>
|
19
|
+
<value>rest</value>
|
20
|
+
<value>xslt</value>
|
21
|
+
<value>clean</value>
|
22
|
+
<value>none</value>
|
23
|
+
</choice>
|
24
|
+
</attribute>
|
25
|
+
<data type="anyURI"/>
|
26
|
+
</element>
|
27
|
+
<element name="endpoints">
|
28
|
+
<attribute name="type">
|
29
|
+
<choice>
|
30
|
+
<value>rest</value>
|
31
|
+
<value>xslt</value>
|
32
|
+
<value>clean</value>
|
33
|
+
<value>none</value>
|
34
|
+
</choice>
|
35
|
+
</attribute>
|
36
|
+
<data type="anyURI"/>
|
37
|
+
</element>
|
38
|
+
</element>
|
39
|
+
</define>
|
40
|
+
</grammar>
|
data/server/dev.rb
CHANGED
@@ -28,6 +28,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../lib/cpee/implementation')
|
|
28
28
|
Riddl::Server.new(CPEE::SERVER, :port => 8298) do |opts|
|
29
29
|
accessible_description true
|
30
30
|
cross_site_xhr true
|
31
|
+
opts[:watchdog_start_off] true
|
31
32
|
|
32
33
|
use CPEE::implementation(opts)
|
33
34
|
end.loop!
|
@@ -13,26 +13,35 @@
|
|
13
13
|
# <http://www.gnu.org/licenses/>.
|
14
14
|
|
15
15
|
class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
16
|
+
def self::loop_guard(arguments,id,count) # {{{
|
17
|
+
controller = arguments[0]
|
18
|
+
tsn = Time.now
|
19
|
+
tso = controller.loop_guard[id][:timestamp] rescue Time.now
|
20
|
+
controller.loop_guard[id] = { :count => count, :timestamp => tsn }
|
21
|
+
# if we have more than 100 loop iterations and the last one took less than 2 seconds, we slow the hell down
|
22
|
+
tso + 2 > tsn && count > 100
|
23
|
+
end # }}}
|
24
|
+
|
25
|
+
def self::inform_state_change(arguments,newstate) # {{{
|
26
|
+
controller = arguments[0]
|
27
|
+
controller.notify("state/change", :state => newstate, :timestamp => Time.now.xmlschema(3))
|
28
|
+
end # }}}
|
16
29
|
def self::inform_state_change(arguments,newstate) # {{{
|
17
30
|
controller = arguments[0]
|
18
|
-
controller.
|
19
|
-
controller.notify("state/change", :instance => controller.instance, :instance_uuid => controller.uuid, :state => newstate, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
20
|
-
controller.finalize_if_finished
|
31
|
+
controller.notify("state/change", :state => newstate, :timestamp => Time.now.xmlschema(3))
|
21
32
|
end # }}}
|
22
33
|
def self::inform_syntax_error(arguments,err,code)# {{{
|
23
34
|
controller = arguments[0]
|
24
|
-
controller.notify("description/error", :
|
35
|
+
controller.notify("description/error", :message => err.message)
|
25
36
|
end# }}}
|
26
37
|
def self::inform_handlerwrapper_error(arguments,err) # {{{
|
27
38
|
controller = arguments[0]
|
28
|
-
|
39
|
+
p err.message
|
40
|
+
p err.backtrace
|
41
|
+
controller.notify("handlerwrapper/error", :message => err.message)
|
29
42
|
end # }}}
|
30
43
|
def self::inform_position_change(arguments,ipc={}) # {{{
|
31
44
|
controller = arguments[0]
|
32
|
-
controller.serialize_positions!
|
33
|
-
ipc[:instance] = controller.instance
|
34
|
-
ipc[:instance_uuid] = controller.uuid
|
35
|
-
ipc[:timestamp] = Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z")
|
36
45
|
controller.notify("position/change", ipc)
|
37
46
|
end # }}}
|
38
47
|
|
@@ -65,10 +74,6 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
65
74
|
params
|
66
75
|
end #}}}
|
67
76
|
|
68
|
-
def additional
|
69
|
-
{ :attributes => @controller.attributes_translated } rescue {}
|
70
|
-
end
|
71
|
-
|
72
77
|
def proto_curl(parameters) #{{{
|
73
78
|
params = []
|
74
79
|
callback = Digest::MD5.hexdigest(Kernel::rand().to_s)
|
@@ -91,7 +96,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
91
96
|
end
|
92
97
|
|
93
98
|
params << Riddl::Header.new("CPEE-BASE",@controller.base_url)
|
94
|
-
params << Riddl::Header.new("CPEE-INSTANCE",@controller.
|
99
|
+
params << Riddl::Header.new("CPEE-INSTANCE",@controller.instance_id)
|
95
100
|
params << Riddl::Header.new("CPEE-INSTANCE-URL",@controller.instance_url)
|
96
101
|
params << Riddl::Header.new("CPEE-INSTANCE-UUID",@controller.uuid)
|
97
102
|
params << Riddl::Header.new("CPEE-CALLBACK",@controller.instance_url + '/callbacks/' + callback)
|
@@ -108,7 +113,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
108
113
|
|
109
114
|
client = Riddl::Client.new(tendpoint)
|
110
115
|
|
111
|
-
@controller.
|
116
|
+
@controller.callback(self,callback,:activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position)
|
112
117
|
@handler_passthrough = callback
|
113
118
|
|
114
119
|
status, result, headers = client.request type => params
|
@@ -119,7 +124,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
119
124
|
callback([ Riddl::Parameter::Complex.new('error','application/json',StringIO.new(JSON::generate({ 'status' => status, 'error' => c }))) ], headers)
|
120
125
|
else
|
121
126
|
if headers['CPEE_INSTANTIATION']
|
122
|
-
@controller.notify("task/instantiation", :activity_uuid => @handler_activity_uuid, :
|
127
|
+
@controller.notify("task/instantiation", :activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(headers['CPEE_INSTANTIATION']))
|
123
128
|
end
|
124
129
|
if headers['CPEE_CALLBACK'] && headers['CPEE_CALLBACK'] == 'true' && result.any?
|
125
130
|
headers['CPEE_UPDATE'] = true
|
@@ -138,11 +143,11 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
138
143
|
@sensors = parameters.dig(:stream,:sensors)
|
139
144
|
@aggregators = parameters.dig(:stream,:aggregators)
|
140
145
|
@costs = parameters.dig(:stream,:costs)
|
141
|
-
@controller.notify("activity/calling", :activity_uuid => @handler_activity_uuid, :
|
146
|
+
@controller.notify("activity/calling", :activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
|
142
147
|
if passthrough.to_s.empty?
|
143
148
|
proto_curl parameters
|
144
149
|
else
|
145
|
-
@controller.
|
150
|
+
@controller.callback(self,passthrough,:activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position)
|
146
151
|
@handler_passthrough = passthrough
|
147
152
|
end
|
148
153
|
end # }}}
|
@@ -159,7 +164,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
159
164
|
|
160
165
|
def activity_stop # {{{
|
161
166
|
unless @handler_passthrough.nil?
|
162
|
-
@controller.
|
167
|
+
@controller.cancel_callback(@handler_passthrough)
|
163
168
|
end
|
164
169
|
end # }}}
|
165
170
|
def activity_passthrough_value # {{{
|
@@ -171,36 +176,33 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
171
176
|
end # }}}
|
172
177
|
|
173
178
|
def inform_activity_done # {{{
|
174
|
-
@controller.notify("activity/done", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :
|
179
|
+
@controller.notify("activity/done", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
|
175
180
|
end # }}}
|
176
181
|
def inform_activity_manipulate # {{{
|
177
|
-
@controller.notify("activity/manipulating", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :
|
182
|
+
@controller.notify("activity/manipulating", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
|
178
183
|
end # }}}
|
179
184
|
def inform_activity_failed(err) # {{{
|
180
185
|
puts err.message
|
181
186
|
puts err.backtrace
|
182
|
-
@controller.notify("activity/failed", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :
|
187
|
+
@controller.notify("activity/failed", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
|
183
188
|
end # }}}
|
184
189
|
def inform_manipulate_change(status,changed_dataelements,changed_endpoints,dataelements,endpoints) # {{{
|
185
190
|
unless status.nil?
|
186
|
-
@controller.
|
187
|
-
@controller.notify("status/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :id => status.id, :message => status.message, :attributes => @controller.attributes_translated, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
191
|
+
@controller.notify("status/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :id => status.id, :message => status.message)
|
188
192
|
end
|
189
193
|
unless changed_dataelements.nil?
|
190
|
-
@controller.
|
191
|
-
@controller.notify("dataelements/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :changed => changed_dataelements, :values => dataelements, :attributes => @controller.attributes_translated, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
194
|
+
@controller.notify("dataelements/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_dataelements, :values => dataelements)
|
192
195
|
end
|
193
196
|
unless changed_endpoints.nil?
|
194
|
-
@controller.
|
195
|
-
@controller.notify("endpoints/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints, :attributes => @controller.attributes_translated, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
197
|
+
@controller.notify("endpoints/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints)
|
196
198
|
end
|
197
199
|
end # }}}
|
198
200
|
|
199
201
|
def vote_sync_after # {{{
|
200
|
-
@controller.
|
202
|
+
@controller.vote("activity/syncing_after", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label)
|
201
203
|
end # }}}
|
202
204
|
def vote_sync_before(parameters=nil) # {{{
|
203
|
-
@controller.
|
205
|
+
@controller.vote("activity/syncing_before", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label, :parameters => parameters)
|
204
206
|
end # }}}
|
205
207
|
|
206
208
|
def simplify_result(result)
|
@@ -259,17 +261,17 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
259
261
|
end
|
260
262
|
|
261
263
|
def callback(result=nil,options={})
|
262
|
-
@controller.notify("activity/receiving", :activity_uuid => @handler_activity_uuid, :
|
264
|
+
@controller.notify("activity/receiving", :activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :sensors => @sensors, :aggregators => @aggregators, :costs => @costs)
|
263
265
|
result = simplify_result(result)
|
264
266
|
@handler_returnValue = result
|
265
267
|
@handler_returnOptions = options
|
266
268
|
if options['CPEE_UPDATE']
|
267
269
|
if options['CPEE_UPDATE_STATUS']
|
268
|
-
@controller.notify("activity/status", :activity_uuid => @handler_activity_uuid, :
|
270
|
+
@controller.notify("activity/status", :activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'])
|
269
271
|
end
|
270
272
|
@handler_continue.continue WEEL::Signal::Again
|
271
273
|
else
|
272
|
-
@controller.
|
274
|
+
@controller.cancel_callback(@handler_passthrough)
|
273
275
|
@handler_passthrough = nil
|
274
276
|
if options['CPEE_SALVAGE']
|
275
277
|
@handler_continue.continue WEEL::Signal::Salvage
|
@@ -281,18 +283,18 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
281
283
|
|
282
284
|
def test_condition(mr,code)
|
283
285
|
res = mr.instance_eval(code)
|
284
|
-
@controller.notify("condition/eval", :
|
286
|
+
@controller.notify("condition/eval", :instance_uuid => @controller.uuid, :code => code, :condition => (res ? "true" : "false"))
|
285
287
|
res
|
286
288
|
end
|
287
289
|
|
288
290
|
def simulate(type,nesting,tid,parent,parameters={}) #{{{
|
289
291
|
pp "#{type} - #{nesting} - #{tid} - #{parent} - #{parameters.inspect}"
|
290
292
|
|
291
|
-
@controller.
|
292
|
-
:
|
293
|
-
:
|
294
|
-
:instance_uuid => @controller.uuid,
|
293
|
+
@controller.vote("simulating/step",
|
294
|
+
:activity_uuid => @handler_activity_uuid,
|
295
|
+
:label => @label,
|
295
296
|
:activity => tid,
|
297
|
+
:endpoint => @handler_endpoint,
|
296
298
|
:type => type,
|
297
299
|
:nesting => nesting,
|
298
300
|
:parent => parent,
|