IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Query question - How to get the contentpart/Length of a bizdoc.

  • 1.  Query question - How to get the contentpart/Length of a bizdoc.

    Posted Fri March 17, 2006 05:48 PM

    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?


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Query question - How to get the contentpart/Length of a bizdoc.

    Posted Fri March 17, 2006 08:46 PM

    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


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services