Adding instances in repeating structures

Before you start:

See Repeating mappings.

The following diagram shows a repeating structures tree node partially expanded.

message1
   |_ top
      |_ middle[]
         |_bottom[]
      |_ middle[1]
         |_bottom[]
         |_bottom[All]
         |_bottom[1]
In the example an entry followed by [] is referred to as a repeatable node, one followed by [All] is referred to as an all node, and one followed by [1] is referred to as an instance element node.
To expand a structure to show more instances, right-click the repeatable node and select one of the appropriate expansion options available from the pop-up menu. The options available are:
  • Create One Instance

    This option creates the next sequential instance not already created.

  • Create Maximum Possible Instances

    This option creates remaining instances up to the maximum that have not already been created.

  • Create Instances (Specify)

    This option creates the specified number of new instances starting from the next sequential element not already created.

Expanding one node alone creates a single element with a single child, so you might find it simpler to expand to the maximum number of nodes and delete any instances that you do not want. You can re-create them later if you decide you do want them after all.
The following example consists of two messages:
  1. Message 1 comprises a number of givenname elements (maxOccurs 2) followed by a single surname element:
    message1
    	|_  givenname
    	|_  surname
  2. Message 2 also represents a name, but distinguishes between firstname and lastname as separate elements and groups all middle names using a single middlename element:
    message2
    	|_  title
    	|_  firstname
    	|_  middlenames
    	|_  lastname
If you create a mapping from message1 (Source) to message2 (Target), you will see the following tree structure in the Source view of the Message Flow Mapping editor:
message1
	|_  givenname[]
	|_  givenname[All]
	|_  givenname[1]
	|_  surname

Related concepts
Mapping conditions
Repeating mappings

Related tasks
Removing instances in repeating structures
Adding a repeating mapping

Related reference
Mappings
Repeating structures conditions