asterics / WebACS

HTML5/JS version of the AsTeRICS Configuration Suite
Apache License 2.0
3 stars 2 forks source link

WebACS generates invalid model #32

Closed klues closed 5 years ago

klues commented 5 years ago

While testing for https://github.com/asterics/AsTeRICS/issues/269 I noticed that WebACS sometimes seems to generate an invalid model.

My testing model consists of instances of AutostartEvent and and ApplicationLauncher. The property "execution mode" is set to OPEN_URL.

Problem

Building the same model and saving (or uploading it to ARE) results in the ApplicationLauncher instance to have the following property:

ACS: <property name="executionMode" value="OPEN_URL" />

WebACS <property name="executionMode" value="1" />

The WebACS model causes an IllegalArgumentException in ARE: https://github.com/asterics/AsTeRICS/blob/master/ARE/components/actuator.applicationlauncher/src/main/java/eu/asterics/component/actuator/applicationlauncher/ApplicationLauncherInstance.java#L311

Expected Behavior

The model generated by WebACS should correclty generate the model an contain: <property name="executionMode" value="OPEN_URL" />

Testmodels generated by ACS and WebACS testmodels.zip

kingcole commented 5 years ago

without having taken the time to look at this in detail, I suspect that this not a WebACS bug, but a bug of the ApplicationLauncher plugin, analogue to https://github.com/asterics/AsTeRICS/issues/260

klues commented 5 years ago

To my mind it was an WebACS Bug, like https://github.com/asterics/AsTeRICS/issues/260 also was.

WebACS does not correctly handle combobox-values of type STRING and returns a number (index) instead of the selected string. This differs from the behaviour of the old ACS and causes model deployments to fail.

Please see PR https://github.com/asterics/WebACS/pull/33 for my suggestion to fix this. @deinhofer please also take a look.

kingcole commented 5 years ago

well, that's a matter of interpretation - I believe that there never supposed to be STRING values in comboboxes - but never mind - thanks for fixing

klues commented 5 years ago

yeah, of course it would be possible to represent all combobox values just as integer values. However (for whatever reason) ARE and the old ACS use the selected string value instead of an index and therefore I think WebACS should do it in the same way.

sabicalija commented 5 years ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on GitHub release

sabicalija commented 5 years ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on GitHub release

sabicalija commented 5 years ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on GitHub release

sabicalija commented 5 years ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on GitHub release