Is it possible to upgrade script engine to the latest Rhino version in ThingWorx? For example, ThingWorx 9.1.0 comes with Rhino 1.7.11. How does one upgrade to Rhino 1.7.14?
Hello @gagarux ,
As per the given Article and the community post, I assume it is better to avoid this for many reasons. Pls check:
Kindly let me know if you need any further info.
Hi Moonstone. Thanks for your response.
Regarding the post to which you referred the user initially wanted to change Rhino version. However, the change was not necessary in order to solve his particular problem, so he was talked out of doing it. The question still remains, if one really needed to do a Rhino upgrade then how is it done? Is it simply a matter of replacing the Rhino jar with the appropriate version and then restart Apache Tomcat service? I suspect there is more to it than that.
Hello @gagarux ,
Per my knowledge, this is NOT advisable to upgrade Rhino version on your own.
Pls answer the belowmentioned queries:
1. What is the need of Rhino upgrade?
2. Are you facing any issue or security concerns that need Rhino Upgrade?
If yes, then pls let me know and I will open a case on you behalf and this needs to be handled by our CRT team.
What is the reason for such a prohibition? What exactly can break on a Script Engine upgrade?
Hi @gagarux ,
Replacing Rhino is not exactly prohibited, simply because it was never intended that users would replace these part of the platform on their own.
The platform is modular, but not that modular at this level so that you can replace any component.
There are two ways to make this Rhino change, and both of them must be done by PTC:
Both these options would take a bit of time to execute, which is why, if you really need this now, you should be aware that there are some Java Promise libraries, eg: https://jdeferred.org/ which allow you to use Promise patterns in Java. You can then use the ThingWorx Extension SDK (the one for server, in Java). While you loose flexibility by using this SDK (since you need to switch to use some Java code), you can still call ThingWorx services in the .done/fail stuff. Again, here just in case it helps.
I would personally try to optimize the code I'm using so that I no longer need promises...
If you have any further queries, kindly let us know. Else Mark the repsonse as accepted solution for the benefit of others.