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.  Document list element missing

    Posted Fri November 14, 2003 10:04 PM

    Hi,
    I am looping over a document list. Now, in that document, one of the element may be missing its value. If the value is missing in that element, i want to execute an sql command. Its its not missing the value, I will map it to some other record.

    i used a map step after the loop, and then used branch step to check if the value in that element is null or not. But, its not giving me the proper results.

    Any help would be appretiated.
    Thanks


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


  • 2.  RE: Document list element missing

    Posted Fri November 14, 2003 11:06 PM

    IS the map step is inside or outsite the loop?As your comments lit bit confuses.

    Is your Branch operation is based on (evaluate-labels = true or false)?

    There might be chances that your Branch operation logic (value in that element is null or not) is missing some thing.Can you elaborate more about the branch step logic that you used.

    HTH.


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


  • 3.  RE: Document list element missing

    Posted Sat November 15, 2003 06:23 PM

    MAN,

             BRANCH (Without a switch and evaluate labels to true) 
    SEQUENCE: %val% = $null 
    INVOKE: sqlCommand 
    SEQUENCE: $default 
    MAP: Do the Mapping 
    
    
    If you're having such a construct, it may fail to check the non-existence of "val" in pipeline for cases when "val" is existing and is an empty string "" (not null).  One instance where such things happen is when you process a document constructed out of an XML with tags with out any content i.e..e <tag/>.  These are not missing tags.   
    
    You may wish to include the condition for checking empty values also. 
    

    BRANCH (Without a switch and evaluate labels to true)
    SEQUENCE: %val% = $null || %val% = “”
    INVOKE: sqlCommand
    SEQUENCE: $default
    MAP: Do the Mapping

    Please elaborate on your question if this doesn’t solve your problem.


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


  • 4.  RE: Document list element missing

    Posted Sun November 16, 2003 12:52 AM

    See [url=“wmusers.com”]wmusers.com for a discussion on using regular expressions in statement labels to be able use a single FLOW step to determine if a string is null, empty, has spaces, etc.

    -M


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


  • 5.  RE: Document list element missing

    Posted Mon November 17, 2003 07:02 PM

    Hi,
    Sorry for late reply. I followed Sudheer Dhurjati solution and got the correct results. Actually, I was missing the “” checking (%val% = “”) in the sequence. I was only checking it with the null keyword.

    Thanks for all of you for the help and making my problem solved.


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