String Tokenizing the XML Text() and combination of substring decides the Flow-XPATH based

I have the XML request containing two information’s. First part of string will indicate

Type of transaction for given Line Of Business and second part of same string will indicate the acknowledgement response type.

Example

<TraverseTo> XML_LoBTransaction_Request_006678X559B2 </TraverseTo>

Using XPATH, I am able to get the text value of <TraverseTo> element as a String.

Say in initial Extract Policy (Preflow of request) with request flow I get the value as text and assign to

String DetermineFlow= XML_LoBTransaction_Request_006678X559B2 using XPATH .

Question: I need to get first part of strings like “LoBTransaction” and secondly the acknowledgement response type like 6678.

Looks like, I need to use Java Script to tokenize them as separate strings and get required substrings after Extract Policy in PreFlow. Like Extract Policy followed by Javascript for String Tokenizing in Preflow of request...

Once I get two separated string values, both values decide the Flow initiation.

I am putting high level flow for logic let me know, if any other recommendations ?

PreFlow : Extract Policy ( To extract <TraverseTo> text value)

Followed by Java script (in PreFlow) for String tokenizing and make sure to split the string and get both parts of string.

And store it in two string variables (like String LoBTransaction and String Ackresponsetype)

This both the String need to be used in “Property Inspector” “default” to determine which flow need to be invoked based on values retrieved from “LoBTransaction” and “Ackresponsetype” using <Condition>

Let me know, if we have any similar sample to refer in case need to implement or design in different or better ways.

0 1 496
1 REPLY 1

what you describe - doing the extracting and parsing in two distinct steps - seems like a reasonable approach to me!