(Glue-2305) v3.1 Workflows

A workflow is the combination of multiple SNP Glue™ objects and describes the flow of the data from the source (e.g. SAP table) all the way down the target (e.g. SNP Glue™ table).

Create workflows

Using POST /workflow API is possible to mass generate workflows ready to be executed.

Global parameters

Parameter name

Description

Usage

Type

Parameter name

Description

Usage

Type

SourceObjectName

Array with the list of SAP source objects for which to generate the replication objects

Mandatory

String

SourceObjectType

The type of SAP object to read from. Currently supporting ADSO and SAP tables

Mandatory

"table/view" | ”ADSO”

glueTableSett

Array with parameters for SNP Glue™ table generation

Optional

JSON object (see below)

ext2Sett

Array with parameters for Extractors 2.0 generation

Mandatory

JSON object (see below)

glueQueueSett

Array with parameters for SNP Glue™ Queue generation

Optional

JSON object (see below)

asyncExec

Execute generation in a background job (Asynchronous)

Optional

Boolean

skipExisting

Skip generation of existing objects

Optional

Boolean

GlueTableSett: SNP Glue™ table generation parameter object 

Parameter name

Description

Usage

Type

Parameter name

Description

Usage

Type

prefix

Object prefix

Mandatory

String

suffix

Object suffix

Optional

String

devclass

Package for object

Mandatory

String

storID

Storage ID

Mandatory

String

meaningFields

Meaningful fieldname

Optional

Boolean

meaningValues

Speaking field values

Optional

Boolean

glRequest

Add SNP Glue™ request field

Optional

Boolean

glRequestAsKey

Add SNP Glue™ request as a key

Optional

Boolean

folder

Existing folder name (visible in SAP GUI only - Glue object navigator )

Optional

String

CSVFolderName

File storage folder name

Obligatory in case of file storages

String, default “<GLUE_TABNAME>”

CSVDelimiter

File storage – Delimiter type

Obligatory in case of file storages

String

CSVQuotes

File storage – Put values into quotes

Optional

Boolean

CSVEscaping

File storage – Use extended escaping

Optional

Boolean

CSVHeader

File storage – Include table header

Optional

Boolean

CSVOneFile

File storage – One file extraction

Optional

Boolean

CSVCompress

File storage – Compress file

Optional

Boolean

CSVCompressLevel

File storage – Compression level

Optional

Int

CSVInheriteProfile

File storage - Storage/global default profile

Optional

Boolean

CSVProfileName

File storage - Profile name

Optional

String

CSVChangeTimeField

File storage - Change time field name

Optional

String

CSVDeletionField

File storage - Deletion field name

Optional

String

glueQueueSett: SNP Glue™ Queue generation parameter object

Parameter name

Description

Usage

Type

Parameter name

Description

Usage

Type

prefix

Object prefix, must start with Z

Mandatory

String

suffix

Object suffix

Optional

String, default “_Q“

devclass

Package for object

Mandatory

String

folder

Existing folder name (visible in SAP GUI only - Glue object navigator )

Optional

String

sourceType

Queue structure type

Mandatory

“DDIC” | “GL_TAB”

sourceObj

Source object ID (if sourceType = “DDIC” source object id will be “0”)

Mandatory

Int

ext2Sett: SNP Glue™ Extractor 2.0

Parameter name

Description

Usage

Type

Parameter name

Description

Usage

Type

prefix

Object prefix, must start with Z

Mandatory

String

suffixFetcher

Fetcher suffix

Optional

String, default “_F“

suffixConsumer

Consumer suffix

Optional

String, default “_C”

suffixProcess

Extraction process suffix

Optional

String, default “_P”

devclass

Package for object

Mandatory

String

folder

Existing folder name (visible in SAP GUI only - Glue object navigator )

Optional

String

sourceType

Source object type

Mandatory

“DDIC“|“QUEUE” | “GL_TAB”

sourceID

Source object ID (if sourceType = “DDIC” source object id will be “0”)

Mandatory

Int

targetType

Target object type

Mandatory

“QUEUE” | “GL_TAB”

targetID

Target object ID

Mandatory

Int

deltaType

Delta type, with generate endpoint only trigger and full are possible, different modes can be enabled using PATCH process endpoint

Mandatory

“FULL“ | “TRIGGER“

loadType

The default load type, can be changed at execution time

Mandatory

 “F“ | ”D” | ”I” | ”L”

keyFieldsFilter

Add key fields as a selection parameter

Optional

Boolean

noActivation

Do not activate objects

Optional

Boolean

useDeduplication

Use deduplication

Optional

Boolean

readDelEntries

Read deleted entries (only for Trigger based extractions)

Optional

Boolean

enableMerge

Enable merge

Optional

Boolean

applyRoutines

Apply field routines

Optional

Boolean

All input parameters are case insensitive.

Example of REST API call:

POST

http://servername:portnumber/dvd/glue/api/v3_1/workflows?sap-client=clientnumber

POST

http://servername:portnumber/dvd/glue/api/v3_1/workflows?sap-client=clientnumber

JSON body:

