please share more details in your use case, what is the code written in the java step, also the other steps in activity, also please let us know what you want to achieve from this activity, if possible we can suggest you any OOTB activity.
I need to perform a comparison between 2 fields. I am passing 3 parameters to the Java step
Param1 is the comparewith field which can be string/number/date
Param 2 is the comparefrom field which can be string/number/date
Param 3 is the comparison operator which can be "<,>,=,!=,LIKE,NOT LIKE,>=,<="
Based on the comparison I am returning the result in an out parameter eg Param4 which will be True/False
In my test case, I have set the values of the input params and based on that I am setting my expected result of Param4 as True
However when I run the test case, it fails everytime and when I see the test results the actual value for the Param4 is coming as blank which is wrong because when I trace the activity standalone, the Param4 always has a value which will either be True/False
SR-C19391 was raised to solve this issue by customer and the root cause was that Java-Step has a variable called Value, that was null, but customer was trying to use a value.trim(), which is causing a Null PointerException.
to solve this added a if condition to check if the value of value (variable) is not null and only then call the value.trim() on it.