how to create java action

0
hii community members , i am new in mendix development , i have read all java action documetation    but i am unable to use it and also confuse were we need it. can someone guide me step by step to build  A java action with any specific scenerio. so i could learn java action plase also attach the screenshot as much as possible for my better understand your help will be very appreciative.. 
asked
4 answers
8

Hi Sanjay,

In Mendix, Right click->Add other->Java action→ Add parameters and return value as per your requirement.

Download an install eclipse

Open eclipse→ File->Open project from file system->Select your mendix project folder

In Mendix, Run->Deploy for Eclipse

In Eclipse, Right click your project name->Refresh

You will get your project in package explorer of eclipse

Open java source→ you can get all your java actions

Type your java code inbetween the start and end code

 

answered
1

Hi Sanjay,

With Java actions you can extend the functionality of your application in situations where it would be hard to implement this functionality in microflows. You can call a Java action from a microflow using the Java action call.

Please go through the docs: https://docs.mendix.com/refguide/java-actions/

 

answered
0

Hi Sanjay,

 

First you need to create the Java action by using Add other → Java action. Once its done open the java action and add the parameter as you want and return type parameter based upon your requirement.

Once its done deploy for eclipse and doo the java code in eclipse and call the java action were ever you needed in the microflow.

 

 

Attached the screenshot for reference.

 

 

 

 

answered
0

In addition to the other answers you’d only need to use a Java Action if the functionality you need isn’t available directly in Mendix.

One example where you would need to do this would be to integrate a third party Java library and make its functions available to Mendix. 

Most users wouldn’t need to write their own Java actions as the most common use cases would already have solutions available in the Mendix Marketplace to download. However, the ability for everyone write their own Java Actions means if the functionality isn’t available elsewhere, you can write your own solution.

Hope this helps.

answered