WSO2 governance registry is the SOA (Service Oriented Architecture) governance model of the wso2 product catalogue. If you are an enterprise that has a lot of SOA artifacts to be stored or governed, you might find wso2 GREG as a handy tool. GReg provides SOA artifacts manipulation in two aspects – as a meta data repository and a governing software.
Out of the box it supports following artifact types to be stored.
- SOAP services
- REST services
(WSDL, WADL, Policy and Schemas are also known as content type artifacts.)
SOA governance might run beyond the limits of known ready to go artifacts. i.e: Different stages of SOA governance probably need more types of artifacts to be maintained. planning governance stage will probably ask you to store profiles of different supplements and then move them through different life cycle stages. Development artifacts probably run beyond the known descriptive models. But fret not, answer is just a tab ahead in GReg.
Governance registry supports extension of artifacts, life cycles and handlers. This post will describe how to use artifacts extension model of GReg to store more artifacts.
Customizing an existing artifact type
Registry extensions are defined in a file that has the extension .rxt (registry extension). You can edit the rxt file as you wish at Extension tab of management console.
- Browse the Rest services RXT from Management console. (Extensions > Configure > RXT types)
- Select View/Edit for Rest Services.
- Add following after the version field and save the RXT.
- You will see the custom field when you add a new REST service next time and on asset overview page of existing rest service artifacts after version field.
- To make the custom field visible on store you need to add it specifically on Store. (To make sure you make it visible for store users). Add following snippet to <GREG_HOME>/repository/deployment/server/jaggeryapps/store/extensions/app/greg-store-defaults/themes/store/partials/asset-attributes.hbs file after version.
Adding a new artifact type
You might probably need to add different type of business governing artifacts considering the scenario. Suppose you need to add an newly arrived inventory to the GReg. (Well, you can use GReg as a inventory management software as well)
Move to Extensions -> Artifact Types of Carbon console and click on add new artifact.
Enter the following xml description for a new inventory.
Then save the artifact descriptor and go to the Governnace Publisher URL. (https://localhost:9443/publisher)
Log in as the carbon user admin (user:admin, pw:admin) and see if our newly added inventory asset type is available. Now you are ready to add new inventory to the repository.
Add new asset and view it on Governance Store. (https://localhost:9443/store)
Please note that you have to make the custom fields available by modifying <GREG_HOME>/repository/deployment/server/jaggeryapps/store/extensions/app/greg-store-defaults/themes/store/partials/asset-attributes.hbs file.