I just noticed that there was a few questions on a “competing” discussion group (no, not Advantage) about being able use a single FLOW step to determine if a string if null, empty, has spaces, etc. I thought I’d share some info on using regular expressions as labels.
The syntax is described in an appendix in the B2B Integrator/IS Developer Guide. For labels, the expression must be surrounded by slashes.
Here’s a flow example:
BRANCH on ‘/tailOfAK5’
/.+/: MAP (tailOfAK5 has one or more chars, maybe spaces)
$default: SEQUENCE (tailOfAK5 is empty or null)
Selected if branch switch has one or more characters, including just spaces. Strings that are $null or are empty will not be selected by this label (e.g. the branch won’t take this path). Strings that have only spaces WILL take this branch.
Selected if branch switch starts with the characters “ISA”.
Selected if branch switch not null, not empty, and contains at least one non-space character.
Selected if branch switch not null, not empty, and contains at least one non-whitespace character.
This regular expression works only on strings. If you have a document, it won’t work as you seem to expect. An “empty” document isn’t a common thing to test for (other than comparing with $null)–usually you test for the presence of a field or two within the document.