While ONEWEB’s Microflow Designer provides a visual, low-code approach to building integrations and workflows, there are times when you need to add custom backend logic that goes beyond the standard activities. In these cases, you can use a Java Node inside a Microflow.
1. When to Use a Java Node
A Java Node is ideal when:
- You need to perform complex calculations or data processing.
- You want to call custom APIs or libraries not covered by built-in connectors.
- You need to implement specialized integration logic that’s easier to write in Java.
2. How to Add a Java Node in Microflow
- Open your Microflow in Microflow Designer.
- Drag a Java Node onto the flow.
- In the Java Node properties:
- Select Java Parameter.
- Click Choose Jar to upload your
.jarfile containing compiled Java code. - Click Get Class Name to retrieve available classes and methods.
- Select the Class and Method you want to execute.
- Map the method’s input and output parameters to Microflow variables.
3. Best Practices
- Keep Java modular — separate logic into reusable methods.
- Document method parameters so other developers understand how to use them.
- Store frequently used
.jarfiles in a shared repository for consistency across projects. - Use exception handling in your Java code to prevent runtime errors from breaking workflows.
4. Testing Your Java Node
- Run the Microflow in Test mode.
- Check the logs for output and verify that the Java logic is executed as expected.
- If there’s an error, review both the Microflow debug log and your Java code’s exception messages.
Pro Tip: You can combine Java Nodes with other Microflow activities (REST calls, database queries, conditional flows) to create powerful hybrid workflows — keeping most of the process low-code, but injecting custom code where it’s truly needed.
