Service Connect Issue with subworkflow

I am adding a sub workflow to a main workflow to process sales orders. the sub workflow should loop through the lines node on the XML and create a line for each.
This is what is currently happening:
The XML I am using has 20 line nodes on it. When processing it creates all the lines, but they all have the data from the first line node.
Anyone have any ideas?

Hi Marc,

I would suggest looking closely in document tracking – what data is sent into each sub-workflow iteration.

In order to send each line into a separate call of a sub-workflow, you set the XPath in the sub-workflow element, to let the workflow iterate through your XML message.
Take a closer look at that XPath – whether it is picking up the data you need.

I had a call with Epicor support and found the issue. Before the sub-workflow call I was sending the XML source data to a container under usr. I moved it to point to the dta section and re-did the cycling and generated a subworkflow schema. Then correctly mapped the child node of the schema to the child node inside the sub-workflow and it worked.