Webmethods Optimize For process : Web Service Data Collector Tutorial

This tutorial is explaining in details how to use webmethods optimize web service data collector. So it is strongly recommended to read our first post regarding the Optimize for process if you are not familiar with webmethods Optimize for process.

Here is the link to the first tutorial:

https://webmethodsexpert.com/2014/07/20/webmethods-optimize-for-process/

As we discussed in the last tutorial, you can use the web service data collector to send events to webmethods Optimize for process to calculate and monitor the important KPIs and statistics of your business.

You can use the web service data collector to send data for optimize from a step in your business process, or from a flow service, or even from a non-webmethods program.

Note: all the information in this tutorial is for webmethods version 8.2 After applying the latest fixes. The information should be valid for webmethods version 9.x.

Let’s go directly into the steps to call the web service data collector from webmethods flow service:

  1. Make sure that the web service data collector is installed and its wsdl is accessible. Here is the url for the wsdl:

     http://datacollectorServer:12603/services/WSDimensionalDataCollector.wsdl

Replace the ‘datacollectorServer’ with the server name of the data collector. In the below screen shot we replaced it by ‘localhost’.

wsdl web service DC

      2.  Open SoftwareAG designer, and connect to the integration server.

     3. Create a new web service Descriptor from the main menu –> File –> New –> web service Descriptor.

new web Service Descriptor

    4. Choose the location of the new descriptor and it’s name. We will call the new web service descriptor wsDataCollectorClient. Then click ‘Next’.

    5. Choose to create the descriptor as ‘Consumer’, and click ‘Next’.

new WS Descriptor

        6. In the Source location, choose ‘File/Url’: enter the link of the web service data collector that we verified in earlier step, and then click ‘Finish’.

select WSDL location

   7. Please go to the package/folder used to create the new descriptor, and you will find the new WS descriptors, and the connectors (operations/services) and ready for use.

wsDC folder structure

    8. To send event to webmethods Optimize for process use can call the new generated connector ‘IMonitorDataCollector_addEvent’.

    9. Here is an example for calling the ‘IMonitorDataCollector_addEvent’:

publish to optimize flow service

attributes values

Input parameter

Value

Description

tns:addEvent

    eventType

SalesReport

The name of the event as will be seen in the MWS after sending the first event.

    tns:Event.attribtes

         n5:BusinessDataValue[0]

first element in array of fields/Attributes in the event

                      name

Quantity

field name in the event ‘SalesReport’

                      value

1

The value of the field

         n5:BusinessDataValue[1]

first element in array of fields/Attributes in the event

                      name

Product

field name in the event ‘SalesReport’

                      value

Mac Book Pro.

The value of the field

     10. We will run the service once to send the new event to Optimize.

     11. Please go to MWS –> Administration –> Analytics –> KPIs –> Business Data, and you will see the new event ‘SalesReport’ under the unmapped event.

new event in MWS

     12. If you click on the new event ‘SalesReport’, you will see the two fields ‘Quantity’, and ‘Product’ ready to be configured.

event details in mws

This is the end of this tutorial. Please check section 3 ‘Configuring the new Events in Optimize through MyWebmethods.’ from our webMethods Optimize for Process Guide to complete configuring the event in webmethods Optimize.

https://webmethodsexpert.com/2014/07/20/webmethods-optimize-for-process/

We are looking forward reading your comments and questions.

Follow us:

on twitter: @WM_Expert

LinkedIn group: webmethodsExpert.com

(C) 2014 Hossam Elsharkawy. All rights reserved.

Webmethods Optimize for Process

Introduction

webMethods ‘Optimize for process’ is component which is responsible for monitoring the customer requests, generating statistics, calculate the KPIs, and notifying you with any violation for the rules you define to monitor your business process.

In this article we will cover the following:

  1. The possible options to send data to ‘Optimize for business process’.
  2. How to send data from ‘WM Business Process’ to Optimize.
  3. How to send data from ‘WM flow service’ or any third part application.
  4. How to configure a new event in Optimize through ‘MyWebMethods’
  5. Configure KPIs, and Dimension.

Note: all the information in this article is based on webMethods version 8.2.

1. Possible options to send data to Optimize for Business Process.

There are two ways to send data to Optimize:

  1. Use the data in the ‘Business Process’ Model pipeline and the model will send it automatically with doing some configuration in the model using ‘SoftwareAg Designer’ and in the business process configuration through MWS.
  2. Use the Web service Data collector to send the information you need to the Optimize. In this case you will have to extract the WSDL from the WS Data collector, generate the client using softwareAG designer or any other third-party application, and finally call it with the target parameters.

Regardless the option you choose from the two previous options to send the data to Optimize the rest of the configuration in the Optimize will be the same.

2. Sending data to optimize using ‘webMethods Business Process’.

To send data to Optimize through ‘WM Business Process’, follow the following steps in SoftwareAG Designer:

1. Create your model and define the inputs and outputs for each step.
2. Click on the step which has the information ready to be sent, and open the properties-> logged fields.

logged feilds

3. In the logged fields tab, choose the document which contains the information you want to send.
4. Build the model and deploy it.
5. Go in the MWS –> Business –> Business Processes.
6. Make sure that the option ‘Analysis Enabled’ is checked, if not click on ‘EDIT’ and enable it.

Business Process Enabled

