Adding Custom Java Code in Microflow Java Nodes

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

  1. Open your Microflow in Microflow Designer.
  2. Drag a Java Node onto the flow.
  3. In the Java Node properties:
  • Select Java Parameter.
  • Click Choose Jar to upload your .jar file containing compiled Java code.
  • Click Get Class Name to retrieve available classes and methods.
  1. Select the Class and Method you want to execute.
  2. 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 .jar files 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.

:light_bulb: 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.