2024-05-06

1. Introduction

To get as loosely coupled to Enovia data model as possible use extensions to just tell schema-tool to make sure the defined entities are added to the specified administrative object. E.g. if to modify the global toolbar by adding a command to it just define an extension without defining the complete menu, this way an upgrade will be easy as the Enovia definition could change without affecting the schema-tool definition. It is also easier to see the intention of the modification.

1.1. Supported admin objects

  • Attribute

  • Command

  • Group

  • Menu

  • Relationship

  • Type

2. Samples

2.1. Attribute

<?xml version='1.0' encoding='UTF-8'?>
<extension>
    <attribute>
        <name>{attribute_Currency}</name>
        <default>SEK</default>
        <maxlength>55</maxlength>
        <multivalue />
        <notMultivalue />
        <multiline />
        <notMultiline />
        <resetonclone />
        <notResetonclone />
        <resetonrevision />
        <notResetonrevision />
        <rangevalue />
        <notRangevalue />
        <addRanges>
            <equal>Swiss Franc</equal>
        </addRanges>
        <removeRanges>
            <equal>Euro</equal>
        </removeRanges>
    </attribute>
</extension>

2.2. Command

<?xml version='1.0' encoding='UTF-8'?>
<extension>
    <command>
        <name>{command_APPAccess}</name>
        <href>${COMPONENT_DIR}/emxRouteMemberSummaryFS.jsp</href>
        <alt>alt_CHANGED</alt>
        <addSettings>
            <setting>
                <name>Access Program</name>
                <value>emxENCActionLinkAccess</value>
            </setting>
            <setting>
                <name>Access Function</name>
                <value>isEBOMemxTable</value>
            </setting>
        </addSettings>
        <removeUsers>
            <user>{role_Buyer}</user>
        </removeUsers>
        <addUsers>
            <user>{role_DesignEngineer}</user>
            <user>{role_Employee}</user>
        </addUsers>
    </command>
</extension>

2.3. Group

<?xml version='1.0' encoding='UTF-8'?>
<extension>
    <group>
        <name>{group_Admins}</name>
        <site>China</site>
        <addParents>
            <group>{group_Responsible}</group>
        </addParents>
        <removeParents>
            <group>{group_NonResponsible}</group>
        </removeParents>
    </group>
</extension>
<?xml version='1.0' encoding='UTF-8'?>
<extension>
    <menu>
        <name>{menu_type_SeasonalPlan}</name>
        <addItems>
            <menu>{menu_SomeMenu}</menu>
            <command>{command_ AOLineAssortment }</command>
        </addItems>
    </menu>
</extension>

2.5. Relationship

<?xml version='1.0' encoding='UTF-8'?>
<extension>
    <relationship>
        <name>{relationship_Relationship}</name>
        <preventDuplicates />
        <addAttributes>
            <attribute>{type_Attribute1}</attribute>
        </addAttributes>
        <from>
            <addTypes>
                <type>{type_Type2}</type>
            </addTypes>
        </from>
    </relationship>
</extension>

2.6. Type

<?xml version='1.0' encoding='UTF-8'?>
<extension>
    <type>
        <name>{type_Type}</name>
        <addAttributes>
            <attribute>{attribute_Attribute2}</attribute>
        </addAttributes>
        <removeTriggers>
            <trigger>
                <event>create</event>
                <invocation>action</invocation>
            </trigger>
        </removeTriggers>
    </type>
</extension>