Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Java in javascript

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

  • Java in javascript

    Rhino javascript allows you to easily import Java packages, and integrate Java code.

    In the transformer I would like to write this code as an alternative to mapping incoming data to XML.

    import com...ArchetypeModel;
    import com...ArchetypeClusterModel;

    arch = new ArchtypeModel();
    for (i=0; i< msg['definition']['attributes']['children'].length(); i++) {
    cluster = new ArchetypeClusterModel();
    cluster.getArchetypeClusterRef().setIdvalue(msg['definition']['attributes']['children']['rm_type_name'].toString());
    arch.getClusters().add(cluster);
    }

    tmp = arch.toXml();



    Any plans on supporting that?

    thanks

    Greg

  • #2
    Re:Java in javascript

    AFAIK This can be done with Mirth yet:

    1) Put the java jar files at the custom dir.
    2) To import an object, use:
    var object = Packages.[fully-qualified name];

    There are some examples at the board:

    http://www.mirthproject.org/index.ph...9&catid=2#3949

    http://www.mirthproject.org/index.ph...3&catid=2#3723

    Comment

    Working...
    X