Create a Resource Log from your Event Data
The configuration of the resource log is very similar to the main event log. The only difference is that you don’t use your normal activity as the process steps in your process, but a resource, i.e. users or machines.
To identify resources in your process, you need to search for the event dimensions. You can use any event dimension as your resource.
Example
The user executes each activity in the process, therefore it can be used as a resource.
LET mvProcessDescriptionResource = 'Resource';
ResourceLog: //Log table name
NoConcatenate
LOAD
//ProcessAnalyzer information
CaseID,
UserName as ActivityType,
Timestamp(ActivityStartTimestamp) as ActivityStartTimestamp,
Timestamp(ActivityEndTimestamp) as ActivityEndTimestamp
//null() as SortingColumn
FROM \[$(DataConnection)mpmXData.qvd\] (qvd)
where len(UserName) > 1;
//Create ActivityTypeIDs:
call mw_createIDs('ResourceLog','$(DataConnection)');
// EX: call mv_pa_initMining ('ScenarioName', 'EventLogTableName', 'GroupingTableName', 'FolderName', 'StoreQVDs', 'SubprocessDefinition table');
// 1st parameter, 2nd parameter, 3rd parameter, 4th parameter, 5th parameter, 6th parameter
call mw_pa_initMining('$(mvProcessDescriptionResource)','ResourceLog','Groups_$(mvProcessDescriptionResource)','$(DataConnection)','$(mvStorempmXModelQVD)','SubprocessDefinition_$(mvProcessDescriptionResource)','ResourceLog');
//this function works when your CaseID of ResourceLog the same as your MainLog is.
//If your CaseIDs definitions are different, please use the function MW_qualifyLogAndCaseID('$(mvProcessDescriptionResource)') and
//create a link table to connect the main log with this resource log.
call MW_qualifyLog('$(mvProcessDescriptionResource)');
Configuration steps
- Define how you want to call your resource log by setting the variable mvProcessDescriptionResource .
LET mvProcessDescriptionResource = 'Resource';
- Configure the resource log table (as like as the event log table):
LET mvProcessDescriptionResource = 'Resource';
ResourceLog: //Log table name
NoConcatenate
LOAD
//ProcessAnalyzer information
CaseID,
UserName as ActivityType, //replace ActivityName with UserName
Timestamp(ActivityStartTimestamp) as ActivityStartTimestamp,
Timestamp(ActivityEndTimestamp) as ActivityEndTimestamp
//null() as SortingColumn
FROM \[$(DataConnection)mpmXData.qvd\] (qvd)
where len(UserName) > 1;
-
Call the algorithms (you do not need change anything here):
- call mw_createIDs(‘table name’,'folder to store the IDs'); Example:
call mw_createActivityTypeID('ResourceLog','$(ActivityIDHistoryConnection)');
- call mv_pa_initMining ('ScenarioName','EventLogTableName','GroupingTableName','FolderName','StoreQVDs','Subprocess-definition table', 'Log type'); Example:
call mw_pa_initMining('$(mvProcessDescriptionResource)','ResourceLog','Groups_$(mvProcessDescriptionResource)','$(DataConnection)','$(mvStorempmXModelQVD)','SubprocessDefinition_$(mvProcessDescriptionResource)','ResourceLog');
- call MW_qualifyLog('scenario'):
- This function qualifies the resource log to avoid synthetic keys and circular references. It works when the CaseID of the resource log is the same as the main log.
- If the CaseIDs definitions are different, use the function MW_qualifyLogAndCaseID('scenario') and create a link table to connect the main log with this resource log more information:
Example:
call MW_qualifyLog('$(mvProcessDescriptionResource)');