Building an Issue Management System with the Platform
This example shows how the platform can be used for the management and creation of issue.
This example uses the JavaScript API to communicate with the platform. Learn more about this API at: /wiki/spaces/PT/pages/52592648.
The example is available at https://lab.onesaitplatform.com/web/issue-manager/index.html
You can download it compressed from here: issue-manager.zip
or you can clone the platform's example repository: https://github.com/onesaitplatform/onesait-cloud-platform-examples then go to the example-issue-management folder.
First, you must create an ontology to represent the issues and assign it to a device with permissions. The following ones must be defined in the issueController.js file:
- Ontology
- Device
- Device instance
- Device token
- URLs IoTBroker and OAuthServer
In this case, elements already predefined in the platform have been chosen. If you need to create a new ontology to store the issues, create an Ontology choosing "EmptyBase" as its schema. Then, fill in the following fields:
Then, you must create a device associated to the ontology that you have just created. Use the token associated to that device to access it from the JavaScript API.
To create an issue, click on "Send". Then, fill in the form that appears with the data about the request and press the "Send Issue" button. This will return an ID of the issue.
If your user has permissions to manage issues, you can view them by pressing the "Search" button. In order to display the requests, you must first log in.
Once authenticated, you can review all the issues and update their status if you want. If you modify an issue, a flow is activated in the flow engine and a notification is sent via e-mail to the issue creator.