
As telematics solutions grow more complex, the need for customized, adaptable logic increases. Navixy’s IoT Logic app, powered by JEXL expressions, meets this demand with a simple, flexible approach.
Similarly intuitive and powerful as Excel formulas, JEXL makes it easy to create dynamic rules and real-time automation without heavy coding. In this post, we’ll show how JEXL can accelerate your telematics projects, even if you’re new to scripting.
First thing, let’s look at what JEXL actually is, and why we chose it for Navixy’s IoT Logic.
JEXL, short for Java Expression Language, is a lightweight scripting language that enables software applications to evaluate custom logic or formulas at runtime. Simply put, JEXL allows developers — or even technically inclined users — to embed and run expressions within an application without hard-coding the logic upfront. It was developed as part of the Apache Commons library to bring flexible, dynamic computation to Java-based systems without relying on heavy frameworks.
JEXL’s syntax is simple and designed to be familiar — resembling JavaScript or common formula-style expressions — which makes it easy to learn. For example, you can write an expression like 3 + 4 * 2, call object methods, or use conditionals, and JEXL will evaluate it on the fly. Behind the scenes, the application provides a context (such as variables and data objects) that the expression can reference, and JEXL handles the parsing and computation.
JEXL offers dynamic expression evaluation, so you can update formulas without recompiling code. It integrates smoothly with Java objects, allowing expressions to call methods or access fields in the given context.
It also supports common scripting features like arithmetic, logical operators, and conditionals. You can even define custom functions or extend its syntax if needed. Still, JEXL intentionally stays focused on expressions and simple scripts — not full-scale programming — making it both powerful and safe for embedding into larger systems.
JEXL is a mature and well-established tool. Originally developed in the early 2000s and inspired by the expression language used in JSP (JavaServer Pages), it has steadily evolved over the years. The latest 3.x versions bring modern enhancements like the ternary ?: operator, regex matching, and string prefix/suffix operators — features developers now expect. Its syntax has become more JavaScript-like (without the added complexity of things like prototypes), all while keeping a lightweight footprint. In short, JEXL isn’t experimental — it’s a proven, dependable solution for safely executing user-defined logic inside applications.
For those curious about how simple yet powerful JEXL can be for IoT and telematics applications, the JEXL Playground offers an easy, interactive way to explore expressions. You can test and validate logic directly in your browser — no installation or setup required.
Want to give it a try? Here’s the link to open the JEXL playground with an example and play a little bit.

