App Connect

 View Only

 Mapping node: Building array in Custom Java transform - parameter value

Jump to  Best Answer
Francis Cocx's profile image
Francis Cocx posted Fri July 11, 2025 03:45 AM

Would it be possible to build an array object directly in the parameter value tab of a custom java block in the Mapping Node?

In bellow example I would like to take the value of an input message and add it to an array string together with predefined values.

String Value[] = ( $value, 'predefined value 1' , ' predefined value 2' ) 

 

Is this possible? or can you only always just enter one item as parameter value?

Thanks

Francis Cocx's profile image
Francis Cocx  Best Answer

While looking more into it I figured out that it is not possible to do this.

The Parameter Value tab in a Mapping Node only supports scalar values, or references to individual elements. It does not support complex object creation like arrays or object instantiation, because The mapping editor is declarative and simplified for integration purposes. Java syntax like new String[] { ... }) is not evaluated there.

An alternative approach to solve this would be by passing the dynamic part as a concatenated string via the parameter and then building the array inside the custom Java function.

  • Concatenate "$field1", "concatted", "$field2" into a single delimited string.

Then in the Java function:

  • String[] values = concatenatedString.split(",");