Which expression language should midPoint use: Groovy or MEL?
You are configuring midPoint mappings, policies or customizations and need to decide whether expressions are written in Groovy or in MEL. Groovy is the default expression language in midPoint, while MEL is the secure expression language intended for policies, mappings and customizations. Evolveum's current features page describes the two in this way, so the choice is about which language fits each expression, not about which one the product supports. Before you commit, confirm on that page and in your own midPoint version which expression types MEL currently covers, because support can differ between expression contexts.
Teams usually face this decision in three situations: when they start a new build and set conventions for mappings and object templates, when a script review finds Groovy logic that needs to be justified, and when a security hardening exercise asks where code runs and who can change it. Each situation has a different output. A new build needs a documented default and a rule for exceptions. A script review needs an inventory of every expression, its language and its owner. A hardening exercise needs to know which expressions can be edited by administrators and whether those edits can execute arbitrary code.
The choice also affects existing scripts. Groovy expressions already in a configuration do not change because MEL is available, so a migration is a deliberate project: list the expressions, rewrite those that MEL can express, test each rewritten expression against representative data, and keep Groovy only where the logic needs it, with a recorded reason. Plan this work before a upgrade or a repository move, so that the expression review is not squeezed into the same change window. Ask your implementation partner or internal team to estimate the effort from your actual inventory rather than from the number of scripts alone.
When to choose Groovy and when to choose MEL
Groovy is the default expression language in midPoint, and MEL is the secure option for policies, mappings and customizations. The choice usually turns on what already exists in your configuration, who writes and reviews the expressions, and which expression types you need to run.
Existing Groovy libraries and reuse
If your midPoint estate already contains Groovy scripts, function libraries or shared helper logic, rewriting them is usually the largest cost of a move to MEL. Inventory every script by object type and expression type before deciding. Keep Groovy where the logic is shared and heavily tested, and move only the small, self-contained expressions first. Confirm with your own configuration review how many scripts depend on shared functions.
Team skills and maintenance
Consider who will maintain the expressions after the project ends. Groovy gives developers the full language and its libraries, which suits a team with Java or Groovy experience. MEL suits a configuration team that prefers a smaller expression surface and fewer surprises during upgrades. Ask your implementation partner to show how each option is tested and documented in your environment.
Restricted expression surface for reviewers
Security and compliance reviewers often need to read an expression and know what it can reach. MEL is designed as a secure expression language, which makes it a candidate where reviewers must approve changes without reading arbitrary code. Groovy expressions can call broader Java and script capabilities, so they need stricter review and controls on who may change them. Document the review rule for each language in your change process.
Where the expression runs
Check each place an expression will run: policies, mappings and customizations. The features page lists what each language covers, but coverage can differ by expression type and release. Test every expression type you plan to use in a non-production environment and record the result. Do not assume that a language works in all three locations until your own tests confirm it.
Current featuresSecurity exposure of script code
Scripts run inside the identity platform with access to the data and systems it manages, so a poorly reviewed script can affect many accounts at once. Assess what each expression can read and call, who can edit it, and whether changes are logged. Pair this decision with your expression security review and the security hardening checklist before go-live.
Testing and upgrade regression
Each expression language needs its own test plan, including edge cases for empty attributes, multi-valued fields and unexpected source data. Plan regression tests for every midPoint upgrade, because a language's behavior or coverage can change between releases. Ask your partner for a test suite that runs against the same expressions before and after each upgrade.
Expression language options compared
This table compares Groovy and MEL on the dimensions that shape your decision: default status, where each is used, security posture, maintainability, reuse and migration. Read each row as a question to answer in your own environment before you commit scripts to either language. The main takeaway is that Groovy is the default today, so MEL adoption is a deliberate choice that needs a verified inventory of existing expressions.
| Dimension | Groovy | MEL (midPoint Expression Language) |
|---|---|---|
| Default status | Default expression language in midPoint. Confirm the default for your target release in the release notes before you start. | Secure expression language for policies, mappings and customizations. Confirm which expression contexts it covers in your release. |
| Where it is used | Confirm which mappings, policies, object templates, tasks and custom GUI hooks in your deployment use Groovy scripts today. | Confirm which of your planned mappings and policies can be written in MEL without falling back to Groovy. |
| Security posture | Scripts run with broad language power, so review what each script can call, which credentials it can reach and who can edit it. | Designed as the secure option. Verify the restrictions it imposes and test that scripts in your environment behave as expected under them. |
| Maintainability | Familiar to Java and Groovy developers, but large script bodies are harder to review, test and version. Ask who on your team can support them. | Verify the syntax, tooling and error messages with your own examples. Ask Evolveum for current guidance on writing and debugging MEL. |
| Reuse through function libraries | Function libraries can hold Groovy logic shared across objects. Confirm how libraries are versioned and secured in your release. | Confirm whether shared function libraries and reuse patterns apply equally to MEL expressions in your target version. |
| Migration effort | Existing Groovy scripts stay in place until you decide to change them. Inventory them by object type, owner and risk before planning any rewrite. | Each script needs rewriting, retesting against sample identities and a comparison of outputs. Budget time per script class, and ask your partner for a scope estimate. |
How the security model changes between Groovy and MEL
The main security difference is what an expression is allowed to do. Groovy is the default expression language in midPoint, and MEL is described by Evolveum as a secure expression language for policies, mappings and customizations. Anyone who can author an expression can influence how identities are computed, which roles are assigned and what data flows into target systems, so the language they write in determines how far a mistake or a malicious change can reach. Administrators who can edit mappings, object templates or policy rules should be treated as people with code-level influence, even when they never write a line of Java.
Unrestricted scripting widens the attack surface because a script is a general-purpose program running inside the identity platform. A compromised administrator account, a copied script from an untrusted source or a careless change to a shared mapping can all lead to behavior that the designers never intended. Expression security is one of the specific items in midPoint security hardening, so the decision on language belongs in the same review as administrator roles, authorization and patching. Confirm with Evolveum's current documentation which functions, classes and external calls MEL blocks or limits in your release, since restrictions differ between versions and the features page does not list them in full.
Before you choose, run an inventory of every Groovy expression in your configuration. Record where each one lives, who can edit it and whether it calls external resources or libraries. Then test a representative set of those expressions in a non-production environment with MEL to see which ones convert cleanly and which need redesign. Ask the platform owner to document the security review and approval steps for expression changes, so the language decision is tied to the access model that governs who can change them.
How to migrate existing Groovy scripts to MEL
This sequence moves midPoint expressions from Groovy to MEL in a controlled way, so each script is inventoried, reproduced, reviewed and switched only after its output has been proven equal. It produces a reconciled, documented set of expressions that the team can run and audit on any supported release.
Inventory every script and its references
List every Groovy script in the configuration, including mappings, object templates, policy rules, notifications, function libraries and tasks, and record the object and property where each one is referenced. Export the configuration objects so the inventory can be reproduced from files rather than from memory. Check: every script has an owner, a reference path and a note on whether anything outside midPoint calls it, so nothing is missed when references are switched.
Classify scripts by expression type and purpose
Group each script by the place it runs, such as inbound or outbound mapping, condition, value generation, policy constraint or notification, and by what it does, such as string formatting, lookups, role computation or calls to external code. Mark scripts that depend on Java classes, file system access, network calls or custom libraries, because these need separate review before any MEL equivalent is written. Confirm MEL's supported expression types and functions for your release in the current features documentation. Check: each script has one class and one risk note.
Build MEL equivalents on a non-production copy
Import the exported configuration into a non-production midPoint environment with representative data, then write the MEL equivalent of each script in that copy. Keep the Groovy version in place so both can be run against the same inputs. Where a script cannot be expressed in MEL, record it as a gap and decide with the team whether to redesign it or keep it on a controlled path. Check: each rewritten expression is stored as a configuration change under version control.
Compare outputs for identical inputs
Run the Groovy and MEL versions against the same set of users, roles and organizations, including edge cases such as empty values, special characters, duplicate names and missing attributes. Record the output of each pair and investigate every difference until the cause is known. Check: a written comparison sheet shows matching results for each test case, with any intended behavior change approved by the owner of that rule.
Review security and role access for each expression
Review each MEL expression against the security posture of your environment, including which actors can edit expressions, which roles can invoke them, what data they can read and whether any expression reaches outside midPoint. Compare this with the expression security settings and administrator authorizations in your hardening plan. Confirm with Evolveum documentation which expression capabilities your release restricts. Check: a signed review lists each expression, its owner, its permitted authorizations and any open risk accepted by the security owner.
Switch references in a controlled change
Apply the reviewed MEL expressions to the production configuration in a single planned change, updating each reference that was recorded in the inventory and retiring the Groovy script only after its references are gone. Keep a rollback copy of the previous configuration and a list of changed objects. Check: a search for remaining Groovy references in the production configuration returns no unexpected results, and the change record links each switched reference to its review.
Verify results with reconciliation
After the switch, run reconciliation and a sample of recomputation tasks against affected resources and compare the resulting account attributes, role assignments and entitlements with the values recorded before the change. Investigate any unexpected drift and roll back the affected expression if the cause is not understood. Check: reconciliation reports show no unexplained changes, and the migration record is retained with the inventory, comparison sheet and review for audit and future upgrades.
Every new expression should pass through one decision path before it ships
The diagram starts when a team needs a new expression in a mapping, policy or customization. The first hand-off asks whether the logic depends on a function library that already exists, because that choice decides how the code is shared and reviewed. The next check asks whether MEL can express the required logic. If it can, the team chooses MEL. If it cannot, the team keeps Groovy and applies review controls. Both paths end with testing and documentation, so the reader should check that every branch reaches those two steps.
Decision path for choosing between MEL and Groovy for each expression.
Security and operational considerations for both languages
Whichever expression language a midPoint estate uses, the same controls decide how safe it is: who may change expressions, how those changes are reviewed and tested, and what is logged. Groovy and MEL differ in what they can execute, but both run inside a system that holds identity data and privileged credentials, so these concerns apply to each script or expression you keep.
Who can edit expressions
Expression edits are configuration changes with access impact, so limit who holds the authorizations to create or modify mappings, policies and library objects. Review which administrator roles can reach object templates and function libraries, and confirm that Groovy scripts are not editable by people who cannot also deploy them. Decide this before migration starts, not after the first mixed estate is live.
Review and change control
Treat every expression as code that needs a reviewer. Keep midPoint objects in a Git repository and route changes through Studio or pull requests so each edit has an author, a diff and an approver. Confirm how your team exports objects from the running environment, because edits made only in the GUI bypass this review path.
Testing before production
Run each converted or new expression against representative accounts in a non-production environment before it reaches the production repository. Include edge cases such as missing attributes, duplicate values and empty inputs, and compare results between the Groovy original and the MEL version during migration. Record the test cases alongside the object so a later reviewer can repeat them.
Logging and audit of changes
Confirm that changes to expression objects appear in your audit trail with the actor, timestamp and object identifier, and that the audit database is retained according to your policy. Check whether the audit records capture the before and after content of the expression, since a reviewer may need that to reconstruct a past decision. Test this on a staging environment before you rely on it.
Credential handling in scripts
Scripts must not contain passwords, API tokens or connector secrets in plain text. Reference credentials through midPoint's protected string and configuration mechanisms, and check that log output from failed expressions does not echo sensitive values. Review every script that calls an external system, because those calls often run with service credentials that carry broad rights.
Running a mixed estate during migration
During a migration, Groovy and MEL expressions may run side by side across different objects. Keep an inventory that lists each expression, its language and its owner, and set an end date for retiring the Groovy versions. Verify the security profile applied to each language so that a temporary exception does not become a permanent gap. For the full checklist, see the midPoint security hardening content group.
Questions teams ask before migrating expressions
Can our team migrate midPoint Groovy scripts to MEL without a partner?
Yes, a team with midPoint experience can often do the work in-house, provided it has someone who understands the mappings and the target systems behind them. The migration is a rewrite of each expression, not a file conversion, so the skill that matters most is knowing what each script is meant to do. Teams without that knowledge, or without a test environment to prove the new expressions behave the same, usually find the work slower than expected. A partner is most useful when the script count is high or the logic is hard to document. Confirm your team's midPoint skills against the scripts you actually have before deciding.
What drives the effort of an expression migration project?
Effort rises with four factors: the number of scripts, how complex each one is, how many depend on shared function libraries, and how much test data is available to prove results. A short list of simple attribute transforms is a very different job from dozens of conditional mappings that call into custom libraries. Undocumented scripts take longer because someone has to reconstruct intent before rewriting anything. Ask for each factor to be counted in the written scope, so the quote reflects your actual inventory rather than an average.
What does the migration need from our staff?
The work needs three kinds of input from your side. First, access to a test environment that mirrors production closely enough to compare outputs before and after each change. Second, reviewers who know the midPoint configuration and can confirm that a rewritten expression matches its original behavior. Third, business owners who can state what each mapping or policy is supposed to produce, especially where the script encodes a rule nobody has written down. Without these, the project stalls at the point where the team has to guess. Agree on named people and their time before work starts.
Must we remove all Groovy scripts once MEL is available?
No, Groovy is the default expression language in midPoint, so existing Groovy expressions can remain in place. The question is which expressions you choose to move and when. Migrating to MEL can reduce the scripting surface you need to review, which matters for the security assessment of expressions. Teams often migrate the scripts with the highest exposure first and leave stable, well-tested Groovy in place until there is a reason to change it. Record the decision for each script so auditors and future administrators can see why it stayed or moved.
How do we confirm a migrated expression still behaves the same?
Compare outputs from the original and migrated expression against the same set of input objects, and keep the results as evidence. Build test cases from real account and role scenarios, including edge cases such as missing attributes, empty values and unusual names. Run the comparison in a non-production environment before any change reaches production, and repeat it after each function library change. Keep the test data handling within your data protection rules. The aim is a repeatable check your team can run again later, not a one-time sign-off.
What should we ask a partner to include in a written migration scope?
Ask for a written inventory of every expression in scope, with its type, location and dependencies on function libraries. Ask how each expression will be rewritten, tested and compared, and who approves each change. Confirm the deliverables, including updated configuration, test evidence and documentation of decisions for scripts that stay in Groovy. Ask which midPoint version the work targets, because language support and upgrade steps depend on it, and confirm the test environment and reviewer time you must provide. Finally, ask how post-migration support is handled. DeployOpen agrees scope, deliverables and timelines in writing before work starts, so you can compare proposals on the same basis.
Does the migration change what midPoint can do or who owns it?
Migrating expressions changes how logic is written, not what midPoint is for. midPoint remains an identity governance platform that you run in your own infrastructure, and the expression language does not alter that ownership. What changes is your team's maintenance responsibility for the new expressions, so documentation and handover matter. Confirm with your midPoint release notes which expression features apply to your version, because the supported language features depend on the release you run. Agree on who will maintain each migrated expression after the project ends.
Limits to confirm in your environment
MEL is a secure expression language that sits alongside Groovy, the default in midPoint. The cards below list the points you should verify with Evolveum documentation or your own tests before you move scripts, because coverage depends on the release you run and on your support terms.
Expression types supported by MEL
Confirm which expression types and script locations accept MEL in your exact midPoint release, since not every place where Groovy runs is guaranteed to accept MEL. Build a short inventory of your current expression types, such as mappings, policy rules and customizations, and check each one against the release notes and the current features documentation. Record any type that needs Groovy so the migration plan does not assume full coverage.
Current features docsGroovy scripts without a MEL equivalent
For each Groovy script, ask whether MEL can express the same logic, including calls to library functions, iteration over multi-valued attributes and access to repository objects. Scripts that depend on Java classes, custom imports or complex control flow are the most likely to need a rewrite or to stay in Groovy. Keep a written mapping of script to outcome, and treat any gap as a design decision rather than a silent fallback.
Performance under your workload
Do not assume MEL and Groovy perform the same on your data. Run representative reconciliation or recompute tasks on a non-production copy of your repository with realistic user counts, then compare duration, memory use and repository load. Measure both languages on the same hardware and the same dataset, and record the results so you can repeat the test after each upgrade.
Support coverage for converted expressions
Ask Evolveum whether issues in converted MEL expressions fall under your Product Support subscription, and whether Groovy issues in custom code are covered in the same way. Product Support covers resolving product bugs under an 8x5 next-business-day or 24x7 SLA, but custom expression logic written by your team may sit outside that scope. Get the answer in writing before you plan a cutover.
Support subscriptionsUpgrade behavior across releases
Expression behavior can change between feature releases, so confirm how MEL and Groovy are affected by each version on your upgrade path. Plan to retest converted expressions at every step, and check whether a long-term support release keeps the behavior you rely on. Include expression tests in your upgrade checklist so regressions surface in staging, not in production identity flows.
- Next feature release
- 4.11
Security review of retained Groovy
Any Groovy script you keep still runs with the trust your configuration gives it, so confirm what that code can reach in your release and which administrators can edit it. Record which scripts remain, who owns them and how changes are reviewed and tested. Ask Evolveum and your security team to confirm which expression restrictions apply, rather than assuming MEL removes the risk from scripts that stay in Groovy.
How DeployOpen approaches expression migration
DeployOpen starts expression migration with an inventory before any code changes. The work begins by listing every Groovy script in use across mappings, object templates, policies, function libraries and custom configuration, then recording where each one runs, what objects it reads and writes, and which team owns it. That inventory becomes the basis of the written scope, which states which scripts move to MEL, which stay in Groovy with a documented reason, and which are retired because they no longer serve a purpose. Agreeing this list in writing before work starts keeps the migration bounded and lets your security and identity teams review what is changing.
Each migrated expression is then tested against the behavior it replaces. Tests compare outputs for representative identities, including edge cases such as missing attributes, duplicate names and archived or disabled accounts, and they run in a non-production environment that mirrors your configuration. Because the expressions live in configuration, the changes are carried through the same version control and review path as the rest of your midPoint objects. Ask the partner to show how the test cases are stored, who signs off on output differences and how the change record is kept for later reviews.
Documentation completes the migration. For each changed expression, the record should show the original Groovy, the MEL replacement, the reason for any remaining Groovy use and the test evidence. Confirm with Evolveum's current documentation which expression features are available in MEL for your midPoint version before committing to a replacement, because support can differ from Groovy. Your own change management and configuration-as-code practices should decide how these records are reviewed and retained.
How DeployOpen scopes and delivers midPoint expression work
DeployOpen approaches the Groovy versus MEL decision as a scoped piece of midPoint configuration work, not a language preference. We inventory the expressions your deployment depends on, agree the approach in writing, and deliver tested, documented changes inside your own infrastructure. Engagements are fixed-scope, and ongoing support is available as a retainer.
How we scope
- Inventory every existing Groovy script in mappings, policies and customizations, with its owner and where it runs.
- Classify each expression by business purpose, data sensitivity and whether it can be expressed in MEL.
- Record the agreed scope, deliverables and timeline in writing before any migration or build work starts.
How we build
- Prototype representative expressions in MEL and Groovy on a non-production midPoint instance matching your version.
- Rewrite or retain scripts according to the agreed decisions, keeping inputs, outputs and error handling documented.
- Test each expression against sample identity data, including edge cases such as missing attributes and duplicate values.
How we hand over
- Deliver a decision record listing each expression, the language chosen, the reason and the security review outcome.
- Provide change records, test cases and configuration files so your team can review and redeploy changes.
- Walk your engineers through the migration steps and the rollback approach before production cutover.
How we support
- Support the agreed expression changes through a retainer covering fixes, reviews and version-specific checks.
- Re-test expressions when you plan a midPoint upgrade, since behavior and supported options can change between releases.
- Confirm with Evolveum which subscription and support terms fit your environment before relying on a specific release.