As you click the link, there’re four key areas, such as Input, Context, Transforms, and Output. Let’s break them down real quick.
Write or paste your JEXL expression here. This represents your logic, formula, or condition. For example, to calculate battery percentage from sensor voltage (11 to 14V), use:
round((voltage - 11) / (14 - 11) * 100)
Define your input data using simple JSON. Think of it as incoming data from telematics sensors — voltage, speed, temperature, etc. Here’s an example:
{
"voltage": 12.5
}
You can define reusable functions for complex operations if needed. For instance, a rounding function:
{
"round": "val => Math.round(val)"
}
Once your expression and context are entered, this section instantly displays the result. In the example above, the output would be 50, indicating that a 12.5V reading equals 50% battery charge.
Overall, you can tweak the voltage, adjust the formula, or create new expressions to match your IoT logic — perfect for quick validation before implementing rules in Navixy’s IoT Logic.
But this is just the beginning. Beyond simple formulas, JEXL enables advanced interpretations of real-time CAN bus data. Integrators can use expressions to calculate engine torque percentages, analyse brake pressure, or compute fuel usage from injector pulse widths. With built-in support for bitwise operations, it’s also possible to decode transmission states, detect error flags, or identify vehicle events encoded in binary signals — all without writing complex code.
To make it easier to get started, we’ve broken down what each field in the playground does — and how it relates to building expressions in Navixy’s IoT Logic.
| Field | What it does | How you use it with Navixy IoT Logic |
|---|---|---|
| Input | Expression or formula you’re testing | Logical rules or calculations |
| Context | Incoming data variables for expression | Simulated IoT device data (voltage, speed, etc.) |
| Transforms (optional) | Custom functions for reuse within expressions | Advanced calculations or formatting (rarely used) |
| Output | Result of the evaluated expression | Immediate verification of correctness |
Now, let’s take a closer look at how JEXL was developing.
JEXL was inspired by template languages like Apache Velocity and the JSP Standard Tag Library’s EL. It aimed to let end-users or integrators inject custom logic into enterprise platforms.
Over time, it has evolved into a robust open-source library maintained by Apache, designed with simplicity, performance, and security in mind for embedded scripting. While the name JEXL (short for Java Expression Language) reflects its origins, the syntax has kept pace with modern scripting conventions. As of version 3.3, JEXL supports many familiar constructs from popular programming languages — including && and || logic, ternary conditionals (?:), regex matches (=~), and even the “Elvis” operator for setting default values. These modern features make it easy for developers to write clear, concise expressions.
Because JEXL is part of the Apache Commons project, it’s open source and actively maintained by the community. Regular updates are documented in the release notes — for example, version 3.4.0 was released in mid-2024, introducing features like an instanceof operator and other enhancements. This steady development shows that JEXL continues to evolve with modern developer needs. With a development history spanning nearly 20 years, it’s a mature and battle-tested tool — bugs have been resolved, and performance has been fine-tuned. Designed for efficiency, JEXL is lightweight enough not to strain resource-constrained IoT servers. The library typically adds only a few hundred kilobytes to a project and can evaluate common expressions rapidly, especially when reused or cached.
This maturity is especially important for IoT and telematics platforms. That’s why Navixy relies on JEXL as a stable logic engine — one capable of handling the real-time calculations and validations required in telematics data processing. Over time, JEXL has also introduced safeguards, such as restricting access to specific methods and classes, making it safe to use even when end users define their own expressions. The result is a modern, dependable solution that integrates seamlessly into an embedded IoT workflow.
It’s worth noting that JEXL is not the only expression language available — there are several others that have been used in Java and IoT environments.
For example, MVEL (the MVFLEX Expression Language) is another powerful embeddable language popular in rule engines and BPM systems. Similarly, SpEL (Spring Expression Language) is used in the Spring ecosystem to configure and evaluate expressions within Spring-based applications.
Each of these languages has a similar goal: to allow dynamic logic execution within a host application. In fact, many rule engine libraries support multiple options. For instance, the open-source Easy Rules engine allows defining conditions and actions using MVEL, SpEL, or JEXL interchangeably, highlighting that all three are recognized choices for embedding business rules.
Navixy opted for JEXL after carefully considering these alternatives. Why JEXL? There are a few reasons we considered.
As you can see, while alternatives existed (and each had pros and cons in different scenarios), JEXL appeared to be the best fit for Navixy’s IoT Logic, aligning with the project’s goals of being low-code, user-friendly, and robust. For us, it combined the benefits of a scripting engine and the absence of the weight and complexity that other solutions might’ve had.
We’ve touched on JEXL’s maturity and reliability — reasons why many telematics platforms rely on it. Now, let’s break down how it specifically benefits system integrators working in vehicle IoT and telematics.
Telematics and IoT applications often require complex, custom rules — for example, “alert me if a vehicle’s fuel level drops by more than 10% within five minutes” or “calculate engine runtime based on RPM readings.” Without a dynamic logic engine, integrators would typically have to request custom development or run external scripts to meet such requirements.
JEXL changes that. It enables integrators to define custom logic themselves in a safe, sandboxed environment — no need to modify backend code or deploy external tools.
When used in platforms like Navixy’s IoT Logic, JEXL lets integrators write mini-scripts or formulas—often in a syntax they already recognize — directly within the platform. This flexibility is a major advantage: the platform can adapt to varying customer needs without firmware updates or backend changes.
For instance, if a fleet operator wants to derive a new metric (say, combining two temperature sensor readings and converting the result to Fahrenheit), they can do it by writing a simple expression in the platform’s UI — no developer intervention required.
JEXL’s JavaScript-like syntax lowers the barrier for users with basic scripting experience. Even the function naming in Navixy’s IoT Logic Expression Language follows camelCase conventions (e.g., value() or genTime()), which will feel familiar to most developers.
In vehicle telematics, data flows in constantly — GPS updates, sensor values, diagnostic reports. JEXL allows the platform to process each data point as it arrives, in real time.
This enables integrators to apply smart transformations and filters immediately. For example, using Navixy’s JEXL-powered logic node, one might calculate a battery’s charge percentage from a voltage reading on the fly or detect an abnormal temperature spike by comparing it to the previous value.
Because JEXL is lightweight and fast, these operations don’t slow down data throughput, which is a critical advantage when managing large fleets or real-time IoT deployments.
JEXL also improves agility from a DevOps perspective. Instead of hard-coding calculations, logic is externalized as editable expressions. When a rule changes — say, adjusting a threshold — integrators can simply update the expression in the UI. No code changes. No redeployments. The new rule takes effect instantly.
This makes it easy to prototype analytics, experiment with ideas, and adapt the system quickly — all without writing Java code or using external tools. In short, JEXL acts as a toolbox for tailoring the platform to diverse project needs, whether it’s computing driver scores, normalizing units, or detecting complex conditions
One of the standout benefits of JEXL is how well it balances flexibility with control. The platform can strictly define what user-defined expressions are allowed to do — limiting them to safe operations like arithmetic or data access while blocking file I/O or network calls.
Sandboxing ensures that custom logic doesn’t compromise platform stability or security. Apache Commons JEXL provides the necessary hooks to enforce these restrictions, giving integrators the freedom to build — and platforms the power to stay secure.
That’s to say, JEXL offers flexibility without sacrificing performance or safety, which is a sweet spot for IoT integrators aiming to build smart, automated solutions on a telematics platform.
Navixy is not alone in leveraging expression languages to empower IoT and telematics solutions — many platforms offer comparable capabilities to give integrators enhanced control over data processing logic. What sets Navixy apart is its adoption of JEXL, providing integrators with a modern, standard, and intuitive expression language that makes deriving custom insights from telematics data straightforward, without relying on proprietary or overly complex syntaxes.
All these instances indicate that to build smart, flexible IoT applications, having an expression or rule engine is considered best practice. Navixy’s adoption of JEXL puts it in line with these industry trends, leveraging a well-known engine instead of reinventing the wheel.
What sets Navixy’s approach apart is the combination of a visual workflow builder (drag-and-drop nodes) with the power of JEXL under the hood. Many older platforms required users to input raw formulas or write scripts in a text field, which could be daunting. Navixy IoT Logic instead presents a friendly UI: you chain together nodes for data source, logic, and output, and only when you need a custom calculation do you enter a JEXL expression in a form. This lowers the barrier because the overall logic is diagrammed visually, and JEXL is used for the granular calculations or checks.

