How to iterate over results from wmtnenumeratenext

Hi - I’m trying to write a tool that scans the server error logs. I call and then to process the result set.

My problem is that the output of is a java.util.Vector of activity log entries. Try as I may, I cannot seem to access the individual results (I’ve tried looping and also tried mapping the result set to an array of activity log references). There doesn’t seem to be any samples or doco about this.

Can someone point me to the correct way to access these results?


You can use the following piece of code in a java service to convert the Vector to an IData object that you can access and manipulate in your flow services.

IDataCursor cursor = pipeline.getCursor();
IData resultsList = null;

if (cursor.first(“results”))
java.util.Vector results = (java.util.Vector)cursor.getValue();
Object objArray = results.toArray();
resultsList =new IData[objArray.length];
for (int i=0; i<objArray.length; i++)
resultsList[i] = (IData)objArray[i];
cursor.insertAfter(“resultsList”, resultsList);


Thanks Rupinder. That worked. I wonder why WM doens’t provide this service as part of the platform.

Just FYI: I cannot use this service as a transformer in a map. If I invoke it as a seperate step, it works perfectly.