...
- Start DAS without a port offset.
- Download and unzip BPS.
- Configure the
bps.xml
file in the<BPS_HOME>/repository/conf
directory by adding the DAS publishing extension mentioned in Configure the DAS publishing extension. - Configure a port offset of 5 in the
<BPS_HOME>/repository/conf/carbon.xml
file. - Upload the KPIProcessthe KPISample.zip BPEL process found inside the
<BPS_HOME>/repository/samples/bpel
directory to BPS. Click on the services list and send a KPISampleProcess request as mentioned below using tryit editor.
Code Block language xml <p:KPISampleProcessRequest xmlns:p="http://samples.bps.wso2.org"> <brand xmlns="http://samples.bps.wso2.org">samsung</brand> <quantity xmlns="http://samples.bps.wso2.org">1</quantity> <total xmlns="http://samples.bps.wso2.org">500</total> <user xmlns="http://samples.bps.wso2.org">test</user> </p:KPISampleProcessRequest>
Send a few request to the BPS process. It would publish this data to DAS and deploy a new stream definition with id ‘org.wso2.bam.phone.retail.store.kpi:1.0.0’.
Commence KPI Monitoring. To do this, do the following.
- Log into DAS.
- Click on Streams under the Manage tab to check the created stream definition.
Click Edit under the Actions column. This will show all the information of the event stream. Do not change anything here for this sample. It will change the stream.
You need to persist the data received from the BPEL process in order to analyse it. Click on the ‘Next[Persist Event]’ button at the bottom.
Select whatever data you need to persist from here and click save stream Save Event Stream.
You must add an event receiver to populate the table you created with data received from the BPEL process. To do this, do the following.
Click on Receivers under the Manage tab.
Click on Add Event Receiver. The following form appears.
Fill the form with following information.
Event Receiver Name: <proper name>
Adapter type: wso2event
Event stream: org.wso2.bam.phone.retail.store.kpi:1.0.0
Message format: wso2event
Submit the form to create new event receiver from BPS.
Now you have setup the infrastructure to receive and analyse event information from BPS. Create a dashboard to visualize the KPI data.
Create a new Dashboard in DAS as instructed in Adding a Dashboard.
Follow the instructions in the ‘Adding a gadget using the gadget generation wizard’ section in the Adding gadgets Gadgets to a layout Dashboard topic. Select ‘ORG_WSO2_BAM_PHONE_STORE_KPI’ as the datasource here.
You can create different types of charts and use different data combinations here.
Add the new gadget to your dashboard.
Now you can visualise the event information using the Analytics Dashboard. Try sending more requests to the BPEL process and note the changes in charts.