StreamSets and ARIS Process Mining
Tags: integration, dataops, tutorial, solution
Published: 2022-09-23 08:42:10

---
title: StreamSets and ARIS Process Mining
published: true
date: 2022-08-01 12:00:49 UTC
tags: integration, dataops, tutorial, solution
canonical_url: https://tech.forums.softwareag.com/t/streamsets-and-aris-process-mining/259726
---

 

This article outlines the steps involved in implementing a solution using Streamsets, [webMethods.io](http://webmethods.io) Integration and ARIS Process Mining

## 1 Introduction

### 1.1 Why Streamsets?

Streamsets is a Data Ops platform. It can work with data at large scale. Smart data pipelines can be built and deployed across hybrid and multi-cloud platforms from a single portal.

### 1.2 Why ARIS Process Mining?

ARIS Process Mining lets you understand business processes to find bottlenecks and opportunities for improvement. Compare designed processes to as-is processes to see, if they execute as planned and make changes, before they impact the bottom line.

### 1.3 How can they work together?

ARIS process mining needs process execution data/logs/audit trail for mining the processes. ARIS process mining is more effective when there is a continuous stream of data coming in. Streamsets which processes data at large scale can extract meaningful process audit trail and send it to ARIS Process Mining. ARIS Process Mining can analyse the data and churn out meaningful insights about the processes.

### 1.4 Use Case for this article

Assume all the systems involved in the required process are publishing Audit data/activities to Kafka. From the audit data available in Kafka we can build a Process Mining pipeline.  
Streamsets can extract the data from Kafka, aggregate and transform data. The resultant data can be sent to ARIS process mining via [webMethods.io](http://webmethods.io) Integration.  
ARIS Process Mining can use this data to Mine the processes and show the near real time Process Analytics and Dashboards.  
[webMethods.io](http://Webmethods.io) Integration is required to build a workflow to upload data to ARIS Process mining using Data APIs. To ingest data client applications needs to call a series of APIs. As Streamsets is a Data Ops platform, it’s not suited to build a functional app. Hence [webMethods.io](http://webmethods.io) is a suitable platform to build such a workflow with existing ARIS Process Mining connector.  
 ![Picture1_usecase_diagram](https://aws1.discourse-cdn.com/techcommunity/original/3X/f/a/faf5488149e25bf2f8db4a1a3b94114b477e6c27.png)

## 2 Pre-requisite

• ARIS Process Mining Cloud tenant  
• [webMethods.io](http://webMethods.io) cloud tenant with Integration enabled  
• Streamsets Cloud Tenant and Streamsets Data Collector instance, Data Collector should have network access to connect to Kafka instance and internet.  
• Kafka and Zookeeper Setup.

## 3 Implementation

### 3.1 Configure ARIS Process Mining Instance

#### 3.1.1 Enable the Data Ingest APIs

Login to ARIS Process Mining Instance with User having Engineer and Process mining Admin roles.

Goto Administration > System Integration

Add System Integration for type “Data Ingest API” and Auth type ‘Client Credentials’  
 ![Picture2_pm_create_system_int_api](https://aws1.discourse-cdn.com/techcommunity/original/3X/c/8/c808da48976202906c5090b862c331cb0aebd2ca.png)

This creates Client Credentials, with ClientID and Client Secret.  
 ![Picture2_pm_create_system_int_api3](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/c/2c355a54d30839ec2bf0278bdcef56cf2fdb3b15.png)

The credentials should be used to get Access Tokens to call the APIs.  
 ![Picture3_pm_auth_postman](https://aws1.discourse-cdn.com/techcommunity/original/3X/9/4/943e9d385ac97e0704046756fe413155db3a820e.png)

**Curl command** :

```
curl --location --request POST 'https://mc.ariscloud.com/api/applications/login' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--data-urlencode 'clientId={Client Id}' \
--data-urlencode 'clientSecret={Client Secret}' \
--data-urlencode 'tenant={Tenant Name}'

```

#### 3.1.2 Create a Process Mining Project and Data Collection

Go to Projects and Create a project and an associated Data Collection. Create an Analysis in the Project.  
 ![Picture4_pm_create_project](https://aws1.discourse-cdn.com/techcommunity/original/3X/a/e/aec7e56b5b3642b31bdc54dd16f7a9dd78eafae7.png)

#### 3.1.3 Add Data Ingest API License to Data Collection

Go to Data Collections and open the new Data Collection created

Goto Connections

Add a new connection, give it a name, Select the System Integration attach an available License, If you don’t have a license contact Admin and get Data Ingest licenses.

This step is critical, without this connection you will not have permission to upload data using REST APIs  
 ![Picture5_pm_data_collection_connection_license](https://aws1.discourse-cdn.com/techcommunity/original/3X/0/3/03daed561c597f7d0d6288aa160a9ee1414c8199.png)

![Picture6_pm_data_collection_connection2](https://aws1.discourse-cdn.com/techcommunity/original/3X/9/1/91d0794136296b470ca810f707244b12fcd1c89d.png)

#### 3.1.4 Create Table in the Data Collection using REST API

Ingest APIs doesnt work with tables created directly on the portal. So tables needs to be created from the APIs.

Goto Source Tables

Create a table using REST APIs  
 ![Picture7_pm_data_collection_create_table](https://aws1.discourse-cdn.com/techcommunity/original/3X/0/0/00c9950e54ee9689aac902924904f308992778e7.png)

**Curl Command to create table**

```
curl --location --request POST 'https://processmining.ariscloud.com/mining/api/pub/dataIngestion/v1/dataSets/testdata/sourceTables' \
--header 'Authorization: Bearer {Access Token}' \
--header 'Content-Type: application/json' \
--data-raw '[
    {
        "name": "parceldelivery_csv",
        "namespace": "default",
        "columns": [
            {
                "dataType": "STRING",
                "name": "Case_ID"
            },
            {
                "dataType": "STRING",
                "name": "Activity"
            },
            {
                "dataType": "FORMATTED_TIMESTAMP",
                "name": "Start",
                "format": "dd.MM.yyyy HH:mm"
            },
            {
                "dataType": "FORMATTED_TIMESTAMP",
                "name": "End",
                "format": "dd.MM.yyyy HH:mm"
            },
            {
                "dataType": "STRING",
                "name": "Product"
            },
            {
                "dataType": "STRING",
                "name": "Customer"
            },
            {
                "dataType": "STRING",
                "name": "Country"
            },
            {
                "dataType": "STRING",
                "name": "Delivery type"
            }
        ]
    }
]'

```

After execution of the API, check the portal for newly created table.  
 ![Picture8_pm_data_collection_table_view](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/0/30c176a7a357de02d90883938cfa363c706765ea.png)

### 3.2 [webMethods.io](http://webMethods.io) Workflow to send data to Process Mining

Create a [webMethods.io](http://webMethods.io) Workflow and use ARIS Process Mining connector.  
Add an account for ARIS Process Mining account.  
ARIS Process Mining Data Ingest APIs needs to be called in a particular order to ingest data. Implement the order as shown below

![Picture9_wm_workflow_view](https://aws1.discourse-cdn.com/techcommunity/original/3X/c/2/c2aa8512436920630f300aa0dbcbd55a089a9190.png)

**Create a Webhook to accept JSON array as input**.

The input should be the process data that can be submitted to process mining.  
 ![Picture10_wm_workflow_webhook](https://aws1.discourse-cdn.com/techcommunity/original/3X/c/a/caf96418cf338ca9cfc6115443c080ec7cec883b.png)

![Picture11_wm_webhook_input_sig](https://aws1.discourse-cdn.com/techcommunity/original/3X/4/e/4e221e86163ddb7b5565911fa83bf2ce8180d75d.png)

### 3.3 Streamsets Data Pipeline

Streamsets supports HTTP Client as a Destination. REST API calls can be implemented using this destination. It is very configurable hence its easy to implement any REST API call.

But ARIS Process mining Data Ingest API is a complex set of API calls. Implementing such a workflow is not a good use case for Streamsets, as Streamsets is meant or data processing and not for building functions and app integrations.

To complete the usecase call the [webMethods.io](http://webMethods.io) workflow using the REST endpoint created using webhook from Streamsets using HTTP Client destination.

Set Data Format to JSON array of objects

Below is a simple Data Pipeline in Streamsets,

Data is sourced from Kafka, using origin as Kafka Multitopic Consumer

And Destination as HTTP Client, calling [webMethods.io](http://webMethods.io) REST API

![Picture12_ss_data_pipeline_pic1](https://aws1.discourse-cdn.com/techcommunity/original/3X/b/9/b974bfddf905a051c6afdefb958c9f09999d52b6.png)

![Picture13_ss_data_pipeline_pic2](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/f/2ff75735183ba0a508774ecba8a8f194b7dbb1d6.png)

![Picture15_ss_data_pipeline_pic3](https://aws1.discourse-cdn.com/techcommunity/original/3X/5/a/5ae03dbeaa83f9cb4a86aeb7948efc3186d97907.png)

## 4 Results

When the data is uploaded to ARIS Process Mining, it starts processing the data. The status can be seen on the overview page of the Data Collection

### 4.1 Streamsets

![Picture16_ss_data_pipeline_result](https://aws1.discourse-cdn.com/techcommunity/original/3X/7/e/7e8d01b97ac16afd06b4c52d0e196d8318593df6.png)

![Picture17_ss_data_pipeline_result2](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/a/2a2109f3874f5c5c852a4cafaf5c8a127069dbb9.png)

### 4.2 [Webmthods.io](http://Webmthods.io) Integration transactions

![Picture18_wm_txn_logs](https://aws1.discourse-cdn.com/techcommunity/original/3X/b/9/b99846d113298c7905ff008441fe9ccfb74d6784.png)

### 4.3 ARIS Process Mining Data Collection Overview

Displays current status : Processing Data when uploaded data is being processed, once completed the status changes to Data Loaded  
 ![Picture19_pm_data_collection_result1](https://aws1.discourse-cdn.com/techcommunity/original/3X/9/e/9e3da4e3ef103f619f9a60fd7bcac0e0a5c72e1a.png)

![Picture20_pm_data_collection_result2](https://aws1.discourse-cdn.com/techcommunity/original/3X/1/9/195d86a51866734cd9542154e815086e903df698.png)

![Picture21_pm_project_analysis_process](https://aws1.discourse-cdn.com/techcommunity/original/3X/4/b/4b6d1f466df489c705b29bfa95478c61d2febe16.png)

![Picture22_pm_project_analysis_dashboard](https://aws1.discourse-cdn.com/techcommunity/original/3X/b/3/b3dd27f064b900d8c00db1a20936872638d827a4.png)

## Next steps

Use a real world business process from a customer project to implement this solution.

## Useful links | Relevant resources

* [StreamSets Academy](https://academy.streamsets.com/)

* [ARIS Process Mining](https://aris-process-mining.com/)

* [Software AG Cloud](https://www.softwareag.cloud/site/index.html)


[Read full topic](https://tech.forums.softwareag.com/t/streamsets-and-aris-process-mining/259726)