{ "SOURCEOBJECTTYPE": "Table/View", "SOURCEOBJECTNAME": [ "SFLIGHT", "SBOOK" ], "GlueTableSett": [ { "id": "1", "prefix": "ZTEST_", "devclass": "ZTEST", "glRequest": "", "storid": "BIN_FILE", "glRequestAsKey": "" } ], "ext2Sett": [ { "id": "1", "prefix": "ZTEST_", "devclass": "ZTEST", "suffixFetcher": "_F", "suffixConsumer": "_C", "suffixProcess": "_P", "SOURCETYPE": "DDIC", "SOURCEOBJ": "", "TARGETTYPE": "GL_TAB", "TARGETOBJ": "1", "deltaType": "FULL", "loadType": "F" } ] }

Example of the REST API output:

{ "message": [ { "msgtype": "S", "text": "Generating Glue Table 1 for Table/View SBOOK..." }, { "msgtype": "S", "text": "Glue Table ZTEST_SBOOK generated successfully." }, { "msgtype": "S", "text": "Generating Extractor2.0 1 ..." }, { "msgtype": "S", "text": "Extractor2.0 object ZTEST_SBOOK_F generated successfully." }, { "msgtype": "S", "text": "Extractor2.0 object ZTEST_SBOOK_C generated successfully." }, { "msgtype": "S", "text": "Extractor2.0 object ZTEST_SBOOK_P generated successfully." }, { "msgtype": "S", "text": "Generating Glue Table 1 for Table/View SFLIGHT..." }, { "msgtype": "S", "text": "Glue Table ZTEST_SFLIGHT generated successfully." }, { "msgtype": "S", "text": "Generating Extractor2.0 1 ..." }, { "msgtype": "S", "text": "Extractor2.0 object ZTEST_SFLIGHT_F generated successfully." }, { "msgtype": "S", "text": "Extractor2.0 object ZTEST_SFLIGHT_C generated successfully." }, { "msgtype": "S", "text": "Extractor2.0 object ZTEST_SFLIGHT_P generated successfully." } ] }

Example of Queue generation

JSON body:

{ "SOURCEOBJECTTYPE": "Table/View", "SOURCEOBJECTNAME": [ "SFLIGHT" ], "GlueTableSett": [ { "id": "1", "prefix": "ZTEST_", "devclass": "ZTEST", "glRequest": "", "storid": "BIN_FILE", "glRequestAsKey": "" } ], "GlueQueueSett": [ { "id": "1", "prefix": "ZTEST_", "SUFFIX": "_Q", "devclass": "ZTEST", "SOURCETYPE": "DDIC", "sourceobj": "" } ], "ext2Sett": [ { "id": "1", "prefix": "ZTEST_", "devclass": "ZTEST", "suffixFetcher": "_F", "suffixConsumer": "_C", "suffixProcess": "_P", "SOURCETYPE": "DDIC", "SOURCEOBJ": "", "TARGETTYPE": "QUEUE", "TARGETOBJ": "1", "deltaType": "FULL", "loadType": "F" }, { "id": "2", "prefix": "ZTEST_", "devclass": "ZTEST", "suffixFetcher": "_QF", "suffixConsumer": "_QC", "suffixProcess": "_QP", "SOURCETYPE": "QUEUE", "SOURCEOBJ": "1", "TARGETTYPE": "GL_TAB", "TARGETOBJ": "1", "deltaType": "FULL", "loadType": "F" } ] }

Example of the REST API output:

 

Object types:

  • “DDIC” SAP table/view or ADSO

  • “GL_TAB” SNP Glue™ table

  • “QUEUE” SNP Glue™ Queue

Load type

When a process is configured for delta replication, the execution can be run in different modalities:

  • “F”          Full Load (Repair) Without Delta Update

  • “D”         Delta Load

  • “I”           Delta Init Without Data

  • “L”          Delta Init + Full Load

 

If the job is scheduled in the background (async generation), the HTTP response code will be set to 200 with information about the generated SAP job
“200 Generation scheduled under Job name - ZDVD_GLUE_OBJ_GEN_BTCUSER”

Functionality is implemented in the SAP class /DVD/GL_EXT2_API_GEN_OBJ_V3_1.

Error handling

Every error message is raised via code 400. The reason for the error is also provided; however further investigation might be needed on the SAP side.

Delete workflows

Resource DELETE /workflows serve as a mass deletion function for SNP Glue™ objects.

It supports the following input parameters:

Global parameters

Parameter name

Description

Usage

Type

Parameter name

Description

Usage

Type

ObjectName

Array with the list of SNP Glue™ objects for deletion (SNP Glue™ Tables and Extractor 2.0 objects)

Mandatory

String

All input parameters are case insensitive.

Example of REST API call:

DELETE

http://servername:portnumber/dvd/glue/api/v3_1/workflows?sap-client=clientnumber

DELETE

http://servername:portnumber/dvd/glue/api/v3_1/workflows?sap-client=clientnumber

 JSON body:

Example of the REST API output:

 

Functionality is implemented in the SAP class /DVD/GL_EXT2_API_DELETE_OBJ.

Error handling

Every error message is raised via code 400. The reason for the error is also provided; however, further investigation might be needed on the SAP side.