I am trying to exploring 10.7 trial version and while using the java service I am facing a weird exception or issue
I have created a java service with below details
Java service —start
with in put - inputInts (string list) and output - testInt
public static final void sumOfMarks(IData pipeline) throws ServiceException {
IDataCursor pipelineCursor = pipeline.getCursor();
String inputInts = IDataUtil.getStringArray( pipelineCursor, “inputInts” );
int ttestInt=0;
for (int i=0;i<inputInts.length;i++)
{
ttestInt=ttestInt+Integer.valueOf(inputInts[i]);
}
IDataUtil.put( pipelineCursor, "testInt", ttestInt);
pipelineCursor.destroy();
The java service is working fine and giving the expected results
the issue is when I am calling this java service in an IS service / flow
here the branch condition is working fine (testInt >5, here testInt is the output of java service) and when I am passing the same value to addInts service I am getting the exception as shown in picture parameter num1 is missing.
Not only with this service, I have created another couple of java services but facing the same issue. Please suggest.
int ttestInt=0;
for (int i=0;i<inputInts.length;i++)
{
ttestInt=ttestInt+Integer.valueOf(inputInts[i]);
}
IDataUtil.put( pipelineCursor, "testInt", ttestInt+""); // This will convert the int to a string
pipelineCursor.destroy();
Side note: I know you’re just using this to explore, but adding a list of numbers does not need to be done in Java. You can do it with FLOW very much the same way.