Showing posts with label xp20:. Show all posts
Showing posts with label xp20:. Show all posts

Wednesday, June 29, 2011

Oracle BPEL XPath: How to check if a value exists in a list of values?

Use the following XPath function available within the BPEL XPath function library:

xp20:matches(string(bpws:getVariableData('inputVariable','payload','/ns1:RuntimeFaultMessage/ns1:code')),'^(ABCD)$') = true()

Things to remember:

  • Use string (element data) since the bpws:getVariableData returns an Object and not a string and should be converted to string using th string() function.


  • The above function matches if the variable data has the value equals A or B or C or D using the '^(ABCD)$' and this expression can be replaced with other regular expressions for similar comparisons


  • Use true() and not true for comparing the condition
  • Search This Blog