Adding a new instance of element in Mapper actually adds two instances.

Adding a new instance of element in Mapper actually adds two instances.

book

Article ID: KB0094115

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:
Assume that there is an element, elem2, which has the definition below:

<xs:element ref="elem2" minOccurs="0" maxOccurs="unbounded"/>

When creating the duplicate instance of this element in the mapper->input, there would be one additional instances shown in the Input tab. 


Symptoms:
An extra instance of the element added on duplication.
Cause:
This is expected behavior and the additional instance is just a suggestion.

Issue/Introduction

Adding a new instance of element in Mapper actually adds two instances.

Resolution

This is expected behavior. The second node added is to suggest to the user that this element can be repeated. It shows how many occurrences are allowed in the current situation. For example, if the element definition is as follows,

<xs:element ref="elem2" minOccurs="0" maxOccurs="unbounded"/>


when creating the duplicate in the mapper->input, there would be one additional instance shown in the Input tab. Refer to the attached screenshot (Filename: Duplicateunbound.PNG). If the definition of the element "elem2" is changed as follows,

<xs:element ref="elem2" minOccurs="0" maxOccurs="10"/>

when a duplicate instance of the element is added, it will show an additional instance as elem2(0,8). Refer to the attached screenshot (Filename: duplicationwith10elements.PNG). This is a suggestion that there could be an additional nine instances of "elem2".

After duplication, there are two elements that has mapping on it and  they are what actually shows in XSLT. The marker node (the second instance of the element is merely a "marker", meaning that it is visible only to demonstrate that another element of that type could be added if the user wished) at the end is merely there to indicate the allowed occurrence. Note that if clicking on the activity again and then checking the number of elements, the duplicate element will not be there. The second node (or anything like elem2 (n1..n2)) added is a suggestion to the user that this element can be repeated. It shows how many occurrences are allowed in the current situation. 

Additional Information

There was defect filed for this with AMBW-20970 and was closed by the engineering as "not a bug".

Please refer to the attached sample project MapperIssue.zip and screenshots Duplicateunbound.PNG and duplicationwith10elements.PNG

Attachments

Adding a new instance of element in Mapper actually adds two instances. get_app
Adding a new instance of element in Mapper actually adds two instances. get_app
Adding a new instance of element in Mapper actually adds two instances. get_app