Composite Structure Groups

It helps to combine multiple <structure-group> from the same or other resources and use it for your current resource.

Possible Locations

Child Elements

Example

Consider that you want to merge two structure groups for a resource that you are currently working on. The requirement is to merge two different structure groups and produce a new <structure-group> with structures of all possible combinations.

Following is how the composite structure group would work,

You have the following two structure groups 1 and 2 with the specified structures as,

copy

- structure group one: structure A, structure B
- structure group two: structure C, structure D 

Now a composite structure group will merge all these four structures and produce a new structure-group with the below structures,

copy

composite structure group: structure AC, structure AD, structure BC, structure BD

Here is how you have to declare the composite structure groups,

copy

<composite-structure-groups>
    <structure-group name="one">
        <structure name="A">
            <property type="string"/>
            <property name="FieldTwo" type="string"/>
        </structure>
        <structure name="B">
            <property name="FieldThree" type="string"/>
            <property name="FieldFour" type="string"/>
        </structure>
    </structure-group>
    <structure-group name="two">
        <structure name="C">
            <property name="FieldFive" type="string"/>
            <property name="FieldSix" type="string"/>
        </structure>
        <structure name="D">
            <property name="FieldSeven" type="string"/>
            <property name="FieldEight" type="string"/>
        </structure>
    </structure-group>
</composite-structure-groups>

ZEST will convert this element as shown below and use it in its constituents (Development, Automation, SDKs and Help Documentation).

copy

<structure-group name="onetwo">
    <structure name="AC">
        <property name="FieldOne" type="string"/>
        <property name="FieldTwo" type="string"/>
        <property name="FieldFive" type="string"/>
        <property name="FieldSix" type="string"/>
    </structure>
    <structure name="AD">
        <property name="FieldOne" type="string"/>
        <property name="FieldTwo" type="string"/>
        <property name="FieldSeven" type="string"/>
        <property name="FieldEight" type="string"/>
    </structure>
    <structure name="BC">
        <property name="FieldThree" type="string"/>
        <property name="FieldFour" type="string"/>
        <property name="FieldFive" type="string"/>
        <property name="FieldSix" type="string"/>
    </structure>
    <structure name="BD">
        <property name="FieldThree" type="string"/>
        <property name="FieldFour" type="string"/>
        <property name="FieldSeven" type="string"/>
        <property name="FieldEight" type="string"/>
    </structure>
</structure-group>

Last Updated 2025-05-30 16:54:59 +0530 IST

ON THIS PAGE