Please enable JavaScript to view this site.

 

Navigation: English > Data Engineer Guide > Create an Event Log from Your Data Sources > Generate Events

Create New Events by Creating Event Sources for Traditional Mining

Scroll Previous Topic Top Next Topic More

 

The main concept of creating an event is to create a table and then to apply a “where” statement to this table to match the specific conditions of each event. This table is named an  “eventSourceTable” and can be the direct output tables of the Transform-Phase or the combination of several tables form the Transform-Phase. To explain this part, the event creation steps are listed and then, on each step an example with the “Create Purchase Order” event is described.

 

The steps to create an event are:

1.Verify, if the first script tab is “Main” and create a new script tab and give it a name.

 

Example

 

Checking order

 

2.Copy and paste the content of the “template_eventSource” script tab to the new tab created.

3.Give an understandable name to the event source in the variable “eventSourceName” (line 5).

 

Example

 

let eventSourceName = 'ChangeLog_RSEG';

 

 

4.Fill in the inline table “activityScenarioFieldsTable”. This table has the fields:

process

Set it to “y” to load the activity. Set it to “n” to don't load it. This is useful for singularly debugging of one activity.

ActivityTypeID

Unique ID number of the activity.

ActivityType

Name of the activity type.

ActivityTypeDescription_EN

Description/name of the activity. These are the activity names showed in the ProcessAnalyzer.

By changing the field name (i.e. to ActivityTypeDescription_DE for german language) different languages can be set. For this, you need to include the activity names in the corresponding language.

QlikSourceWhereFilter

This is a where statement that is applied to the event source table with the aim to obtain the required event.

 

Example

 

process

Set it to “y”, because the activity should be load.

ActivityTypeID

Any number can be chosen. For this example, the ID 300 was selected.

ActivityType

Create Purchase Order

ActivityTypeDescription_DE

Lege Bestellung an

QlikSourceWhereFilter

As before explained:

CDHDR_OBJECTCLAS = 'EINKBELEG' AND CDPOS_TABNAME = 'EKKO' AND CDPOS_FNAME = 'KEY' AND CDPOS_CHNGIND = 'I'

 

 

NoConcatenate

activityScenarioFieldsTable:

LOAD * Inline [        

process,

ActivityTypeID,

ActivityType,

ActivityTypeDescription_EN,

QlikSourceWhereFilter

y,

300,

CreatePurchaseOrder,

Create order,

CDHDR_OBJECTCLAS = 'EINKBELEG' AND CDPOS_TABNAME = 'EKKO' AND CDPOS_FNAME = 'KEY' AND CDPOS_CHNGIND = 'I'

];

 

 

5.Create your eventSourceTable the way to obtain the required events.

Info

Don’t forget to include the process mining required fields: CaseID, ActivityStartTimestamp and ActivityEndTimestamp, ActivityUserName and ActivityOriginID (ProcessAnalyzer fields) in this process.

 

Example

 

eventSourceTable:

LOAD

[CDPOS_MANDANT] & '_' & [CDPOS_OBJECTCLAS] & '_' & [CDPOS_OBJECTID] & '_' & [CDPOS_CHANGENR] & '_' & [CDPOS_TABNAME] & '_' & [CDPOS_TABKEY] & '_' & [CDPOS_FNAME] & '_' & [CDPOS_CHNGIND] as [%CDPOS_PKEY],

       '030_' & mid(CDPOS_TABKEY410as %EKKO_PKEY,

       CDPOS_TABNAME,

       CDPOS_FNAME,

       CDPOS_CHNGIND,

       CDHDR_AETST,

       CDHDR_OBJECTCLAS,

       CDHDR_USERNAME

FROM [$(DataConnection)/ProcessAnalyzer_$(mvProcessDescription)/02_Transform/views/CDHDR_CDPOS_EINKBELEG.qvd] (qvd);

inner join (eventSourceTable)

Load

       RSEG_BELNR & '_' & RSEG_MANDT & '_' & RSEG_BUKRS & '_' & RSEG_GJAHR as CaseID_RSEG,

       RSEG_MANDT & '_' & RSEG_EBELN as %EKKO_PKEY

FROM [$(DataConnection)/ProcessAnalyzer_$(mvProcessDescription)/01_Extract/transformed/RSEG.qvd] (qvd);

 

 

6.Finally, the process mining fields are included in the finalEventSourceTable.

 

Example

 

NoConcatenate

finalEventSourceTable:

Load *,

CaseID_RSEG as CaseID,

CDHDR_AETST as ActivityStartTimestamp,

CDHDR_AETST as ActivityEndTimestamp,

CDHDR_USERNAME as ActivityUserName,

%CDPOS_PKEY as ActivityOriginID

Resident eventSourceTable

 

 

Info

Non-mandatory fields are not stored in the eventSource unless you list them in the variable mvEventFieldsToKeep.

 

7.Once the event source is defined, set the mvExecuteEventsSourceMining to 1 and drag this newly created script tab below the “Main” tab.

We recommend to load each event source at a time to avoid errors, therefore drag an “exit script” tab after the created script tab, which contain just a “exit script;” statement.

 

Example

 

LET mvExecuteEventSourceMining = 1;

 

Checking order

 

© by MEHRWERK GmbH