webMethods

webMethods

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
  • 1.  How to create a new RecordList

    Posted Mon March 24, 2003 04:38 AM

    Hi,
    I am defining a list as follow.
    IData ORDER_CFGS_VALUE = new IData[1];

    I want to add let us say 10 more values in it, how I can do that?

    Thanks,
    Pras


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


  • 2.  RE: How to create a new RecordList

    Posted Mon March 24, 2003 04:42 AM

    Hi, Pras.

    My first thought is that you should break the Java habit and let webMethods do the nasty work for you.

    Tell us more about what you are trying to accomplish and maybe we can find a cleaner solution for you.

    Please provide as much information as you can to help get the proper answer.

    Thanks.


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


  • 3.  RE: How to create a new RecordList

    Posted Mon March 24, 2003 02:57 PM

    One can create an empty RecordList by creating a defintion of a RecordList in a Flow Map and use Developer to set a value to it (blue arrow) w/o any data in it.

    I do this before a loop that calls appendToRecordList to fill it.

    If the loop is performance sensitive and can be called with more than 5-15 entries, then I use a service that creates a real Java List and use services to add to it and then convert it to an Array after the looping is done.

    See WmSamples samples.complexMapping.largeDoc.messageBuilder for examples of these little services.


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


  • 4.  RE: How to create a new RecordList

    Posted Mon March 24, 2003 10:44 PM

    Pras,
    Once an array has been created, you can’t dynamically increase the physical size of an array. You can do so with objects that implement the java.util.Collection interface, but these have a little more abstraction involved than working directly with arrays.

       You should also only use capitals for a constant reference ([url]http://java.sun.com/docs/codeconv/html/CodeConventions.doc.html)[/url]. 
    
    If you are not sure what these terms mean, you could perhaps consider working through [url="http://developer.java.sun.com/developer/onlineTraining/"]http://developer.java.sun.com/developer/onlineTraining/[/url] or [url="http://java.sun.com/docs/books/tutorial/"]http://java.sun.com/docs/books/tutorial/[/url] . 
    
    You'd need to follow another technique to achieve what you want in Java. As Dan Green said, it's probably better to do it in FLOW. 
    

    Nick_F


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