7. Run one instance of your model, by publishing the subscription document to the model. The model will send the event automatically to Optimize.
8. Check the new events In MWS under ‘MWS –> Analytics –> KPIs –> Business data’. The event will be under unmapped event types with the name of the model and the document checked in the logged feilds.

unmapped events

9. Now you are ready to configure the data in Optimize. We will discuss this part in section 4, after discussing sending the data using the ‘web-service data collector’.

3. Sending Data to Optimize using the web service Data collector

The web service data collector is a web service existing with the data collector webmethods components. It enables you to use the optimize even if you don’t use business process model. So we use it to simulate the action taken by the model to send the logged feilds to Optimize.

Use the following address to extract the web service data collector WSDL:

http://datacollectorServer:12603/services/WSDimensionalDataCollector.wsdl

Note: The web service data collector signature has been changed after the Optimize_8.2.1_fix_9. So it is strongly recommended to install the following fixes before start using the optimize version 8.2.1.

  1. Optimize_8.2.1_fix_9 or  Optimize_8.2.1_fix_10
  2. Process_Engine_8.2.1_fix_8 (as the logged fields will not send the data to optimize after installing the optimize_fix_9)

Here is a screen short from calling the web service data collector in the softwareAG Designer.

attributes values

 

After calling the web service data collector with your data during the execution of the flow service, you will be able to see the new event (in the screen shot ‘TestEvent’) in the ‘MWS –> Analytics –> KPIs –> Business Data –> unmapped event type’

At this point all the configuration will be done with the optimize using the MWS.

ws dc event in MWS

 

 3. Configuring the new Events in Optimize through MyWebmethods.

The following part is common for all the events sent to optimize, regardless of the way used to send the data to Optimize (logged fields or WS data collector). We will use the example created in section 1 (using the logged fields), the document used is ‘salesOrder’.

  3.1 Configuring the Event received

  1. Go to myWebMethods.
  2. Go to MWS –> Analytics –> KPIs –> Business Process
  3. Click on the event ‘DemoProcess – salesOrder’ under ‘unmapped Event types’.
  4. We will name the new event ‘salesEvent’, and choose the ‘DemoProcess’ from the dropdown list.

unmapped event details

5. Click on the ‘Edit’ button for each variable to configure it.

configure fact

Configure field as dimension

 

6. Configuration variable in the event as follows:

Feild Display Name Type Calculation Type UOM
Id Id Transaction NA NA
Price Price Fact Sum $
productName productName Dimension NA NA
storeId storeId Dimension NA NA

Note: UOM = Unit of measurement

Fact: use this type for the info involved in the calculation. In the example we want to calculate the revenue from the sold items (sum of prices), so the price must be a fact.

Dimension:  use this type for the info which can be used to categorize the statistics or the requests. Example you need to know the revenue from sold item per store.

Transaction: It is a unique data for this transaction, this is the reason it is not used to generate any statistics. In our example we can consider the ‘Id’ is the serial number of the sold item.

7. Click the ‘Save’ button to save your configuration.

3.2 Configuring the KPI, and KPI Hierarchy

In this section we will see how to group and view the data generated from Optimize. So we will start with the KPI Hierarchy.

1. Go to MWS –> Administration –> Analytics –> KPIs –> KPI hierarchies.
2. Click the button ‘Add Hierarchy’.
3. Choose name for the hierarchy, in our example ‘MyProduct’.
4. Choose the dimension, we will choose the productName dimension (ProductDim). We will explain in more details later.

add hierarchy

Now we will define the KPI and assign it to the KPI hierarchy. Here are the steps:

  1. Go To MWS –> Administration –> Analytics –> KPIs –> Business Data
  2. Click the button ‘Add KPI’.
  3. We will name the KPI of this example ‘demoRevenue’.
  4. The collection interval we will choose 1 minute. During this interval the Optimize will be aggregating the data. For example if the collection interval is 1 day, then the Optimize will get the sum of the sales transaction by the end of day.
  5. In the KPI Information:
    1. Choose the event ‘salesEvent’.
    2. Fact will be the ‘price’.
    3. The hierarchy will be ‘MyProduct’

Note: the rest of the information will be created automatically from the configuration done before.

 4. Viewing the statistics – Analytic Overview

Let us see the results of our work. Please run a couple of requests to make sure that the Optimize received some data. Here is a screenshot of the data sent to optimize.

published data sample

To see the statistics please follow these steps:

  1. Go to MWS –> Monitoring –> Analytics Overview.
  2. Under the name of your process you will find the KPI folder with the data.

Analytics overview

As you see in the screenshot the Optimize is using the dimension to categorize the revenue based on the ProductName (ex. demoRevenue (BlackBerry Q10)). The last reading means the last sum of prices of the sold products in the last collection interval which is 1 minute in our example.

3. We will go into the details of one of the dimensions.

demoRevenue detail view

And you can check the data instead of the graph by pressing the button ‘View Data’

KPI view data button

 

We can see in the below screenshot the aggregation done by Optimize in the collection interval. So if you need to get the revenue by day for this dimension, you can change the collection interval definition of the KPI.

detailed data of the collection interval

You can also create rules by clicking the button ‘Create Rule’ to receive an alert when something goes wrong.

create Rule

 

The data and aggregation done by Optimize is also available in the database, we will talk about how to extract the data from the database later …

We hope that you find this article useful, and we are looking forward reading your comments and questions.

© 2014 Hossam Elsharkawy. All rights reserved.