- Troubleshooting
Lists the problematic JAR files and the known workarounds.
With Java actions, you can extend the functionality of your application in situations where it would be hard to implement this functionality in microflows.
For information about Java actions in Studio Pro, see Java Actions.
In .java files of your Java actions, the method executeAction
is called by the Mendix Runtime when the Java action is being executed. The method throws all exceptions that occur. This means you can do error handling in the microflow calling this Java action. If you would like to do your own error handling within the action, use try
/ catch
statements.
Between the lines // BEGIN USER CODE
and // END USER CODE
, you can write custom code that will always be called when executing the action. You can call other methods in the section between // BEGIN EXTRA CODE
and // END EXTRA CODE
.
Code outside the blocks is regenerated each time when you deploy your model, thus any modifications that you make in them will be overwritten. However, your imports will be preserved.
|
|
You can use the Mendix Java library in the Java code that you write for your Java actions.
This library is automatically added to your libraries when you import your app into Eclipse, it is called mxruntime.jar.
For details on usage and examples, see Using the Java API.
Most cloud infrastructure services (including those used by the Mendix Cloud) will close HTTP connections automatically if there is no traffic for a few minutes, even if your activity is still waiting for a response. This means that, if your activity calls a web service which takes a long time to respond, the connection may be closed without the activity being aware of this and your activity will not receive a response, but instead get stuck waiting indefinitely for data to arrive.
You should therefore ensure that you always set a timeout for any connections you make in your custom Java code.
For details on this topic, see Using Eclipse.
Lists the problematic JAR files and the known workarounds.
Describes how to set up Eclipse, and how to add a Mendix application to Eclipse and launch it.
Describes how to extend your application with custom Java code.
Describes how to add a Java action, edit it in Eclipse, and call it from a microflow.
Was this page helpful?
Glad to hear it! Thank you for your response.
Sorry to hear that. Please tell us how we can improve.