Custom Java in Mendix

Custom Java Actions in Mendix

There is no direct way in Mendix where we can call Java code.  To include any custom Java code, we can use Java Actions.  This article will cover the steps on how to add and make use of a Java Action. We will be using simple Java program for different mathematical calculation operations – for example, Add, Subtract and Multiply.


Registration is required to view the full article. Click here to register FREE…


Step 1

Create a page to input two integer variables and select mathematical operation to be done.

Custom Java in Mendix Step 1

Custom Java in Mendix – Step 1

Step 2

Let’s create a Java Action to execute our Java code which will be executed through a microflow on click of Calculate Button.

Right click on the module Math Operation, click on add other and select Java Action. Name Java Action as MathOperation

Custom Java in Mendix - Step 2

Custom Java in Mendix – Step 2

Step 3

Configure the Java Action

a) Add Parameters under the general tab:

Custom Java in Mendix - Step 3

Custom Java in Mendix – Step 3

b) Check ‘expose as microflow action’ under Expose as microflow action tab in order use the Java Action in microflow:

Custom Java in Mendix - Step 3

Please login or register to access the full article.

You may also like

Please complete the below form and a member of the Velocity IT team will call you back.

Please tell us about your automation needs