Connecting SAP Integration Suite with SAP Signavio Using the Ingestion API.
Share

[[{“value”:”

Introduction:

Organizations often use SAP Signavio to analyze, monitor, and optimize critical business processes such as Procure-to-Pay (P2P), Order-to-Cash (O2C), and Record-to-Report (R2R). To derive meaningful process insights, the required business data needs to be made available in SAP Signavio in a structured and consumable format.

SAP Integration Suite – Cloud Integration (CPI) can be used to connect SAP and non-SAP source systems with SAP Signavio and facilitate the transfer of business data through the SAP Signavio Ingestion API.

 

The Signavio Ingestion API enables organizations to ingest structured data that can support different business process scenarios, including:

  • Procure-to-Pay (P2P) – Data related to purchase requisitions, purchase orders, goods receipts, and invoices.
  • Order-to-Cash (O2C) – Data related to sales orders, deliveries, goods issues, and customer invoices.

  • Record-to-Report (R2R) – Data related to journal entries, accounting documents, and financial reporting activities.

In this blog, we will demonstrate how SAP Integration Suite can be used to send data to SAP Signavio using the Ingestion API. As a practical example, we will use Employee data and walk through the complete integration process—from preparing the CSV data and to converting the payload into multipart/form-data and sending it to SAP Signavio using an HTTP POST request.

The same approach can be extended to other business datasets and process scenarios such as P2P, O2C, and R2R, depending on the data and ingestion requirements.

 

Prerequisites: 

1. SAP Integration Suite with Cloud Integration capabilities

You need access to SAP Integration Suite and the Cloud Integration capability to create and deploy an integration flow.

The integration flow will be responsible for:

  • Preparing the employee data

  • Defining the CSV metadata

  • Creating the multipart/form-data request

  • Calling the SAP Signavio Ingestion API

  • Handling the API response

2. SAP Signavio Ingestion API

You also need access to the SAP Signavio Ingestion API.

The Ingestion API endpoint and Authorization Token.

 

Integration Scenario

For this example, assume that we have employee information that needs to be sent to SAP Signavio.

 

STEP1: create the Integration Flow with the required palette options as shown in the image below.

 

solasu_swarnalipi_0-1788075783154.png

STEP2: Configure the content modifier headers and properties.
In the first CM, add the below headers, properties and body:

Headers: 

Header Name Value

Content-Type

multipart/form-data; boundary=cpi

Accept

application/json

Authorization

Bearer <Token>

 Properties:

Property Name Value

ColumnHeader

Id,Name,Department,Active,Salary

Filename

EMP_Data.csv

Primarykeys

Id

JsonData

 

JsonData: 

{
	"type": "record",
	"name": "EMP_Data",
	"fields": [
		{
			"name": "Id",
			"type": "int"
		},
		{
			"name": "Name",
			"type": "string"
		},
		{
			"name": "Department",
			"type": "string"
		},
		{
			"name": "Active",
			"type": "Boolean"
		}
		,
		{
			"name": "Salary",
			"type": "double"
		}
	]
}

BODY:

1001,John,IT,true,75000

1002,Smith,HR,true,65000

1003,David,Finance,false,55000

 

STEP3: Next convert the data into multipart form data.

Add a Groovy script after the CM.

import com.sap.gateway.ip.core.customdev.util.Message;

def Message processData(Message message) {

def map = message.getProperties();
def filename = map.get(“Filename”);
def primarykey = map.get(“Primarykeys”)
def ColumnHeader = map.get(“ColumnHeader”)
def JsonData = map.get(“JsonData”)

//Body
def body = message.getBody(String);
body = body.replaceAll(“n”, “rn”);
body = “””–cpirnContent-Disposition: form-data; name=”schema”rnrn””” + JsonData + “””rn–cpirn””” + “””Content-Disposition: form-data; name=”files”; filename=””””+ filename +””””rnContent-Type: text/csvrnrn””” + ColumnHeader +”””rn”””+ body +”””rn–cpirnContent-Disposition: form-data; name=”primaryKeys”rnrn””” + primarykey + “””rn–cpi–“””

message.setBody(body);
return message;
}

 

Sample output:

–cpi

Content-Disposition: form-data; name=”schema”

{ “type”: “record”, “name”: “EMP_Data”, “fields”: [ { “name”: “Id”, “type”: “int” }, { “name”: “Name”, “type”: “string” }, { “name”: “Department”, “type”: “string” }, { “name”: “Active”, “type”: “Boolean” }, { “name”: “Salary”, “type”: “double” } ] }

–cpi

Content-Disposition: form-data; name=”files”; filename=”EMP_Data.csv”

Content-Type: text/csv

Id,Name,Department,Active,Salary

1001,John,IT,true,75000

1002,Smith,HR,true,65000

1003,David,Finance,false,55000

–cpi

Content-Disposition: form-data; name=”primaryKeys”

Id

–cpi–

STEP4:  Posting data to SAP Signavio.
 

Once the multipart/form-data payload has been prepared by the Groovy Script, the next step is to post the data to SAP Signavio using the Signavio Ingestion API.

Add a Request Reply step to the Integration Flow and connect it to a Receiver representing SAP Signavio.

Configure the Receiver with an HTTP Adapter and provide the SAP Signavio Ingestion API endpoint in the Address field.

 

solasu_swarnalipi_1-1788076446859.png

Under Request Headers, configure the required headers: Content-Type|Accept|Authorization.

Under Response Headers, use: * (This allows the response headers returned by SAP Signavio to be passed back to the integration flow.)

 

Once the configuration is complete, deploy and execute the Integration Flow. The employee CSV data, along with its schema and primary key information, is sent to SAP Signavio through the Ingestion API using an HTTP POST request.

ERROR: 
During the integration, the request may appear to be successful in SAP Integration Suite, with a response such as:
{“status”:200,”payload”:{“executionId”:”xxxxxxxxxxxxxxxxxxxxxxxxxxxx”}}
However, even though SAP Integration Suite receives an HTTP 200 response, SAP Signavio may fail during the subsequent processing of the uploaded CSV file and display the error:  “Error while converting csv to parquet file“.
Root Cause: The HTTP 200 
response only confirms that the ingestion request was successfully received by SAP Signavio. It does not necessarily mean that the CSV data has been successfully processed.

The error can occur when the CSV data does not match the data types defined in the schema. And also make sure that every value in the CSV can be correctly interpreted according to its corresponding schema definition.

After correcting any data type or CSV inconsistencies, resend the data to SAP Signavio. The CSV should then be processed successfully and converted into the required Parquet format.

Conclusion:

SAP Integration Suite can be used to efficiently integrate with SAP Signavio using the Ingestion API and transfer structured business data in CSV format. In this scenario, employee data was prepared with the required schema and primary key information, converted into multipart/form-data using Groovy, and posted to SAP Signavio through an HTTP receiver.

It is important to ensure that the CSV values match the defined data types:

  • Boolean
  • int
  • long
  • Double
  • string

The same integration approach can be extended to business process data such as P2P, O2C, and R2R, enabling organizations to transfer relevant data to SAP Signavio for process analysis and transformation.

NOTE:  Your data is contained in a CSV file. Each value is read as text and must match the data type assigned to its column. And if the value in the CSV does not match the data type defined in the schema, the ingestion request may fail. Therefore, ensure that the CSV data and schema definitions are consistent before sending the request to SAP Signavio.

Reference:
https://help.sap.com/docs/signavio-process-intelligence/api-guide/sending-ingestion-request

https://help.sap.com/docs/signavio-process-intelligence/api-guide/supported-data-types

 

“}]] 

  Read More Technology Blog Posts by Members articles 

#abap

By ali

Leave a Reply