What kinds of real-world telematics solutions does JEXL make possible? The range is broad—essentially, any scenario that involves deriving new insights from raw device data or applying conditional rules can benefit. Below are a few practical examples.
speed > 100 && duration > 60 could be an expression to check speeding lasting more than 60 seconds). This highlights how JEXL empowers creating rich alerting logic. Another use case is detecting fuel theft events by checking if fuel level drops more than X liters in Y minutes — a JEXL condition can compare the current fuel reading with a recent historical reading (Navixy’s value('param', index) function even allows referencing past data points easily ). So complex temporal conditions can be evaluated with one expression.Let’s look at a real-world case study from a fleet management scenario.
A logistics company wanted to reduce engine idling. Their vehicles reported ignition on/off status and fuel consumption, but they needed to calculate fuel wasted during idling. Using JEXL in an IoT Logic flow, the integrator created an attribute that accumulates fuel usage when the ignition is on but the vehicle speed is zero (i.e., idling).
They wrote an expression that checks: if (ignition == 1 && speed == 0), then add fuelUsed to idleFuelCounter. Over time, this produced a custom KPI for the client—fuel wasted during idle—which was not directly available from any single sensor. This case underscores how expression-based logic allows service providers to deliver unique, value-added metrics on top of standard tracker data.
Many of these examples were previously either impossible or required significant effort—for example, writing custom server-side scripts or asking the telematics platform vendor to implement new features. With JEXL embedded in Navixy IoT Logic, the power is now in the hands of system integrators and solution architects. They can address specialized needs by writing just a few lines of expression code.
Remember our comparison with Excel? Just as power users write formulas to uncover insights from spreadsheets, integrators can use expressions to extract real-time intelligence from telematics data streams
By choosing JEXL as the core of its IoT Logic engine, Navixy offers system integrators a powerful low-code tool to create smart automation without deep backend changes. JEXL brings together familiarity (JavaScript-like syntax), reliability (Apache-backed), and flexibility (dynamic expression evaluation), making it an ideal fit for the fast-moving world of vehicle IoT and telematics.
For integrators and partners, this means full control over how data is interpreted and used—from defining new metrics and real-time alerts to customizing outputs—all without touching backend code. Navixy’s JEXL-powered implementation follows a broader industry shift: putting the power of logic in the hands of users, not just developers.
As Navixy expands IoT Logic with new features like conditional nodes and triggers, JEXL remains the backbone. It's a solid foundation for advanced, user-driven automation. Whether you're streamlining fleet operations or turning raw data into actionable insight, the flexibility JEXL provides opens the door to faster, smarter telematics solutions.