As usual, each upcoming release will bring a few improvements, fixes and changes for scripting, reporting and generally customization. With this article I would like to teaser a bit what’s coming.
Rhino JavaScript Engine
Update
We at last
managed to upgrade to a new platform version, including JDK 17 and with that a
newer version of our beloved Rhino engine. We were stuck for years on version 1.7.5
from last decade (2015). Now we moved to version 1.7.10 – still not the latest
but we are at least moving. That upgrade comes with a price: some features are
not working as before for example Array.concat() got broken for some reasons. I
suggest checking your scripts with the beta version and use a polyfill in case
you are affected. In addition, the pragma ENHANCED_JAVA_ACCESS is not supported
anymore by the engine. We had to workaround it and all test cases for script
libraries we posted so far seems to work but downloading the latest versions
may be required.
Script File Handling
The file
handling changed completely with the introduction of the medini collaboration
server in 2023 R2.1. There is a good read in the forum from Nils. That change basically implied that many well-known
features got lost, as they all were working on files and not on documents. Now with
2024 R2 we try to bring back some of the beloved features. You again should be
able to move script documents around, or even manipulate on file system and
then synchronize them with the model browser. Also, the possibility to create a
symbolic link in the navigator to a script location outside the project and
then sync should work.
API Changes
There are
as usually changes to the scripting API but not too many. You can create a
Stopwatch object at any time using Google’s Guava Stopwatch for example to
measure execution time in scripts. The modification of internal object
identifiers as medini identifier is forbidden for all scripts from now on.
M2Doc Reporting
Two changes are noteworthy for m2doc report
designers. With 2024 R2 it finally should be possible to access FMEA and FMEDA
metrics with parameters. In addition the general purpose eval() service is now
(1) applicable to any type of object, so also non EMF/Medini object and (2) accepts
up to 5 parameters which can be used in the evaluation script. With that is
should be possible to at least script anything that is missing for the report.
Final and more information will be available in the final documentation.
Happy Scripting
Jan