java-actions

A Mendix Java-actions guide explains how to add server-side Java code to a Mendix application and call it from a microflow. Microflows are Mendix's visual workflows for application logic.

In plain words
What is it for?
Use it to define Java actions in Studio Pro, implement their Java code, call them from MDL microflows, and build integrations or processing that requires Java.
Why use it?
It covers cases where visual workflows cannot express the needed algorithm, Java library, or external integration. It also points to guidance on errors, transactions, security, and performance.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mendixlabs/mxcli/java-actions
Any agent
npx skills add mendixlabs/mxcli --skill java-actions
Clone the repo
git clone --depth 1 https://github.com/mendixlabs/mxcli

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,265 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.04265
Opus 5 $0.00026 $0.02132
Sonnet 5 $0.00010 $0.00853
Haiku 4.5 $0.00005 $0.00426

Measured yesterday against content hash b783e0810cb4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

java-actions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/mendix/java-actions/SKILL.md · 587 lines

How it starts

The opening of the file, as written. The whole thing — 587 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mendix Java Actions Skill

This skill provides comprehensive guidance for creating and using custom Java actions in Mendix projects.

Reference files

SKILL.md covers declaring a Java action in MDL and calling it from a microflow — the parts that touch the model. The Java side is next door:

  • reference/writing-java.md — creating the action in Studio Pro, writing the executeAction body, the Core API surface you have, and the recurring patterns (HTTP calls, file handling, batch work).
  • reference/best-practices.md — error handling, transactions and rollback, logging, threading, security, and performance. Read it before shipping a Java action that touches data or an external system.

When to Use This Skill

Use this skill when:

  • You need to extend Mendix with custom Java logic
  • Building integrations with external Java libraries
  • Implementing complex algorithms not feasible in microflows
  • Calling Java actions from MDL microflows
  • Debugging Java action calls

Overview

Java actions allow you to extend Mendix with custom Java code. The workflow is:

  1. Define the Java action in Studio Pro (parameters, return type)
  2. Implement the Java code in Eclipse/IDE
  3. Call the Java action from microflows using MDL

Part 2.5: Creating Java Actions in MDL

MDL supports defining Java actions with inline Java code using create java action.

Basic Syntax

create java action Module.ActionName(param1: type, param2: type) returns ReturnType
as $$
// java code here
return result;
$$;

AS $$ ... $$ is mandatory. The body cannot be omitted even for placeholder or stub actions. Omitting it causes a parse error: no viable alternative at input '...'. Use a minimal body if the real implementation is not yet written:

create java action Module.Stub() returns boolean
as $$
return false;
$$;

Type Parameters (Generics)

Type parameters let Java actions accept any entity type dynamically. Use entity <pEntity> in a parameter type to declare the type parameter inline. That parameter becomes the entity type selector (receives the entity type name, e.g., 'Module.Entity'). Bare pEntity parameters become parameterized entity params (receive entity instances, e.g., $Variable).

Read the full file on GitHub · 587 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 587 lines · 52 tokens per session scan A b783e0810cb4

Subscribe to this mod's changes

java-actions is a skill published in the GitHub repository mendixlabs/mxcli (115 stars, last pushed 2d ago), licensed Apache-2.0. It adds 52 tokens to every session and 4,265 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.