Versions Compared

Key

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

WSO2 Governance Registry supports building arbitrary asset models using its support for Configurable Governance Artifacts (RXT). In this example, we will be learning how to build a Request Backlog for Governance Registry. Whilst we would recommend using a full blown issue tracking system such as Atlassian JIRA in a production system, there often can be the requirement to have a miniature version as a part of the Registry itself. This would allow users to create issues that would later get actioned. The reporter of the issue can also take advantage of the Notifications functionality provided by the Governance Registry to get updated as the request gets processed.

This sample will make use of three significant features of Governance Registry.

  1. Configurable Governance Artifacts (RXT)
  2. Notifications
  3. Lifecycle Management

Please follow the step-by-step process to setup and run this sample while learning how to make use of various features of Governance Registry:

...

1. Start the WSO2 Governance Registry. See Starting Governance Registry Management Console on Windows or Starting Governance Registry Management Console on Linux.

2. Navigate to the Resource Browser of Governance Registry and add a new resource as text content with the following parameters:

...

Click the "Add" button to finish adding the text content.

Image RemovedImage Added

Read more on Text Content Creation.

3. Sign-out and Sign-in.

4. Now you can see "Issue" and "Backlog" in the "Metadata Add" and "Metadata List" panes.

Image RemovedImage Added

See also Deploying an Extension File.

Creating New Issues

1. Click "Issue" in the "Add" pane.

2. Fill in the issue details. In this case, John Smith has reported an issue requesting a new service.

Image RemovedImage Added

Click the "Save" button to submit the form.

3. You should now see you issue appearing on the backlog.

Image RemovedImage Added

Creating an Issue Lifecycle

...

2. Click "Add New Lifecycle" to add a new lifecycle.

Image RemovedImage Added

3. Copy the content below into the text area:

Code Block
languagehtml/xml
<aspect name="IssueLifecycle" class="org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle">
    <configuration type="literal">
        <lifecycle>
            <scxml xmlns="http://www.w3.org/2005/07/scxml"
                   version="1.0"
                   initialstate="Open">
                <state id="Open">
                    <datamodel>
                        <data name="transitionValidation">
                            <validation forEvent="Start" class="org.wso2.carbon.governance.registry.extensions.validators.AttributeExistenceValidator">
                                <parameter name="attributes" value="details_assignee"/>
                            </validation>
                        </data>
                    </datamodel>
                    <transition event="Start" target="In.Progress"/>
                    <transition event="Close" target="Closed"/>
                </state>
                <state id="Reopened">
                    <datamodel>
                        <data name="transitionValidation">
                            <validation forEvent="Start" class="org.wso2.carbon.governance.registry.extensions.validators.AttributeExistenceValidator">
                                <parameter name="attributes" value="details_assignee"/>
                            </validation>
                        </data>
                    </datamodel>
                    <transition event="Start" target="In.Progress"/>
                    <transition event="Close" target="Closed"/>
                </state>
                <state id="In.Progress">
                    <transition event="Resolve" target="Resolved"/>
                    <transition event="Close" target="Closed"/>
                </state>
                <state id="Resolved">
                    <transition event="Reopen" target="Reopened"/>
                    <transition event="Close" target="Closed"/>
                </state>
                <state id="Closed">
                    <transition event="Reopen" target="Reopened"/>
                </state>
            </scxml>
        </lifecycle>
    </configuration>
</aspect>

Image RemovedImage Added

Click the "Save" button to finish adding the lifecycle configuration.

4. The lifecycle should now be successfully added.

Image RemovedImage Added

See also Adding Lifecycles.

Associating The Lifecycle to Issues

...

Info
titleTip

You need to click on the title of the issue to open it in the Resource Browser. This is possible because we have configured our registry extension in way that the title of the issue will hyperlink to the corresponding resource on the Resource Browser. Learn more about the UI Element of the Governance Artifact Configuration Model.

2. Expand the Lifecycle portlet and select the IssueLifecycle from the drop down.

Image RemovedImage Added

Click the "Add" button to associate the IssueLifecycle with the Add New Time Tracker Service issue.

3. You should now see that the Lifecycle has been successfully associated.

Image RemovedImage Added

4. Navigate to the Backlog to see the Lifecycle state now being listed on the issue list.

Image RemovedImage Added

See also Managing Lifecycle.

Subscribing To Notifications

1. Open /_system/governance/backlog in the Resource Browser. See also Managing the Resources.

2. Add a hierarchical subscription covering all resources including grand children for the Change LC State event for everyone.

Info
titleTip

Subscribing everyone would mean that each and every user on Governance Registry (which includes John Smith) will get notified. We have selected Management Console as the notification method. This might not always be the case. See Managing Subscriptions for more information. Please also note you need to enable the work list for Management Console notifications to work. Read more on Configuration for Work List. If the server is already running, you will have to shutdown and restart the server. If you have not done this before, please make the necessary changes and repeat from the previous step.

Image RemovedImage Added

3. Click the "Subscribe" button to add the subscription.

Image RemovedImage Added

4. Navigate to the Backlog to see the issue list, and open an issue that has already been raised. In this example, we'll be taking the Add New Time Tracker Service issue.

Info
titleTip

You need to click on the title of the issue to open it in the Resource Browser. This is possible because we have configured our registry extension in way that the title of the issue will hyperlink to the corresponding resource on the Resource Browser. Learn more about the UI Element of the Governance Artifact Configuration Model.

5. Expand the Lifecycle portlet and press the "Start" button.

Image RemovedImage Added

6. Refresh the page and observe the notification appearing on the Management Console.

Image RemovedImage Added

See also Management Console Notifications.

7. Resolve the issue by clicking on the "Resolve" button in the Lifecycle portlet.

Image RemovedImage Added

8. Refresh the page to observe more notifications.

Image RemovedImage Added

This brings to the end of this sample. The focus of this sample was a very basic yet complete issue tracker using Governance Registry. Read through the various links to get a better understanding on how to fine tune this sample to meet specific requirements.

...