Forum Discussion
Hello Venu,
Your screenshot shows the “Min pool size” was reduced from the default value of 3 to 0. Can you return that value back to the default value then try again?
Documentation link for PostgreSQL account:
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438860/PostgreSQL+Account
Many thanks !
It’s now working
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.
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.
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.
I’ve been able to do a little experimentation using Microsoft Visual Studio Code using its built-in JS debugger. And I think one of my colleagues may be close to getting it to work with NCDbg + Nashorn + Java11 (same JVM distro our GroundPlexes use).
But it requires commenting out a LOT of the SnapLogic infrastructure so that what one is debugging is only marginally like the code that gets executed in the Snap.
In particular, it would be helpful to be able to fake a doc stream, and to be able to instantiate a copy of “impl” and debug the execute method. But that requires fake versions of (input,output,error,log).
Can you please ask around within Development about this? I imagine someone there might have built some scaffolding or a test jig where they could run a script externally with some faked inputs.
For that matter, since we’re exclusively on GroundPlexes, and the WAR files are right there, I imagine there might even be a way to import some of that?
Thanks!!
@ForbinCSD aka JohnB
Related Content
- 2 years ago
- 11 months ago
- 2 years ago
- 5 years ago
- 4 years ago