I am trying to run a db query to get the size of the files for a particular partner. I am using a service like this: getInternalID → createDocumentQuery → documentQuery. I then loop over the results and run a view (wm.tn.doc:view) of the bizdoc. All of which works fine. I can see the contentParts/Length is populated with a value but I am not able to capture it (ie. send to debug log). It always comes across blank. I can also see the in the results window of the view that the Length is of type [32]. Can you please explain why I am not able to capture it and how I can get around it?
You’re right… I tried that too and it wouldn’t work so I found a way around the problem. I wrote a piece of java code (nothing much, just 4 lines really) to do this. I was hoping that there would be a better way to achieve this, but never got around researching for that ‘better’ way. In case you are interested, you can write something like this:
- Service takes ‘Length’ as an object input, which should be mapped from contentPart/Length
** This piece of code does not check for null value of the input, you might wanna include that check.
IDataCursor pCursor = pipeline.getCursor();
int len = ((Integer)IDataUtil.get(pCursor,“Length”)).intValue();
IDataUtil.put(pCursor,“Length”,len+“”);
pCursor.destroy();
HTH, Rohit