[Download] | [Documentation Home] | [Release Note]
This sample demostrate how data services are invoked inside a gadget using REST calls. Following sample provides database operations such as insert, update, delete and retreive data; further, it provides a mechanism to analyze data in a barchart format.
The sample data services should be deployed as per the instructions mentioned in Deploying Samples section.
The scenario is based on a possible database used in a small company to handle its internal affairs. Such information about the products that are produced in the company.
There are seperate queries/resources written for specific operations; resources are defined inorder to access data through REST calls. The resources implemented in the service are listed as follows.
The product analysis gadget calculate number of products for a product line and create a bar chart according to the result. Whenever a product is modified/inserted the barchart is refreshed accordingly. This functionality is provided using the WSO2 Gadget Server inter gadget comunication feature.
Figure 2: Products Chart
The product information gadget retreive all products and displays product infomation in a table format and refresh data according to data management.
Figure 3: Products Information