Skip to content

[IDEA] Update Rhino javascript engine to the latest version #257

@araxor

Description

@araxor

Is your feature request related to a problem? Please describe.
Open Integration Engine currently ships with Rhino 1.7.13 (released September 2020), which has limited support for modern JavaScript (ES2015+) features. This makes writing and maintaining channel scripts unnecessarily difficult, as developers cannot use common modern JS syntax such as template literals, arrow functions, destructuring, Object.entries()/Object.values(), and many other widely adopted language features.

Describe your use case
I need modern JavaScript features (ES2015/ES2016/ES2017+) to write cleaner, more maintainable channel scripts. Rhino 1.7.13 only covers roughly 42% of ES2015 and 22% of ES2016+, while newer Rhino releases significantly expand that coverage. Being able to use features like template literals, const/let, arrow functions, and modern Array/Object methods would greatly improve the developer experience.

Describe the solution you'd like
Update the bundled Rhino engine from 1.7.13 to the latest available version (currently 1.9.1 as of February 2026). The Rhino compatibility table at https://mozilla.github.io/rhino/compat/engines.html shows substantial ES2015/ES2016/ES2017 improvements with each major version bump (1.7.14, 1.7.15, 1.8.x, and 1.9.x). Note that Rhino 1.8+ requires Java 11 or higher to run.

Describe alternatives you've considered

  • Manually replacing the Rhino JAR: This may or may not work as a drop-in replacement, since the engine is tightly coupled with the codebase (E4X support, script compilation, rhino.languageversion property, etc.). Mirth Connect itself had to handle regressions in the past when upgrading Rhino (see nextgenhealthcare/connect#3838 and nextgenhealthcare/connect#2134).
  • Transpiling modern JS to ES5 before pasting into channels: Adds complexity and makes debugging harder.
  • Replacing Rhino entirely with a different engine (e.g., V8/GraalJS): A much larger effort, as discussed in nextgenhealthcare/connect#4409. Upgrading Rhino is a more pragmatic short-term solution.

Additional context

  • Rhino compatibility table (ES2015/ES2016/ES2017 per version): https://mozilla.github.io/rhino/compat/engines.html
  • Mirth Connect (the upstream project) already performed a Rhino update to 1.7.13 in its 4.0.0 release (wiki reference), so there is precedent for this kind of upgrade.
  • Rhino 1.9.1 is available on Maven Central as org.mozilla:rhino:1.9.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions