Review pub.list:stringListToDocumentList in the docs.
For the reverse, you’ll need something like:
IDataCursor idc = pipeline.getCursor();
IData[] documents = IDataUtil.getIDataArray(idc, "documents");
String fieldName = IDataUtil.getString(idc, "fieldName");
String[] strList = new String[documents.length];
for (int i=0; i < documents.length; i++)
{
IDataCursor dc = documents[i].getCursor();
strList[i] = IDataUtil.getString(dc, fieldName);
dc.destroy();
}
IDataUtil.put(idc, "strList", strList);
You could make this a bit more sophisticated with a fieldListType input but I’ll leave that to you if you want that.
#Flow-and-Java-services#Integration-Server-and-ESB#webMethods