Hi all,
I am new to webMethods working on version 6. I have a with looping on a document list.
Here is the document structure that will be used as input
- Root(Document)
1.1) Parent(DocumentList)
1.1.1) Child1.1(String)
1.1.2) Child1.2(Document)
1.1.3) Child1.3(DocumentList)
1.1.3.1) Child1.3.1(String)
I have an XML file as input and mapping to a fixed format flatfile. I created the document as
per the input XML file. I do have some more Childnodes repeating down the Child1.3
Following is the occurences of elements
1.1 Parent : 1 or more times
1.1.3 Child1.3 : 0 or more times
Given below are the steps I am using.
- getFile
- XMLStringToXMLNode
- XMLNodeToDocument.
- Loop on parent
4.1) Sequence
…
it is Ok till Step 3. The processing and result after the 3rd step varies depending on the
occurrence of the Document List values in the above structure.
Case#1)
If Parent node occurs only once, the structure will be
1)Root
1.1) Parent
1.1.1) Child 1.1
…
Case#2)
If Parent node occurs more than once, the structure will be
- Root
1.1)Parent
1.1.1)Parent[0]
1.1.1.1) Child1.1.1
…
Here is the problem. The Sequence step with #4.1 will be executed only in Case#2, but not in Case#1, because of the difference in strucutres. My complete logic will be in & after this sequence step. The same problem occurs for all the consecutive repeating Child elements.
How can I loop on the parent node without caring for the occurences?. Is there any wrong in my approach or is there any other way around?
Any help is appreciated.
-Sateesh
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB