wso2soawso2-governance-registry

How do you create an association based on the option entry in WSO2 Governance Registry?


I have an artifact type called "Application Instance".

<table name="Endpoints">
    <subheading>
        <heading>Type</heading>
        <heading>Reference</heading>
    </subheading>
    <field type="option-text" maxoccurs="unbounded" path="true" url="true">
        <name>Endpoint</name>
            <values>
                <value>Provided</value>
                <value>Consumed</value>
            </values>
    </field>
 </table>

I would like to create relationships depending on this configuration, similar to.

<relationships>
<association type="isConsumedBy" source="@{endpoints_consumed:endpoint}"/>
<association type="isProvidedBy" source="@{endpoints_provided:endpoint}"/-->
</relationships>

Is there a way to do that or do I need to create two tables, each having only one option?


Solution

  • You will need two tables or you will have to create a handler, http://docs.wso2.org/wiki/display/Governance453/Handlers. Please note that using a handler you will have to programmatically create the associations, after parsing the XML payload.

    Best Regards, Senaka.