PM4Py-WS Log Management

PM4Py-WS Log Management

This is responsible to manage the single logs, the visibility and the permissions of the users of the log.

The log management package is pm4pyws.log_manager . In the pm4pyws.log_manager.interface package, the interface to implement is provided.

A log manager should provide the following methods:

get_handlers(self)

A method that returns a dictionary with the process name associated to a log handler.

 

get_handler_for_process_and_session(self, process, session)

Gets the handler that could be associated to the given process and session having a particular filter chain.

Parameters:

process => Process (name) that we are interested to handle

session => Session ID that is accessing the handler

Returns:

The handler that could be associated to the given process and session having a particular filter chain.

 

set_handler_for_process_and_session(self, process, session, handlers)

Sets the handler that could be associated to the given process and session having a particular filter chain.

Parameters:

process => Process (name) that we are interested to handle

session => Session ID that is associated to the handler

 

check_is_admin(self, user)

A method that checks if the given user is an administrator of the tool.

Parameters:

user => User ID

Returns:

Boolean value

 

manage_upload(self, user, basename, filepath)

Manages the upload of a given process (having the path where the log file is) (only XES is supported in upload since now).

Entries are added to the database and moreover the log is loaded in memory.

Parameters:

user => User ID

basename => Name that is going to be associated to the process in the system/database

filepath => Path to the log file

 

check_user_log_visibility(self, user, process)

Checks the visibility of the user on the given process

Parameters:

user => User ID

process => Process name

Returns:

Boolean (True if the user has visibility on the given process)

 

check_user_enabled_upload(self, user)

Checks if the user could upload a log to the system.

Parameters:

user => User ID

process => Process name

Returns:

Boolean (True if the user could upload a log to the system)

 

check_user_enabled_download(self, user, process)

Checks if the user could download a log of the given process.

Parameters:

user => User ID

process => Process name

Returns:

Boolean (True if the user could download the given process)

 

load_log_static(self, log_name, file_path)

Loads a log file using the known handlers

Parameters:

log_name => Name that is associated to the process

file_path => Path where the log is