- Branch header->status
- /^2[0-9][0-9]$/ (OK)
- /^4[0-9][0-9]$/ (Non retry enabled error)
- /^5[0-9][0-9]$/ (Retry enabled error)
I've been working with webMethods for about a year now (wow, 3 years now) and I have found there are lots of items that are hard to figure out via the documentation and very few posts on the web about them. I thought I'd post them here as I find them to help out other people (hopefully).
Monday, February 27, 2012
Branch and regular expressions
I don't know why but it just never clicked. You can use regular expressions as the labels on your branch step even when evaluate labels is false. A simple example is checking the http status values from a RESTful call:
Subscribe to:
Post Comments (Atom)
Can you just elaobrate on usage of /^2[0-9][0-9]$/ value?
ReplyDeleteas what means what in this?
The ^ means start at the beginning. The 2 is literal, so it starts with a 2, and then 2 more numbers from 0-9, then the $ means an ending value.
DeleteBasically, that looks for all HTTP 200 series messages.
The /^4[0-9][0-9]$/ looks for all 400 series HTTP errors and the /^5[0-9][0-9]$/ looks for all 500 series HTTP errors.
The ^ and $ make sure that something like 2000 won't match or 0200 won't match either.
hi,
ReplyDeleteI am trying to take input as a document reference list. Under which there is a field 'Transport Mode'. I have to apply a logic, in the way, if the Transport Mode is AIR it should go in TRANS_AIR name document list, Else, it should go to some other Output list. I have applied MAP->Loop(Over the list)->Branch (Evaluate Label: True)->%Transport Mode%=="AIR":Sequence->MAP..But its not working..Could you please help me in this regards
Thanks
Surabhi Shah