Announcement

Collapse

Mirth Connect 4.1.0 Released!

Mirth Connect 4.1.0 is now available as an appliance update and on our GitHub page. Mirth Connect 4.1.0 includes new features such as new event log messages, additional fields to the Welcome to Mirth Connect screen, new information included in alerts as well as many smaller changes, updates, and improvements. This release also contains several 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