web stats
Run Javascript in Channel Context Outside of Mirth - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 06-15-2019, 04:52 AM
Jeff Drumm Jeff Drumm is offline
Mirth Newb
Join Date: Jun 2019
Posts: 23
Jeff Drumm is on a distinguished road
Default Run (Some) Mirth Javascript from NotePad++

Hi all; short time Mirther, first time poster, LONG time healthcare integration nerd going back to the STC Datagate days. Happy to be here

I've searched this forum and scoured the web with no success ...

Is there any way to execute JavaScript outside of running it in a channel? I've been trying to figure out a Rhino configuration that "sees" the packages Mirth includes so I can write utility functions in an external editor and speed up the code/test process a bit. Being able to do it in Eclipse or even Notepad++ (via NPPExec) would be fantastic. Not that I don't love the syntax highlighting and code completion in the Mirth editor, but the code/save/deploy/submit message/view log(s) process is a bit more ... fiddly than I'd prefer.

I'm not looking to have a real-time debugger active (at least yet), but if that was an option with Eclipse I sure wouldn't kick it out of bed

I've tried setting the classpath various ways and invoking Rhino from the server-lib directory with different combinations of command line options, but it keeps choking on attempts to load the mirth-supplied Java classes with the infamous "uncaught JavaScript runtime exception: TypeError: Cannot call property <method> in object [JavaPackage <package>]. It is not a function, it is "object".

Everything I've read points to this being an issue with Rhino either unable to find the jar file(s) or that I'm running it under the wrong version of Java ... but:

C:\>java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

Thanks in advance for any help you can provide!
Attached Images
File Type: png MurphKinectJavaVer.png (17.3 KB, 69 views)

Last edited by Jeff Drumm; 06-19-2019 at 10:36 AM. Reason: Change to a more accurate title
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 02:01 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation