Forum Discussion
Yes, we still use the Nashorn engine for JavaScript. It’s deprecated but still present in Java 11.
I can’t speak to how anyone debugs their JS scripts.
- ForbinCSD6 years agoContributor
Thanks for the rapid reply!
I’m hoping that a long-term Snaplogic user might chirp up with some phenomenally useful tricks that let me find problem code in our JS snaps and fix it.
- akidave6 years agoEmployee
For most transformations, the SnapLogic expression language can be used. We support dynamic validations, which enables rapid prototyping and development.
For more complex requirements, a custom Snap can be developed in Java. Full IDE support is possible through debugger support. A custom snap has performance advantages over a Script snap when the document count is large, but the development of the custom snap does require more effort.
For the Script snap, using log statement to debug the script is one approach. Another approach is to develop the script outside of SnapLogic, using the command-line version of the language to test the script and then upload the script into SnapLogic. This works well for Jython, I believe the same approach works for JavaScript.
- ForbinCSD6 years agoContributor
Is there some other kind of logging available in JS besides adding extra “trace” properties to docs in the document stream?