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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

Checking for blank values

  • 1.  Checking for blank values

    Posted 04/12/05 05:26 PM

    Hi experts,
    I need to execute a condition where a particular value is not equal to blank.can u please tell me how to do that.(i tried a branch step with switch condition by leaving the Label property blank (empty).It doesnt work can some one plz help me

    Thanks in advance

    saritha


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


  • 2.  RE: Checking for blank values

    Posted 04/12/05 06:25 PM


  • 3.  RE: Checking for blank values

    Posted 04/12/05 07:12 PM

    Use /[^ ]/ as the label of the step you want to execute when the string is not null or empty or only spaces.

    This article may be helpful too.
    [url=“wmusers.com”]wmusers.com


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


  • 4.  RE: Checking for blank values



  • 5.  RE: Checking for blank values

    Posted 04/12/05 07:29 PM

    This works if the field itself populating or not populating
    .
    Branch on the field(specify path) and under that use Sequence and set Label property to $null and sequence $default if value exits

    If field exits and comes the blank value then use pub.string:length so branch on the /length and put sequences length >0 or length=0 this will check the whether field is blank or not.

    HTH,
    RMG


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


  • 6.  RE: Checking for blank values

    Posted 04/12/05 07:34 PM

    Also you can make use of RegularExpressions on the Labels as Rob mentioned above.

    For more information on how to use Regular Expressions and diff types,see the DeveloperUsersGuide.pdf.

    HTH,
    RMG.


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


  • 7.  RE: Checking for blank values

    Posted 04/12/05 10:33 PM

    can u please send me a screen of what u told above


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


  • 8.  RE: Checking for blank values

    Posted 04/12/05 11:25 PM

    Please make use of Regular Expressions,its easier and minimal code is required.


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


  • 9.  RE: Checking for blank values

    Posted 04/18/05 11:36 AM

    Saritha,

    I’ve re-read your original question, and actually I find it a little ambiguous. What you mean by “blank” value, is it a space, empty string, or any white-space values? Using RegEx, you can have a condition to match any or all of the above. If you just want to match empty string, you can do something like %/EDI850/ISA06% == ‘’, but I digress…


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


  • 10.  RE: Checking for blank values

    Posted 04/21/05 02:52 PM


  • 11.  RE: Checking for blank values

    Posted 04/21/05 07:06 PM

    I have used a label of one single space for a key that I am BRANCHing on. If it is a variable number of spaces then a label of /^ *$/ should work identifying all strings that are only spaces.


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


  • 12.  RE: Checking for blank values

    Posted 04/22/05 05:07 AM

    I don’t think I’ve seen this anywhere, so I’ll present a “Best Practice” of mine regarding RegEx.

    Out here where I work (Taiwan), there seems to be a amazing lack of IT workers fluent with RegEx. Often when RegEx is used in services (or TN Doc Attrib queries for that matter), I have to worry about two things: 1) person(s) taking over maintenance of service might not understand (totally or partially) what I’m trying to achieve with particular RegEx; or 2) Somebody with better understanding of RegEx might spot what he/she thinks is an error, but cannot be sure.

    To alleviate the problems, I always ask our developers to Comment their services, especially for RegEx.

    Which comes back to why I’m writing this. Just nitpicking (but could be an important difference to some applications) Fred’s example of /^ *$/. Since Fred said what he was trying to achieve, it let me spot something: the example will match variable number of spaces, included zero(0) spaces, AKA empty-string. What we want to match is one (1) or more spaces, which would be /^ +$/


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