Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
add
add
This feature integrates Governance Registry associations into the Governance Center. Follow the steps below to add an association to a resource using the Publisher.

  1. Log in to the Publisher using admin/admin credentials and the following URL: https://localhost:9443/publisher
  2. Click on the corresponding Asset type, and then click on the artifact from which you want to add the association as shown in the example below.
    select the asset on which you want to add the association
  3. Click the ASSOCIATIONS button in the top menu of the screen.
  4. Select the association type as shown below. For instructions on adding association types, see Managing Dependencies and Associations.
    select association type
  5. Select the asset to which you want to add the association as shown below.
  6. Click the ADD button. You vie the new association added to the list of available associations as shown below.
    list of available associations
  7. Click OVERVIEW in the top menu, and then click the Show Dependency button. You view the graphical representation of all the associations of the corresponding artifact including the new one as shown below.
    graphical representation of associations

...

Code Block
languagexml
 <AssociationConfig>
    <Association type="default">
        <security>policy</security>
        <ownedBy>soapservice,restservice,wsdl</ownedBy>
        <usedBy>soapservice,restservice,wsdl</usedBy>
        <dependancies>soapservice,restservice,wsdl</dependancies>
    </Association>
    <Association type="restservice">
        <security>policy</security>
        <ownedBy>restservice,soapservice,wsdl</ownedBy>
        <usedBy>restservice,soapservice,wsdl</usedBy>
        <dependancies>restservice,soapservice,wsdl,endpoint</dependancies>
    </Association>
    <Association type="soapservice">
        <security>policy</security>
        <ownedBy>soapservice,restservice,wsdl</ownedBy>
        <usedBy>soapservice,restservice,wsdl</usedBy>
        <dependancies>soapservice,restservice,wsdl,endpoint</dependancies>
    </Association>
</AssociationConfig>

Adding a new association type

You can add custom association types in WSO2 G-Reg, and add them to assets using the G-Reg Publisher.

To create a new association type, you can specify it to be available for default or specific asset types by defining the new association type within the defaultrestservice, and soapservice elements in the <G-REG_HOME>/repository/conf/governance.xml file. Default association type denotes all other asset types that are not overridden. The other two association types(i.e restservice, and soapservice)denote the overridden asset types, which are REST Services and SOAP Services. 

For an example, if you want to add a new association named criticalTo, and make it available only for SOAP Services, modify the soapservice association configuration as shown below. The values within the <criticalTo> tag are the comma-separated asset types that you can associate using the criticalTo association type with a SOAP service.

Code Block
<Association type="soapservice">
            <security>policy</security>
        	<ownedBy>soapservice,restservice,wsdl</ownedBy>
        	<usedBy>soapservice,restservice,wsdl</usedBy>
        	<dependancies>soapservice,restservice,wsdl,endpoint</dependancies>
            <criticalTo>soapservice,restservice,wsdl</criticalTo>
</Association>

Viewing the new association type 

Re-start the WSO2 G-Reg server, and then follow the steps 1-4 in the above section, to view the new association type you added above as shown below.

select new association typeImage Added

Click that the CriticalTo combo box to view the SOAP Services, REST Services and WSDLs stored in the Registry that are available for you to associate with the selected asset, using this new association type as shown below.

view the available assets to associateImage Added