Hi, below is teh java code:
IDataCursor pipelineCursor = pipeline.getCursor();
String configurationName = IDataUtil.getString( pipelineCursor, "configurationName" );
ArrayList<ListOrderedMap> valueList;
IDataCursor ComplexValueListCursor=null;
int NoOfRows=0;
List<ArrayList<ListOrderedMap>> output =null;
String error="";
String name="aaa";
Object ob=name;
List<Object> list=new ArrayList<Object>();
list.add(ob);
list.add(ob);
try{
Configuration cf = Configuration.getInstance();
Map<String, String> wMap = new LinkedHashMap<String, String>();
LinkedHashMap<String, Object> wNCache = (LinkedHashMap<String, Object>)cf.getCache(configurationName,list);
Integer i=0;
if (wNCache != null && !wNCache.isEmpty()) {
output = new ArrayList<ArrayList<ListOrderedMap>>(wNCache.keySet().size());
NoOfRows=wNCache.keySet().size();
for (String key : wNCache.keySet()) {
valueList = (ArrayList<ListOrderedMap>)wNCache.get(key);
output.add(valueList);
}
}
}catch (Exception e) { // catch divide-by-zero
error = e+“”;
}
pipelineCursor.destroy();
IDataCursor pipelineCursor_1 = pipeline.getCursor();
IData ComplexValueList = new IData[NoOfRows];
for (int j=0; j< NoOfRows; j++) {
ComplexValueList[j] = IDataFactory.create();
ComplexValueListCursor = ComplexValueList[j].getCursor();
}
for (int k=0; k<output.size(); k++) {
IDataUtil.put(ComplexValueListCursor,Integer.toString(k),output.get(k));
}
IDataUtil.put( pipelineCursor_1, “ComplexValueList”, ComplexValueList );
// ComplexValueListCursor.destroy();
I want to use output data as part of my flow service.So I thought to map the entire data of output variable to a document array but unable to do it. Please suggest
Thanks a lot for your help.
Thanks,
Anil.
#Integration-Server-and-ESB#Flow-and-Java-services#webMethods