cpee 2.0.25 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/css/ui.css +27 -4
- data/cockpit/css/wfadaptor.css +11 -0
- data/cockpit/edit.html +10 -10
- data/cockpit/graph.html +3 -3
- data/cockpit/index.html +9 -6
- data/cockpit/js/details.js +0 -1
- data/cockpit/js/instance.js +26 -19
- data/cockpit/js/model.js +6 -11
- data/cockpit/js/parameters.js +6 -4
- data/cockpit/js/wfadaptor.js +2 -0
- data/cockpit/model.html +4 -3
- data/cockpit/replay.html +3 -2
- data/cockpit/templates.legacy/Async.xml +12 -12
- data/cockpit/templates.legacy/BCO.xml +9 -11
- data/cockpit/templates.legacy/BCS.xml +9 -11
- data/cockpit/templates.legacy/Centurio.xml +7 -7
- data/cockpit/templates.legacy/Concurrent.xml +7 -7
- data/cockpit/templates.legacy/Coopis Testset.xml +7 -7
- data/cockpit/templates.legacy/Endpoints and Data Manipulation.xml +6 -7
- data/cockpit/templates.legacy/ICSOC Testset.xml +7 -7
- data/cockpit/templates.legacy/Infinity.xml +7 -7
- data/cockpit/templates.legacy/Lego Boxer.xml +13 -13
- data/cockpit/templates.legacy/Lego Conveyor.xml +13 -13
- data/cockpit/templates.legacy/Lego Crane.xml +16 -16
- data/cockpit/templates.legacy/Lego Ejector.xml +16 -16
- data/cockpit/templates.legacy/Lego Full.xml +12 -12
- data/cockpit/templates.legacy/Lego Liddy.xml +13 -13
- data/cockpit/templates.legacy/Lego Plate.xml +13 -13
- data/cockpit/templates.legacy/Lego Transporter.xml +14 -14
- data/cockpit/templates.legacy/Lego_Part_1.xml +12 -12
- data/cockpit/templates.legacy/LgLinear.xml +7 -10
- data/cockpit/templates.legacy/Linear.xml +11 -14
- data/cockpit/templates.legacy/Log.xml +11 -12
- data/cockpit/templates.legacy/Mangler 1.xml +7 -7
- data/cockpit/templates.legacy/Mangler 2.xml +7 -7
- data/cockpit/templates.legacy/Manuel Labels.xml +11 -11
- data/cockpit/templates.legacy/Promise.xml +30 -30
- data/cockpit/templates.legacy/SOPROMO Test Sonification.xml +7 -7
- data/cockpit/templates.legacy/Subprocess.xml +15 -15
- data/cockpit/templates.legacy/Syncing P34 1.xml +8 -11
- data/cockpit/templates.legacy/Syncing P34 2.xml +8 -11
- data/cockpit/templates.legacy/Syncing P34 3.xml +8 -11
- data/cockpit/templates.legacy/Syncing P34.xml +8 -11
- data/cockpit/templates.legacy/TEST - Bad Loop.xml +7 -7
- data/cockpit/templates.legacy/TEST - Wrong Positions.xml +7 -7
- data/cockpit/templates.legacy/Take_5.xml +14 -14
- data/cockpit/templates.legacy/Update.xml +11 -11
- data/cockpit/templates.legacy/Worklist Parallel.xml +17 -17
- data/cockpit/templates.legacy/Worklist Test CPEE.xml +14 -14
- data/cockpit/templates.legacy/Worklist Test.xml +14 -14
- data/cockpit/templates.legacy/Worklist Test2.xml +14 -14
- data/cockpit/templates/Coopis 2010.xml +7 -7
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +9 -12
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +9 -12
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +9 -12
- data/cockpit/templates/Track Test Local.xml +8 -4
- data/cockpit/templates/Track Test.xml +6 -2
- data/cockpit/templates/UR-VUE 2020 Manual Adjust.xml +6 -2
- data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml +9 -5
- data/cockpit/templates/UR-VUE 2020 Solution NN.xml +9 -5
- data/cockpit/templates/UR-VUE 2020 Solution View.xml +9 -5
- data/cockpit/templates/UR-VUE 2020.xml +9 -5
- data/cockpit/templates/Worklist.xml +14 -14
- data/cockpit/templates/instantiate.local/Take_Sub.xml +2 -2
- data/cockpit/templates/instantiate/Take_Perf.xml +1 -1
- data/cockpit/templates/instantiate/Take_Sub.xml +2 -2
- data/cockpit/templates/instantiate/Take_X.xml +2 -2
- data/cockpit/themes/compact/rngs/parallel.rng +6 -0
- data/cockpit/themes/compact/rngs/start.rng +83 -0
- data/cockpit/themes/compact/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/compact/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/compact/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/compact/symbols/start.svg +1 -1
- data/cockpit/themes/compact/theme.js +45 -2
- data/cockpit/themes/control/rngs/parallel.rng +6 -0
- data/cockpit/themes/control/rngs/start.rng +83 -0
- data/cockpit/themes/control/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/control/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/control/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/control/symbols/start.svg +1 -1
- data/cockpit/themes/control/theme.js +45 -2
- data/cockpit/themes/default/rngs/parallel.rng +6 -0
- data/cockpit/themes/default/rngs/start.rng +83 -0
- data/cockpit/themes/default/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/default/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/default/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/default/symbols/start.svg +1 -1
- data/cockpit/themes/default/theme.js +46 -3
- data/cockpit/themes/extended/rngs/parallel.rng +6 -0
- data/cockpit/themes/extended/rngs/start.rng +83 -0
- data/cockpit/themes/extended/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/extended/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/extended/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/extended/symbols/start.svg +1 -1
- data/cockpit/themes/extended/theme.js +45 -2
- data/cockpit/themes/model/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/model/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/model/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/model/symbols/start.svg +1 -1
- data/cockpit/themes/model/theme.js +45 -2
- data/cockpit/themes/packed/rngs/parallel.rng +6 -0
- data/cockpit/themes/packed/rngs/start.rng +83 -0
- data/cockpit/themes/packed/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/packed/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/packed/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/packed/symbols/start.svg +1 -1
- data/cockpit/themes/packed/theme.js +45 -2
- data/cockpit/themes/preset/rngs/parallel.rng +6 -0
- data/cockpit/themes/preset/rngs/start.rng +83 -0
- data/cockpit/themes/preset/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/preset/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/preset/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/preset/symbols/start.svg +1 -1
- data/cockpit/themes/preset/theme.js +46 -3
- data/cockpit/track.html +3 -3
- data/cpee.gemspec +3 -3
- data/lib/cpee/attributes_helper.rb +14 -0
- data/lib/cpee/implementation.rb +10 -8
- data/lib/cpee/implementation_callbacks.rb +28 -7
- data/lib/cpee/implementation_notifications.rb +20 -2
- data/lib/cpee/implementation_properties.rb +128 -24
- data/lib/cpee/persistence.rb +0 -27
- data/lib/cpee/statemachine.rb +14 -0
- data/lib/cpee/value_helper.rb +14 -0
- data/lib/properties.xml +4 -4
- data/lib/properties/{handlerwrapper.rng → executionhandler.rng} +2 -2
- data/lib/properties/properties.rng +2 -2
- data/lib/properties/set-properties.rng +2 -2
- data/lib/properties/set-some-properties.rng +2 -2
- data/server/{resources → executionhandlers/ruby}/backend/README.md +0 -0
- data/server/{resources → executionhandlers/ruby}/backend/instance.template +2 -4
- data/server/{resources → executionhandlers/ruby}/backend/opts.yaml +2 -2
- data/server/executionhandlers/ruby/backend/run +37 -0
- data/server/{handlerwrappers/default.rb → executionhandlers/ruby/connection.rb} +7 -3
- data/server/executionhandlers/ruby/controller.rb +195 -0
- data/server/{resources/transformation_dslx.xsl → executionhandlers/ruby/dsl_to_dslx.xsl} +57 -8
- data/server/executionhandlers/ruby/execution.rb +81 -0
- data/server/resources/properties.empty +1 -1
- data/server/resources/properties.init +1 -1
- data/server/resources/topics.xml +2 -2
- data/server/routing/end.rb +1 -0
- data/server/routing/forward-votes.rb +6 -5
- data/server/routing/persist.rb +4 -4
- data/tools/cpee +9 -3
- data/tools/server/cpee +1 -1
- data/tools/server/resources/properties.init +1 -1
- metadata +35 -239
- data/cockpit/templates.legacy/convert_cpee2.rb +0 -15
- data/lib/cpee/controller.rb +0 -199
- data/lib/cpee/transform.rb +0 -95
- data/server/resources/backend/instance.rb +0 -23
- data/server/resources/backend/run +0 -33
- data/server/routing/end.pid +0 -1
- data/server/routing/forward-events.pid +0 -1
- data/server/routing/forward-votes.pid +0 -1
- data/server/routing/persist.pid +0 -1
- data/server/server.pid +0 -1
- data/tools/test/README +0 -4
- data/tools/test/config.json +0 -3
- data/tools/test/contrib/graph_example.svg +0 -1166
- data/tools/test/contrib/legend.svg +0 -817
- data/tools/test/contrib/symbols.svg +0 -224
- data/tools/test/contrib/transformation1.xsl +0 -264
- data/tools/test/contrib/transformation2.xsl +0 -10
- data/tools/test/contrib/tree_example.svg +0 -788
- data/tools/test/css/model.css +0 -24
- data/tools/test/css/track.css +0 -60
- data/tools/test/css/ui.css +0 -214
- data/tools/test/css/wfadaptor.css +0 -422
- data/tools/test/edit.html +0 -258
- data/tools/test/graph.html +0 -69
- data/tools/test/index.html +0 -258
- data/tools/test/js/details.js +0 -109
- data/tools/test/js/instance.js +0 -1344
- data/tools/test/js/model.js +0 -41
- data/tools/test/js/parameters.js +0 -82
- data/tools/test/js/track.js +0 -18
- data/tools/test/js/ui.js +0 -104
- data/tools/test/js/wfadaptor.js +0 -763
- data/tools/test/js_libs.zip +0 -0
- data/tools/test/js_libs/Makefile +0 -2
- data/tools/test/js_libs/ansi_up.js +0 -333
- data/tools/test/js_libs/console.js +0 -80
- data/tools/test/js_libs/custommenu.css +0 -84
- data/tools/test/js_libs/custommenu.js +0 -104
- data/tools/test/js_libs/experiments1/relaxngui.css +0 -185
- data/tools/test/js_libs/experiments1/relaxngui.js +0 -488
- data/tools/test/js_libs/experiments1/rngtest9.html +0 -60
- data/tools/test/js_libs/experiments1/rngtest9.rng +0 -35
- data/tools/test/js_libs/experiments1/rngtest9.xml +0 -8
- data/tools/test/js_libs/jquery-2.2.4.min.js +0 -4
- data/tools/test/js_libs/jquery-3.2.1.min.js +0 -4
- data/tools/test/js_libs/jquery-3.3.1.min.js +0 -2
- data/tools/test/js_libs/jquery.browser.js +0 -40
- data/tools/test/js_libs/jquery.caret.min.js +0 -10
- data/tools/test/js_libs/jquery.cookie.js +0 -117
- data/tools/test/js_libs/jquery.min.js +0 -1
- data/tools/test/js_libs/jquery.svg.min.js +0 -6
- data/tools/test/js_libs/jquery.svgdom.min.js +0 -6
- data/tools/test/js_libs/markdown.min.js +0 -1
- data/tools/test/js_libs/parsequery.js +0 -21
- data/tools/test/js_libs/printf.js +0 -368
- data/tools/test/js_libs/relaxngui.css +0 -213
- data/tools/test/js_libs/relaxngui.js +0 -543
- data/tools/test/js_libs/strftime.min.js +0 -1
- data/tools/test/js_libs/tests/dataelements.html +0 -59
- data/tools/test/js_libs/tests/dataelements.rng +0 -8
- data/tools/test/js_libs/tests/dataelements.xml +0 -3
- data/tools/test/js_libs/tests/relaxngui.css +0 -203
- data/tools/test/js_libs/tests/relaxngui.js +0 -502
- data/tools/test/js_libs/tests/rngtest1.html +0 -66
- data/tools/test/js_libs/tests/rngtest1.rng +0 -147
- data/tools/test/js_libs/tests/rngtest1.xml +0 -13
- data/tools/test/js_libs/tests/rngtest2.html +0 -60
- data/tools/test/js_libs/tests/rngtest2.rng +0 -6
- data/tools/test/js_libs/tests/rngtest2.xml +0 -3
- data/tools/test/js_libs/tests/rngtest3.html +0 -60
- data/tools/test/js_libs/tests/rngtest3.rng +0 -23
- data/tools/test/js_libs/tests/rngtest3.xml +0 -9
- data/tools/test/js_libs/tests/rngtest4.html +0 -60
- data/tools/test/js_libs/tests/rngtest4.rng +0 -19
- data/tools/test/js_libs/tests/rngtest4.xml +0 -12
- data/tools/test/js_libs/tests/rngtest5.html +0 -60
- data/tools/test/js_libs/tests/rngtest5.rng +0 -75
- data/tools/test/js_libs/tests/rngtest5.xml +0 -40
- data/tools/test/js_libs/tests/rngtest6.html +0 -60
- data/tools/test/js_libs/tests/rngtest6.rng +0 -24
- data/tools/test/js_libs/tests/rngtest6.xml +0 -6
- data/tools/test/js_libs/tests/rngtest8.html +0 -60
- data/tools/test/js_libs/tests/rngtest8.rng +0 -13
- data/tools/test/js_libs/tests/rngtest8.xml +0 -2
- data/tools/test/js_libs/tests/rngtest9.html +0 -60
- data/tools/test/js_libs/tests/rngtest9.rng +0 -31
- data/tools/test/js_libs/tests/rngtest9.xml +0 -8
- data/tools/test/js_libs/ui.css +0 -333
- data/tools/test/js_libs/ui.html +0 -168
- data/tools/test/js_libs/ui.js +0 -177
- data/tools/test/js_libs/underscore.min.js +0 -27
- data/tools/test/js_libs/util.js +0 -81
- data/tools/test/js_libs/vkbeautify.0.99.00.beta.js +0 -358
- data/tools/test/js_libs/vkbeautify.js +0 -1
- data/tools/test/js_libs/webcomponents.min.js +0 -196
- data/tools/test/model.html +0 -192
- data/tools/test/rngs/attributes.rng +0 -8
- data/tools/test/rngs/dataelements.rng +0 -8
- data/tools/test/rngs/endpoints.rng +0 -8
- data/tools/test/templates.legacy/Async.xml +0 -46
- data/tools/test/templates.legacy/BCO.xml +0 -70
- data/tools/test/templates.legacy/BCS.xml +0 -70
- data/tools/test/templates.legacy/Centurio.xml +0 -75
- data/tools/test/templates.legacy/Concurrent.xml +0 -40
- data/tools/test/templates.legacy/Coopis Testset.xml +0 -76
- data/tools/test/templates.legacy/Endpoints and Data Manipulation.xml +0 -30
- data/tools/test/templates.legacy/ICSOC Testset.xml +0 -95
- data/tools/test/templates.legacy/Infinity.xml +0 -28
- data/tools/test/templates.legacy/Lego Boxer.xml +0 -31
- data/tools/test/templates.legacy/Lego Conveyor.xml +0 -31
- data/tools/test/templates.legacy/Lego Crane.xml +0 -87
- data/tools/test/templates.legacy/Lego Ejector.xml +0 -55
- data/tools/test/templates.legacy/Lego Full.xml +0 -142
- data/tools/test/templates.legacy/Lego Liddy.xml +0 -40
- data/tools/test/templates.legacy/Lego Plate.xml +0 -31
- data/tools/test/templates.legacy/Lego Transporter.xml +0 -43
- data/tools/test/templates.legacy/Lego_Part_1.xml +0 -85
- data/tools/test/templates.legacy/LgLinear.xml +0 -65
- data/tools/test/templates.legacy/Linear.xml +0 -77
- data/tools/test/templates.legacy/Log.xml +0 -117
- data/tools/test/templates.legacy/Mangler 1.xml +0 -87
- data/tools/test/templates.legacy/Mangler 2.xml +0 -103
- data/tools/test/templates.legacy/Manuel Labels.xml +0 -55
- data/tools/test/templates.legacy/Promise.xml +0 -275
- data/tools/test/templates.legacy/SOPROMO Test Sonification.xml +0 -83
- data/tools/test/templates.legacy/Subprocess.xml +0 -56
- data/tools/test/templates.legacy/Syncing P34 1.xml +0 -77
- data/tools/test/templates.legacy/Syncing P34 2.xml +0 -77
- data/tools/test/templates.legacy/Syncing P34 3.xml +0 -77
- data/tools/test/templates.legacy/Syncing P34.xml +0 -77
- data/tools/test/templates.legacy/TEST - Bad Loop.xml +0 -173
- data/tools/test/templates.legacy/TEST - Wrong Positions.xml +0 -174
- data/tools/test/templates.legacy/Take_5.xml +0 -48
- data/tools/test/templates.legacy/Update.xml +0 -32
- data/tools/test/templates.legacy/Worklist Parallel.xml +0 -104
- data/tools/test/templates.legacy/Worklist Test CPEE.xml +0 -40
- data/tools/test/templates.legacy/Worklist Test.xml +0 -42
- data/tools/test/templates.legacy/Worklist Test2.xml +0 -43
- data/tools/test/templates.legacy/convert_cpee2.rb +0 -15
- data/tools/test/templates.legacy/convert_preset.rb +0 -32
- data/tools/test/templates.legacy/testsets.xml +0 -37
- data/tools/test/templates.legacy/transformations.xml +0 -4
- data/tools/test/templates/Coopis 2010.xml +0 -76
- data/tools/test/templates/IUPC arXiv:1104.3609 P34 1.xml +0 -77
- data/tools/test/templates/IUPC arXiv:1104.3609 P34 2.xml +0 -77
- data/tools/test/templates/IUPC arXiv:1104.3609 P34 3.xml +0 -77
- data/tools/test/templates/Track Test Local.xml +0 -82
- data/tools/test/templates/Track Test.xml +0 -82
- data/tools/test/templates/UR-VUE 2020 Manual Adjust.xml +0 -182
- data/tools/test/templates/UR-VUE 2020 Solution Baseline.xml +0 -203
- data/tools/test/templates/UR-VUE 2020 Solution NN.xml +0 -197
- data/tools/test/templates/UR-VUE 2020 Solution View.xml +0 -151
- data/tools/test/templates/UR-VUE 2020.xml +0 -26
- data/tools/test/templates/Worklist.xml +0 -42
- data/tools/test/templates/instantiate.local/Take_Sub.xml +0 -59
- data/tools/test/templates/instantiate/Take_Perf.xml +0 -46
- data/tools/test/templates/instantiate/Take_Sub.xml +0 -58
- data/tools/test/templates/instantiate/Take_X.xml +0 -48
- data/tools/test/themes/compact/theme.js +0 -1285
- data/tools/test/themes/diana/theme.js +0 -1650
- data/tools/test/themes/extended/theme.js +0 -1325
- data/tools/test/themes/model/rngs/alternative.rng +0 -1
- data/tools/test/themes/model/rngs/call.rng +0 -67
- data/tools/test/themes/model/rngs/callmanipulate.rng +0 -72
- data/tools/test/themes/model/rngs/choose.rng +0 -1
- data/tools/test/themes/model/rngs/critical.rng +0 -1
- data/tools/test/themes/model/rngs/escape.rng +0 -1
- data/tools/test/themes/model/rngs/group.rng +0 -1
- data/tools/test/themes/model/rngs/loop.rng +0 -1
- data/tools/test/themes/model/rngs/manipulate.rng +0 -1
- data/tools/test/themes/model/rngs/otherwise.rng +0 -1
- data/tools/test/themes/model/rngs/parallel.rng +0 -1
- data/tools/test/themes/model/rngs/parallel_branch.rng +0 -1
- data/tools/test/themes/model/rngs/scripts.rng +0 -7
- data/tools/test/themes/model/rngs/stop.rng +0 -1
- data/tools/test/themes/model/rngs/terminate.rng +0 -1
- data/tools/test/themes/model/theme.js +0 -1268
- data/tools/test/themes/packed/theme.js +0 -1286
- data/tools/test/themes/preset/rngs/alternative.rng +0 -25
- data/tools/test/themes/preset/rngs/call.rng +0 -122
- data/tools/test/themes/preset/rngs/callmanipulate.rng +0 -145
- data/tools/test/themes/preset/rngs/choose.rng +0 -14
- data/tools/test/themes/preset/rngs/closed_loop.rng +0 -62
- data/tools/test/themes/preset/rngs/closed_loop_cancel.rng +0 -5
- data/tools/test/themes/preset/rngs/closed_loop_control.rng +0 -31
- data/tools/test/themes/preset/rngs/closed_loop_measuring.rng +0 -12
- data/tools/test/themes/preset/rngs/critical.rng +0 -5
- data/tools/test/themes/preset/rngs/escape.rng +0 -1
- data/tools/test/themes/preset/rngs/group.rng +0 -3
- data/tools/test/themes/preset/rngs/loop.rng +0 -22
- data/tools/test/themes/preset/rngs/manipulate.rng +0 -9
- data/tools/test/themes/preset/rngs/otherwise.rng +0 -22
- data/tools/test/themes/preset/rngs/parallel.rng +0 -21
- data/tools/test/themes/preset/rngs/parallel_branch.rng +0 -8
- data/tools/test/themes/preset/rngs/scripts.rng +0 -23
- data/tools/test/themes/preset/rngs/stop.rng +0 -5
- data/tools/test/themes/preset/rngs/terminate.rng +0 -1
- data/tools/test/themes/preset/symbols/alternative.svg +0 -5
- data/tools/test/themes/preset/symbols/arrow.svg +0 -3
- data/tools/test/themes/preset/symbols/call.svg +0 -6
- data/tools/test/themes/preset/symbols/callmanipulate.svg +0 -8
- data/tools/test/themes/preset/symbols/choose.svg +0 -5
- data/tools/test/themes/preset/symbols/choose_exclusive.svg +0 -5
- data/tools/test/themes/preset/symbols/choose_inclusive.svg +0 -4
- data/tools/test/themes/preset/symbols/closed_loop.svg +0 -5
- data/tools/test/themes/preset/symbols/closed_loop_cancel.svg +0 -5
- data/tools/test/themes/preset/symbols/closed_loop_control.svg +0 -5
- data/tools/test/themes/preset/symbols/closed_loop_measuring.svg +0 -6
- data/tools/test/themes/preset/symbols/complex.svg +0 -8
- data/tools/test/themes/preset/symbols/critical.svg +0 -4
- data/tools/test/themes/preset/symbols/end.svg +0 -3
- data/tools/test/themes/preset/symbols/escape.svg +0 -5
- data/tools/test/themes/preset/symbols/event_end.svg +0 -3
- data/tools/test/themes/preset/symbols/loop.svg +0 -5
- data/tools/test/themes/preset/symbols/manipulate.svg +0 -4
- data/tools/test/themes/preset/symbols/otherwise.svg +0 -5
- data/tools/test/themes/preset/symbols/parallel.svg +0 -5
- data/tools/test/themes/preset/symbols/parallel_branch.svg +0 -5
- data/tools/test/themes/preset/symbols/parallel_branch_compact.svg +0 -4
- data/tools/test/themes/preset/symbols/parallel_branch_event.svg +0 -14
- data/tools/test/themes/preset/symbols/parallel_branch_normal.svg +0 -5
- data/tools/test/themes/preset/symbols/scripts.svg +0 -4
- data/tools/test/themes/preset/symbols/start.svg +0 -3
- data/tools/test/themes/preset/symbols/stop.svg +0 -5
- data/tools/test/themes/preset/symbols/terminate.svg +0 -4
- data/tools/test/themes/preset/theme.js +0 -1287
- data/tools/test/track.html +0 -142
@@ -12,7 +12,7 @@
|
|
12
12
|
# CPEE (file COPYING in the main directory). If not, see
|
13
13
|
# <http://www.gnu.org/licenses/>.
|
14
14
|
|
15
|
-
class
|
15
|
+
class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
16
16
|
def self::loop_guard(arguments,id,count) # {{{
|
17
17
|
controller = arguments[0]
|
18
18
|
tsn = Time.now
|
@@ -30,11 +30,11 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
30
30
|
controller = arguments[0]
|
31
31
|
controller.notify("description/error", :message => err.message)
|
32
32
|
end# }}}
|
33
|
-
def self::
|
33
|
+
def self::inform_connectionwrapper_error(arguments,err) # {{{
|
34
34
|
controller = arguments[0]
|
35
35
|
p err.message
|
36
36
|
p err.backtrace
|
37
|
-
controller.notify("
|
37
|
+
controller.notify("executionhandler/error", :message => err.message)
|
38
38
|
end # }}}
|
39
39
|
def self::inform_position_change(arguments,ipc={}) # {{{
|
40
40
|
controller = arguments[0]
|
@@ -72,6 +72,10 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
72
72
|
params
|
73
73
|
end #}}}
|
74
74
|
|
75
|
+
def additional #{{{
|
76
|
+
{ :attributes => @controller.attributes }
|
77
|
+
end #}}}
|
78
|
+
|
75
79
|
def proto_curl(parameters) #{{{
|
76
80
|
params = []
|
77
81
|
callback = Digest::MD5.hexdigest(Kernel::rand().to_s)
|
@@ -0,0 +1,195 @@
|
|
1
|
+
# This file is part of CPEE.
|
2
|
+
#
|
3
|
+
# CPEE is free software: you can redistribute it and/or modify it under the terms
|
4
|
+
# of the GNU General Public License as published by the Free Software Foundation,
|
5
|
+
# either version 3 of the License, or (at your option) any later version.
|
6
|
+
#
|
7
|
+
# CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
8
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
9
|
+
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
10
|
+
#
|
11
|
+
# You should have received a copy of the GNU General Public License along with
|
12
|
+
# CPEE (file COPYING in the main directory). If not, see
|
13
|
+
# <http://www.gnu.org/licenses/>.
|
14
|
+
|
15
|
+
require 'weel'
|
16
|
+
require 'json'
|
17
|
+
require 'redis'
|
18
|
+
require 'securerandom'
|
19
|
+
require 'riddl/client'
|
20
|
+
require 'cpee/value_helper'
|
21
|
+
require 'cpee/attributes_helper'
|
22
|
+
require 'cpee/message'
|
23
|
+
require 'cpee/redis'
|
24
|
+
|
25
|
+
require 'ostruct'
|
26
|
+
class ParaStruct < OpenStruct
|
27
|
+
def to_json(*a)
|
28
|
+
table.to_json
|
29
|
+
end
|
30
|
+
end
|
31
|
+
def →(a); ParaStruct.new(a); end
|
32
|
+
def ⭐(a); ParaStruct.new(a); end
|
33
|
+
|
34
|
+
class Controller
|
35
|
+
def initialize(id,dir,opts)
|
36
|
+
CPEE::redis_connect(opts)
|
37
|
+
|
38
|
+
@redis = opts[:redis]
|
39
|
+
@votes = []
|
40
|
+
|
41
|
+
@id = id
|
42
|
+
|
43
|
+
@attributes = {}
|
44
|
+
@redis.keys("instance:#{id}/attributes/*").each do |key|
|
45
|
+
@attributes[File.basename(key)] = @redis.get(key)
|
46
|
+
end
|
47
|
+
|
48
|
+
@attributes_helper = AttributesHelper.new
|
49
|
+
@thread = nil
|
50
|
+
@opts = opts
|
51
|
+
@instance = nil
|
52
|
+
@loop_guard = {}
|
53
|
+
|
54
|
+
@callback_keys = {}
|
55
|
+
@psredis = @opts[:redis_dyn].call
|
56
|
+
|
57
|
+
Thread.new do
|
58
|
+
@psredis.psubscribe('callback-response:*','callback-end:*') do |on|
|
59
|
+
on.pmessage do |pat, what, message|
|
60
|
+
if pat == 'callback-response:*' && @callback_keys.has_key?(what[18..-1])
|
61
|
+
index = message.index(' ')
|
62
|
+
mess = message[index+1..-1]
|
63
|
+
instance = message[0...index]
|
64
|
+
m = JSON.parse(mess)
|
65
|
+
resp = []
|
66
|
+
m['content']['values'].each do |e|
|
67
|
+
if e[1][0] == 'simple'
|
68
|
+
resp << Riddl::Parameter::Simple.new(e[0],e[1][1])
|
69
|
+
elsif e[1][0] == 'complex'
|
70
|
+
resp << Riddl::Parameter::Complex.new(e[0],e[1][1],File.open(e[1][2]))
|
71
|
+
end
|
72
|
+
end
|
73
|
+
@callback_keys[what[18..-1]].send(:callback,resp,m['content']['headers'])
|
74
|
+
end
|
75
|
+
if pat == 'callback-end:*'
|
76
|
+
@callback_keys.delete(what[13..-1])
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
attr_reader :id
|
84
|
+
attr_reader :attributes
|
85
|
+
attr_reader :loop_guard
|
86
|
+
|
87
|
+
def uuid
|
88
|
+
@attributes['uuid']
|
89
|
+
end
|
90
|
+
|
91
|
+
def attributes_translated
|
92
|
+
@attributes_helper.translate(attributes,dataelements,endpoints)
|
93
|
+
end
|
94
|
+
|
95
|
+
def host
|
96
|
+
@opts[:host]
|
97
|
+
end
|
98
|
+
def base_url
|
99
|
+
@opts[:url]
|
100
|
+
end
|
101
|
+
def instance_url
|
102
|
+
File.join(@opts[:url].to_s,@id.to_s)
|
103
|
+
end
|
104
|
+
def instance_id
|
105
|
+
@id
|
106
|
+
end
|
107
|
+
def base
|
108
|
+
base_url
|
109
|
+
end
|
110
|
+
def instance=(inst)
|
111
|
+
@instance = inst
|
112
|
+
end
|
113
|
+
def endpoints
|
114
|
+
@instance.endpoints
|
115
|
+
end
|
116
|
+
def dataelements
|
117
|
+
@instance.data
|
118
|
+
end
|
119
|
+
|
120
|
+
def start
|
121
|
+
if vote("state/change", :state => 'running')
|
122
|
+
@thread = @instance.start
|
123
|
+
@thread.join
|
124
|
+
else
|
125
|
+
@thread = @instance.stop
|
126
|
+
@thread.join
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
def stop
|
131
|
+
### tell the instance to stop
|
132
|
+
@instance.stop
|
133
|
+
### end all votes or it will not work
|
134
|
+
Thread.new do # doing stuff in trap context is a nono. but in a thread its fine :-)
|
135
|
+
@votes.each do |key|
|
136
|
+
CPEE::Message::send(:'vote-response',key,base,@id,uuid,info,true,@redis)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
@thread.join if !@thread.nil? && @thread.alive?
|
140
|
+
end
|
141
|
+
|
142
|
+
def info
|
143
|
+
@attributes['info']
|
144
|
+
end
|
145
|
+
|
146
|
+
def notify(what,content={})
|
147
|
+
content[:attributes] = attributes_translated
|
148
|
+
CPEE::Message::send(:event,what,base,@id,uuid,info,content,@redis)
|
149
|
+
end
|
150
|
+
|
151
|
+
def vote(what,content={})
|
152
|
+
topic, name = what.split('/')
|
153
|
+
handler = File.join(topic,'vote',name)
|
154
|
+
votes = []
|
155
|
+
@redis.smembers("instance:#{id}/handlers/#{handler}").each do |client|
|
156
|
+
voteid = Digest::MD5.hexdigest(Kernel::rand().to_s)
|
157
|
+
content[:key] = voteid
|
158
|
+
content[:attributes] = attributes_translated
|
159
|
+
content[:subscription] = client
|
160
|
+
votes << voteid
|
161
|
+
CPEE::Message::send(:vote,what,base,@id,uuid,info,content,@redis)
|
162
|
+
end
|
163
|
+
|
164
|
+
if votes.length > 0
|
165
|
+
@votes += votes
|
166
|
+
psredis = @opts[:redis_dyn].call
|
167
|
+
collect = []
|
168
|
+
psredis.subscribe(votes.map{|e| ['vote-response:' + e.to_s] }.flatten) do |on|
|
169
|
+
on.message do |what, message|
|
170
|
+
index = message.index(' ')
|
171
|
+
mess = message[index+1..-1]
|
172
|
+
m = JSON.parse(mess)
|
173
|
+
collect << ((m['content'] == true || m['content'] == 'true') || false)
|
174
|
+
@votes.delete m['name']
|
175
|
+
cancel_callback m['name']
|
176
|
+
if collect.length >= votes.length
|
177
|
+
psredis.unsubscribe
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
!collect.include?(false)
|
182
|
+
else
|
183
|
+
true
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
def callback(hw,key,content)
|
188
|
+
CPEE::Message::send(:callback,'activity/content',base,@id,uuid,info,content.merge(:key => key),@redis)
|
189
|
+
@callback_keys[key] = hw
|
190
|
+
end
|
191
|
+
|
192
|
+
def cancel_callback(key)
|
193
|
+
CPEE::Message::send(:'callback-end',key,base,@id,uuid,info,{},@redis)
|
194
|
+
end
|
195
|
+
end
|
@@ -4,24 +4,27 @@
|
|
4
4
|
<xsl:strip-space elements="*"/>
|
5
5
|
<xsl:variable name="myspacemultiplier">2</xsl:variable>
|
6
6
|
<xsl:template match="/">
|
7
|
+
<xsl:text>control flow do</xsl:text>
|
8
|
+
<xsl:call-template name="print-newline"/>
|
7
9
|
<xsl:apply-templates select="//d:description"/>
|
10
|
+
<xsl:text>end</xsl:text>
|
8
11
|
</xsl:template>
|
9
12
|
<xsl:template match="//d:description">
|
10
13
|
<xsl:apply-templates>
|
11
14
|
<xsl:with-param name="myspace">
|
12
|
-
<xsl:value-of select="
|
15
|
+
<xsl:value-of select="0*$myspacemultiplier"/>
|
13
16
|
</xsl:with-param>
|
14
17
|
</xsl:apply-templates>
|
15
18
|
</xsl:template>
|
16
19
|
<xsl:template match="*">
|
17
20
|
<xsl:param name="myspace"/>
|
18
|
-
<xsl:call-template name="print-space">
|
19
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
20
|
-
<xsl:with-param name="count">
|
21
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
22
|
-
</xsl:with-param>
|
23
|
-
</xsl:call-template>
|
24
21
|
<xsl:if test="name()='call' or name()='manipulate'">
|
22
|
+
<xsl:call-template name="print-space">
|
23
|
+
<xsl:with-param name="i">1</xsl:with-param>
|
24
|
+
<xsl:with-param name="count">
|
25
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
26
|
+
</xsl:with-param>
|
27
|
+
</xsl:call-template>
|
25
28
|
<xsl:value-of select="name()"/>
|
26
29
|
<xsl:text> :</xsl:text>
|
27
30
|
<xsl:value-of select="@id"/>
|
@@ -94,26 +97,54 @@
|
|
94
97
|
<xsl:value-of select="$myspace"/>
|
95
98
|
</xsl:with-param>
|
96
99
|
</xsl:call-template>
|
97
|
-
<xsl:call-template name="print-newline"
|
100
|
+
<xsl:call-template name="print-newline"></xsl:call-template>
|
98
101
|
</xsl:if>
|
99
102
|
<xsl:if test="name()='terminate'">
|
103
|
+
<xsl:call-template name="print-space">
|
104
|
+
<xsl:with-param name="i">1</xsl:with-param>
|
105
|
+
<xsl:with-param name="count">
|
106
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
107
|
+
</xsl:with-param>
|
108
|
+
</xsl:call-template>
|
100
109
|
<xsl:text>terminate</xsl:text>
|
101
110
|
<xsl:call-template name="print-newline"/>
|
102
111
|
</xsl:if>
|
103
112
|
<xsl:if test="name()='stop'">
|
113
|
+
<xsl:call-template name="print-space">
|
114
|
+
<xsl:with-param name="i">1</xsl:with-param>
|
115
|
+
<xsl:with-param name="count">
|
116
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
117
|
+
</xsl:with-param>
|
118
|
+
</xsl:call-template>
|
104
119
|
<xsl:text>stop :</xsl:text>
|
105
120
|
<xsl:value-of select="@id"/>
|
106
121
|
<xsl:call-template name="print-newline"/>
|
107
122
|
</xsl:if>
|
108
123
|
<xsl:if test="name()='escape'">
|
124
|
+
<xsl:call-template name="print-space">
|
125
|
+
<xsl:with-param name="i">1</xsl:with-param>
|
126
|
+
<xsl:with-param name="count">
|
127
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
128
|
+
</xsl:with-param>
|
129
|
+
</xsl:call-template>
|
109
130
|
<xsl:text>escape</xsl:text>
|
110
131
|
<xsl:call-template name="print-newline"/>
|
111
132
|
</xsl:if>
|
112
133
|
<xsl:if test="name()='parallel'">
|
134
|
+
<xsl:call-template name="print-space">
|
135
|
+
<xsl:with-param name="i">1</xsl:with-param>
|
136
|
+
<xsl:with-param name="count">
|
137
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
138
|
+
</xsl:with-param>
|
139
|
+
</xsl:call-template>
|
113
140
|
<xsl:text>parallel</xsl:text>
|
114
141
|
<xsl:if test="@wait">
|
115
142
|
<xsl:text> :wait => </xsl:text>
|
116
143
|
<xsl:value-of select="@wait"/>
|
144
|
+
<xsl:if test="@cancel">
|
145
|
+
<xsl:text>, :cancel => :</xsl:text>
|
146
|
+
<xsl:value-of select="@cancel"/>
|
147
|
+
</xsl:if>
|
117
148
|
</xsl:if>
|
118
149
|
<xsl:text> do</xsl:text>
|
119
150
|
<xsl:call-template name="print-newline"/>
|
@@ -132,6 +163,12 @@
|
|
132
163
|
<xsl:call-template name="print-newline"/>
|
133
164
|
</xsl:if>
|
134
165
|
<xsl:if test="name()='loop'">
|
166
|
+
<xsl:call-template name="print-space">
|
167
|
+
<xsl:with-param name="i">1</xsl:with-param>
|
168
|
+
<xsl:with-param name="count">
|
169
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
170
|
+
</xsl:with-param>
|
171
|
+
</xsl:call-template>
|
135
172
|
<xsl:text>loop </xsl:text>
|
136
173
|
<xsl:if test="@mode='pre_test'">
|
137
174
|
<xsl:choose>
|
@@ -185,6 +222,12 @@
|
|
185
222
|
<xsl:call-template name="print-newline"/>
|
186
223
|
</xsl:if>
|
187
224
|
<xsl:if test="name()='choose'">
|
225
|
+
<xsl:call-template name="print-space">
|
226
|
+
<xsl:with-param name="i">1</xsl:with-param>
|
227
|
+
<xsl:with-param name="count">
|
228
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
229
|
+
</xsl:with-param>
|
230
|
+
</xsl:call-template>
|
188
231
|
<xsl:text>choose </xsl:text>
|
189
232
|
<xsl:choose>
|
190
233
|
<xsl:when test="@mode='exclusive'">
|
@@ -219,6 +262,12 @@
|
|
219
262
|
<xsl:call-template name="print-newline"/>
|
220
263
|
</xsl:if>
|
221
264
|
<xsl:if test="name()='critical'">
|
265
|
+
<xsl:call-template name="print-space">
|
266
|
+
<xsl:with-param name="i">1</xsl:with-param>
|
267
|
+
<xsl:with-param name="count">
|
268
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
269
|
+
</xsl:with-param>
|
270
|
+
</xsl:call-template>
|
222
271
|
<xsl:text>critical :</xsl:text>
|
223
272
|
<xsl:value-of select="@sid"/>
|
224
273
|
<xsl:text> do</xsl:text>
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# This file is part of CPEE.
|
2
|
+
#
|
3
|
+
# CPEE is free software: you can redistribute it and/or modify it under the terms
|
4
|
+
# of the GNU General Public License as published by the Free Software Foundation,
|
5
|
+
# either version 3 of the License, or (at your option) any later version.
|
6
|
+
#
|
7
|
+
# CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
8
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
9
|
+
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
10
|
+
#
|
11
|
+
# You should have received a copy of the GNU General Public License along with
|
12
|
+
# CPEE (file COPYING in the main directory). If not, see
|
13
|
+
# <http://www.gnu.org/licenses/>.
|
14
|
+
|
15
|
+
module CPEE
|
16
|
+
|
17
|
+
module ExecutionHandler
|
18
|
+
|
19
|
+
module Ruby
|
20
|
+
BACKEND_INSTANCE = 'instance.rb'
|
21
|
+
BACKEND_OPTS = 'opts.yaml'
|
22
|
+
DSL_TO_DSLX_XSL = File.expand_path(File.join(__dir__,'dsl_to_dslx.xsl'))
|
23
|
+
BACKEND_RUN = File.expand_path(File.join(__dir__,'backend','run'))
|
24
|
+
BACKEND_TEMPLATE = File.expand_path(File.join(__dir__,'backend','instance.template'))
|
25
|
+
|
26
|
+
def self::dslx_to_dsl(dslx) # transpile
|
27
|
+
trans = XML::Smart::open_unprotected(ExecutionHandler::Ruby::DSL_TO_DSLX_XSL)
|
28
|
+
dslx.transform_with(trans).to_s
|
29
|
+
end
|
30
|
+
|
31
|
+
def self::prepare(id,opts) # write result to disk
|
32
|
+
Dir.mkdir(File.join(opts[:instances],id.to_s)) rescue nil
|
33
|
+
FileUtils.copy(ExecutionHandler::Ruby::BACKEND_RUN,File.join(opts[:instances],id.to_s))
|
34
|
+
dsl = CPEE::Persistence::extract_item(id,opts,'dsl')
|
35
|
+
hw = CPEE::Persistence::extract_item(id,opts,'executionhandler')
|
36
|
+
endpoints = CPEE::Persistence::extract_list(id,opts,'endpoints')
|
37
|
+
dataelements = CPEE::Persistence::extract_list(id,opts,'dataelements')
|
38
|
+
positions = CPEE::Persistence::extract_set(id,opts,'positions')
|
39
|
+
positions.map! do |k, v|
|
40
|
+
[ k, v, CPEE::Persistence::extract_item(id,opts,File.join('positions',k,'@passthrough')) ]
|
41
|
+
end
|
42
|
+
File.open(File.join(opts[:instances],id.to_s,ExecutionHandler::Ruby::BACKEND_OPTS),'w') do |f|
|
43
|
+
YAML::dump({
|
44
|
+
:host => opts[:host],
|
45
|
+
:url => opts[:url],
|
46
|
+
:redis_url => opts[:redis_url],
|
47
|
+
:redis_path => File.join(opts[:basepath],opts[:redis_path]),
|
48
|
+
:redis_db => opts[:redis_db],
|
49
|
+
:global_executionhandlers => opts[:global_executionhandlers],
|
50
|
+
:executionhandlers => opts[:executionhandlers],
|
51
|
+
:executionhandler => hw
|
52
|
+
},f)
|
53
|
+
end
|
54
|
+
template = ERB.new(File.read(ExecutionHandler::Ruby::BACKEND_TEMPLATE), trim_mode: '-')
|
55
|
+
res = template.result_with_hash(dsl: dsl, dataelements: dataelements, endpoints: endpoints, positions: positions)
|
56
|
+
File.write(File.join(opts[:instances],id.to_s,ExecutionHandler::Ruby::BACKEND_INSTANCE),res)
|
57
|
+
end
|
58
|
+
|
59
|
+
def self::run(id,opts)
|
60
|
+
exe = File.join(opts[:instances],id.to_s,File.basename(ExecutionHandler::Ruby::BACKEND_RUN))
|
61
|
+
pid = Kernel.spawn(exe , :pgroup => true, :in => '/dev/null', :out => exe + '.out', :err => exe + '.err')
|
62
|
+
Process.detach pid
|
63
|
+
File.write(exe + '.pid',pid)
|
64
|
+
end
|
65
|
+
|
66
|
+
def self::stop(id,opts) ### return: bool to tell if manually changing redis is necessary
|
67
|
+
exe = File.join(opts[:instances],id.to_s,File.basename(ExecutionHandler::Ruby::BACKEND_RUN))
|
68
|
+
pid = File.read(exe + '.pid') rescue nil
|
69
|
+
if pid && (Process.kill(0, pid.to_i) rescue false)
|
70
|
+
Process.kill('HUP', pid.to_i) rescue nil
|
71
|
+
false
|
72
|
+
else # its not running, so clean up
|
73
|
+
File.unlink(exe + '.pid') rescue nil
|
74
|
+
true
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|