I'm looking to call an external java component using Java Action call in Mendix. So far I have created input parameters , created microflow with java action call. Jar files for the external java component uploaded to userlib But when I trigger the action call, I'm getting error: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: Java action was not implemented at MyFirstModule.RunBatchVanMi (JavaAction : 'Java_action_call_Van') I'm wondering if I need to add any custom java logic to java action call to execute the external java component? when opening the java action call in Eclipse I get following code (shown below) // This file was generated by Mendix Studio Pro. // // WARNING: Only the following code will be retained when actions are regenerated: // - the import list// - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. // Special characters, e.g., é, ö, à, etc. are supported in comments. package myfirstmodule.actions; import com.mendix.systemwideinterfaces.core.IContext; import com.mendix.webui.CustomJavaAction; import com.mendix.systemwideinterfaces.core.IMendixObject; public class Java_action_call_Van extends CustomJavaAction<java.lang.String> { private java.math.BigDecimal PartMaxHeight; private java.math.BigDecimal PartMaxLength; private java.math.BigDecimal PartMaxWidth; private java.math.BigDecimal PartMaxSectionalThickness; private java.math.BigDecimal Volume; public Java_action_call_Vanguard(IContext context, java.math.BigDecimal PartMaxHeight, java.math.BigDecimal PartMaxLength, java.math.BigDecimal PartMaxWidth, java.math.BigDecimal PartMaxSectionalThickness, java.math.BigDecimal Volume) { super(context); this.PartMaxHeight = PartMaxHeight; this.PartMaxLength = PartMaxLength; this.PartMaxWidth = PartMaxWidth; this.PartMaxSectionalThickness = PartMaxSectionalThickness; this.Volume = Volume; } @java.lang.Override public java.lang.String executeAction() throws Exception { // BEGIN USER CODE throw new com.mendix.systemwideinterfaces.MendixRuntimeException("Java action was not implemented"); // END USER CODE } /** * Returns a string representation of this action * @return a string representation of this action */ @java.lang.Override public java.lang.String toString() { return "Java_action_call_Van"; } // BEGIN EXTRA CODE // END EXTRA CODE }
asked
Atul George
1 answers
0
You need to add the calls to your external Java component between the // BEGIN USER CODE and // END USER CODE comments.
If you need to add more complex behaviour, extra functions, or even classes, do this between the // BEGIN EXTRA CODE and // END EXTRA CODE comments.
There are more details in the Mendix documentation.