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

B2B TIP: Use regular expressions for labels

  • 1.  B2B TIP: Use regular expressions for labels

    Posted Tue January 08, 2002 03:27 PM

    Using regular expressions can greatly simplify your BRANCH constructs. The regular expression appendix in the B2B Integrator Guide describes the syntax. The regular expression in a label must be surrounded with slashes. A couple of examples:

    /.+/
    Tests for one or more characters. Strings that are $null or are empty will not be selected by this label (e.g. the branch won’t take this path)

    /^ISA/
    Tests that the string starts with the characters “ISA”.

    FLOW example:

    BRANCH on ‘/tailOfAK5’
    /.+/: MAP (tailOfAK5 has one or more chars)
    $default: SEQUENCE (tailOfAK5 is empty or null)


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 2.  RE: B2B TIP: Use regular expressions for labels

    Posted Fri January 18, 2002 03:57 PM

    There also a way to make the regular expression complex expressions.

    In the Flow Branch properties set Evaluate Labels to true. Then each of the labels of the steps inside the Branch will be evaluated through an expression evaluator that supports &&; || and other boolean operators (the same type of expressions that can be added to a Flow Map Copy).

    For instance, in my negative test cases after a call to WmPublic pub.flow:getLastError, I have the following expression as the label for my Success case:

    %lastError/error%=%expectedErrorMessage%

    The fail case has the label $default.


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB