Announcement

Collapse
No announcement yet.

Javascript/E4X interactive shell

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Javascript/E4X interactive shell

    If you're new to Javascript and E4X it may be useful to you to have an interactive Javascript shell to test your Mirth Javascript scripts:

    Using Firefox 1.5 you can start a shell from http://www.squarefree.com/shell/

    You can also start one from the command line (Tested on OSX):

    Code:
    cd <Mirth Install Directory>/lib
    java -cp rhino-1.6r2.jar:«»xbean.jar:jsr173_1.0_api.jar  org.mozilla.javascript.tools.shell.Main
    What I usually do is take the XML transformed version of the message I am working on (get a copy from the a working channel) and assign it to a variable:

    var msg = <HL7Message><MSH> ;

    and then try out some loops and deletions of various parts of the message

    BTW: maybe this can be feature in Mirth in the future i.e., some sort of interactive Javascript scratchpad!

    - Jeremy

    Post edited by: rods, at: 08/24/2007 07:11

  • #2
    Rods,

    Do you know what the command line would be for Mirth Connect Server 2.2.1.5861

    Cheers,
    Bill

    Comment


    • #3
      Mirth uses Rhino: you can see how you can use it on command line and debug here - https://developer.mozilla.org/en-US/docs/Rhino/Shell

      Comment

      Working...
      X