rbeckman-nextgen / test-mc6

0 stars 0 forks source link

Iterator may insert new segments in wrong order #4208

Open rbeckman-nextgen opened 4 years ago

rbeckman-nextgen commented 4 years ago

If you iterate over a segment that is not the last one in your outbound message, new segments won't be inserted correctly.

Printscreens and channel sample added to illustrate.

Imported Issue. Original Details: Jira Issue Key: MIRTH-4356 Reporter: atom Created: 2018-12-19T05:27:08.000-0800

rbeckman-nextgen commented 4 years ago

If you remove the GT1 from your outbound template it will work. The way e4x works is that if you assign a value to tmp.AL1\[i] and there exists an element with an index of i it will use it. If i is greater than or equal to the length of the XMLList tmp.AL1 it will append a child to tmp not insert (how would it know where you meant to put it?)

Imported Comment. Original Details: Author: agermano Created: 2018-12-21T14:15:59.000-0800