Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
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?
Thanks.
Hello @gagarux ,
As per the given Article and the community post, I assume it is better to avoid this for many reasons. Pls check:
https://www.ptc.com/en/support/article/cs245405
Kindly let me know if you need any further info.
Regards
Bhawna
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.
Thanks.
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.
Regards
Bhawna
Hi Moonstone,
What is the reason for such a prohibition? What exactly can break on a Script Engine upgrade?
I need an upgrade because Rhino 1.7.14 has support for JavaScript Promises which is necessary to enhance the performance of my application. I tried the ThingWorx async service call/event subscription model but unfortunately it is inadequate for my needs.
Thanks,
Gary
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...
Thanks Vlad. Then there are no viable options for me to handle this use, at least none that would have immediate impact. FWIW, I have previously signed on to an idea to upgrade the JavaScript version and enable ES6 features.
Regards.
Hello @gagarux
If you have any further queries, kindly let us know. Else Mark the repsonse as accepted solution for the benefit of others.
Thanks
Bhawna