PM4Py-WS Log Filtering Services
(POST JSON) /addFilter
Adds a filter to the process.
URI parameters:
session => the ID of the session that the user can use to communicate with the server
process => the name of the process that is downloaded
POST content (JSON): a JSON with the following properties:
filter => a string representation of the filter that is being added
e.g. filter: [“end_activities”, [“pay compensation”]]
Possible filters:
- Start activities: keeps only cases starting with some activity. It is provided as a list having, as first element, the string “start_activities”, and as second element the list of all the desidered start activities in the log (a list of strings).
- End activities: keeps only cases finishing with some activity. It is provided as a list having, as first element, the string “end_activities“, and as second element the list of all the desidered end activities in the log (a list of strings).
- Variants filter: keeps only cases belonging to one of the specified variants. It is specified as a list having, as first element, the string “variants“, and as second element the list of all the desidered variants in the log (a list of strings)
- Case performance filter: keeps only cases which performance falls inside the specified interval. It is specified as a list having, as first element, the string “case_performance_filter“, and as second element a string containing the lower and upper bound of the desidered interval (expressed in seconds) separated by @@.
- Timestamp filter on events: keep events which timestamp falls inside the specified interval. It is a list having, as first element, the string “timestamp_events“, and as second element a string containing the lower and upper bound of the desidered interval (expressed in seconds) separated by @@.
- Timestamp filter on traces (contained): keeps cases falling entirely inside the specified interval. It is a list having, as first element, the string “timestamp_trace_containing“, and as second element a string containing the lower and upper bound of the desidered interval (expressed in seconds) separated by @@.
- Timeframe filter on traces (intersecting): keeps cases that intersect the specified interval. It is a list having, as first element, the string “timestamp_trace_intersecting“, and as second element a string containing the lower and upper bound of the desidered interval (expressed in seconds) separated by @@.
- String attribute filter on traces (positive): keeps cases that have at least one event with an attribute value inside the specified list. It is expressed as a list which first element is “attributes_pos_trace“, and the second element is another list that has as first element the attribute key and as second element the list of desidered values for the attribute.
- String attribute filter on traces (negative): removes cases that have also just one event with an attribute value inside the specified list. It is expressed as a list which first element is “attributes_neg_trace“, and the second element is another list that has as first element the attribute key and as second element the list of undesidered values for the attribute.
- String attribute filter on events (positive): keeps only events with an attribute value inside the specified list. It is expressed as a list which first element is “attributes_pos_event“, and the second element is another list that has as first element the attribute key and as second element the list of desidered values for the attribute.
- String attribute filter on events (negative): removes events with an attribute value inside the specified list. It is expressed as a list which first element is “attributes_neg_trace“, and the second element is another list that has as first element the attribute key and as second element the list of undesidered values for the attribute.
- Numeric attribute filter on traces: keeps only traces with at least one event that has an attribute value falling inside the specified interval. It is expressed as a list which first element is “numeric_attr_traces“, and the second element is another list that has as first element the attribute key and as second element the admitted interval.
- Numeric attribute filter on events: keeps only events with an attribute value falling inside the specified interval. It is expressed as a list which first element is “numeric_attr_events“, and the second element is another list that has as first element the attribute key and as second element the admitted interval.
- Paths (positive): keep cases that have at least one occurrence of the desidered paths. It is expressed as a list which first element is “paths_pos_trace”, and the second element is another list that has as first element the attribute key and as second element the desidered paths.
- Paths (negative): removes cases that have at least one occurrence in the undesidered paths. It is expressed as a list which first element is “paths_neg_trace”, and the second element is another list that has as first element the attribute key and as second element the undesidered paths.
all_filters => a string representation of the list of filters added since now to the process (for the handlers that are not incremental)
e.g. all_filters: [[“start_activities”, [“register request”]], [“end_activities”,[“pay compensation”]]
Returns:
After adding the filter, a JSON is returned having the following fields:
- status => if the session is valid and the user has visibility on the log, then OK, otherwise FAIL
(POST JSON) /REMOVEFILTER
Removes a filter from the process.
URI parameters:
session => the ID of the session that the user can use to communicate with the server
process => the name of the process that is downloaded
POST content (JSON): a JSON with the following properties:
filter => a string representation of the filter that is being removed
e.g. filter: [“end_activities”, [“pay compensation”]]
see the /addFilter service for a detailed representation of the filters
all_filters => a string representation of the list of filters added since now to the process (for the handlers that are not incremental)
e.g. all_filters: [[“start_activities”, [“register request”]], [“end_activities”,[“pay compensation”]]
Returns:
After adding the filter, a JSON is returned having the following fields:
- status => if the session is valid and the user has visibility on the log, then OK, otherwise FAIL