PM4Py-WS Analytics, Cases exploration and Statistics

PM4Py-WS Analytics, Cases exploration and Statistics Services

(GET) /getProcessSchema

If the user is allowed, gets a process schema from a given log

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 considered

decoration => required decoration (values: freq for frequency, perf for performance)

typeOfModel => required type of model (values: dfg for the Directly-Follows Graph, tree for process tree, inductive for Inductive Miner Petri net, heuristics for Heuristics Net extraction).

simplicity => value from 0 to 1 that indicate how much the process shall be simplified (the higher is the value, the more the process is simplified).

Returns:

If the session is not valid or the user has not visibility on the log, an empty JSON.

If the session is valid and the user has visibility on the log, a JSON with the following properties:

  • base64: base 64 encoded SVG representation of the process schema, along possibly with the requested decoration.
  • model: for Petri nets, the export of the PNML of the process schema
  • format: for Petri nets, the format of ‘model’ that is pnml
  • handler: the type of the log handler (may be XES or Parquet)
  • activities: the list of activities in the event log
  • start_activities: all the start activities of the log
  • end_activities: all the end activities of the log
  • gviz_base64: the DOT encoded in base 64
  • graph_rep: a custom representation of the graph object in the screen (if available)
  • type_of_model: algorithm that is used to extract the model
  • decoration: decoration that is applied on top of the model
  • second_model: (if available) a second process model representation
  • second_format: format in which the second process model is extracted
  • activity_key: Attribute that is used in the handler as activity
(GET) /getSNA

If the user is allowed, gets a social network analysis representation from a given log

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 considered

metric => The considered Social Network Analysis metric (handover, subcontracting, working_together, joint_activities)

threshold => Threshold that cut arcs

Returns:

If the session is not valid or the user has not visibility on the log, an empty HTML file.

If some exception happens in the calculation of the Social Network Analysis (for example, the log has not the resource attribute), then an empty HTML file.

If the session is valid, the user has visibility on the log and the services executes correctly, then a Pyvis HTML visualization of the Social Network in the given metric.

(GET) /transientAnalysis

If the user is allowed, performs a transient analysis on the given log

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 considered

delay => the number of days that should be provided for the transient analysis of the CTMC

Returns:

If the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid and the user has visibility on the log, then a JSON containing the following properties:

  • base64: contains the base 64 of the SVG of the decorated tangible reachability graph with the result of the CTMC transient analysis starting from the given delay.
  • gviz_base64: contains the base 64 of the DOT representation of the graph
(GET) /getCaseDurationGraph

If the user is allowed, gets the case duration graph of the given log

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 considered

Returns:

If the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid and the user has visibility on the log, then a JSON containing the following properties:

  • base64: contains the base 64 of SVG of the case duration graph of the given process.
  • gviz_base64: contains the base 64 of the DOT representation of the graph
  • points: contains the single points of the graph
(GET) /getEventsPerTimeGraph

If the user is allowed, gets the events per time graph of the given log

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 considered

Returns:

If the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid and the user has visibility on the log, then a JSON containing the following properties:

  • base64: contains the base 64 of the SVG of the events per time graph of the given process.
  • gviz_base64: contains the base 64 of the DOT representation of the graph
  • points: contains the single points of the graph
(GET) /getStartActivities

If the user is allowed, gets the start activities of a specific log

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 considered

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • startActivities: a list of lists containing the start activities of the given log along with their count (e.g. [[“Register”,100], [“Decline”,50]] if Register happens 100 times as start activity and Decline happens 50 times as start activity)
(GET) /getEndActivities

If the user is allowed, gets the end activities of a specific log

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 considered

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • endActivities: a list of lists containing the start activities of the given log along with their count  (e.g. [[“Register”,100], [“Decline”,50]] if Register happens 100 times as end activity and Decline happens 50 times as end activity)
(GET) /getAttributesList

If the user is allowed, gets the attributes list from a specific log

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 considered

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • attributesList: a list of strings that is the list of attributes of the given log
(GET) /getAttributeValues

If the user is allowed, gets the attribute values of a particular attribute from a specific log

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 considered

attribute_key => the attribute (e.g. concept:name for the activity) for which we want to know the values

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • attributeValues: a list of values along with their number of occurrences (e.g. [[“Register”,100], [“Decline”,50]] if Register happens 100 times in the log and Decline happens 50 times in the log) for the specified attribute
(GET) /getAllPaths

If the user is allowed, gets the paths of a particular attribute from a specific log

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 considered

attribute_key => the attribute (e.g. concept:name for the activity) for which we want to know the paths

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • paths: a list of values along with their number of occurrences (activities are separated by @@):
{"paths":[["T04 Determine confirmation of receipt@@T05 Print and send confirmation of receipt",1177],["T06 Determine necessity of stop advice@@T10 Determine necessity to stop indication",1165],["T02 Check confirmation of receipt@@T04 Determine confirmation of receipt",1119],["Confirmation of receipt@@T02 Check confirmation of receipt",1079],["T05 Print and send confirmation of receipt@@T06 Determine necessity of stop advice",791],["Confirmation of receipt@@T06 Determine necessity of stop advice",239],["T02 Check confirmation of receipt@@T06 Determine necessity of stop advice",178],["T10 Determine necessity to stop indication@@T02 Check confirmation of receipt",155],["T10 Determine necessity to stop indication@@T04 Determine confirmation of receipt",141],["T04 Determine confirmation of receipt@@T06 Determine necessity of stop advice",103],["T10 Determine necessity to stop indication@@T05 Print and send confirmation of receipt",102],["T05 Print and send confirmation of receipt@@T10 Determine necessity to stop indication",86],["T06 Determine necessity of stop advice@@T02 Check confirmation of receipt",75],["T03 Adjust confirmation of receipt@@T02 Check confirmation of receipt",51],["T02 Check confirmation of receipt@@T03 Adjust confirmation of receipt",43],["T06 Determine necessity of stop advice@@T04 Determine confirmation of receipt",43],["T11 Create document X request unlicensed@@T12 Check document X request unlicensed",39],["T06 Determine necessity of stop advice@@T07-1 Draft intern advice aspect 1",38],["T12 Check document X request unlicensed@@T14 Determine document X request unlicensed",38],["T14 Determine document X request unlicensed@@T15 Print document X request unlicensed",38],["T07-1 Draft intern advice aspect 1@@T06 Determine necessity of stop advice",34],["T10 Determine necessity to stop indication@@T11 Create document X request unlicensed",34],["T07-2 Draft intern advice aspect 2@@T06 Determine necessity of stop advice",22],
(GET) /getAllVariants

If the user is allowed, gets all variants of the given log

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 considered

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • variants: the list of variants (along with the number of occurrences) of the given log, e.g.
{"variants":[{"caseDuration":377970.9495091164,"count":713,"variant":"Confirmation of receipt+complete,T02 Check confirmation of receipt+complete,T04 Determine confirmation of receipt+complete,T05 Print and send confirmation of receipt+complete,T06 Determine necessity of stop advice+complete,T10 Determine necessity to stop indication+complete"},{"caseDuration":433033.837398374,"count":123,"variant":"Confirmation of receipt+complete,T06 Determine necessity of stop advice+complete,T10 Determine necessity to stop indication+complete,T02 Check confirmation of receipt+complete,T04 Determine confirmation of receipt+complete,T05 Print and send confirmation of receipt+complete"},{"caseDuration":0.0,"count":116,"variant":"Confirmation of receipt+complete"},{"caseDuration":356378.8086956522,"count":115,"variant":"Confirmation of receipt+complete,T02 Check confirmation of receipt+complete,T06 Determine necessity of stop advice+complete,T10 Determine necessity to stop indication+complete,T04 Determine confirmation of receipt+complete,T05 Print and send confirmation of receipt+complete"},{"caseDuration":415930.73333333334,"count":75,"variant":"Confirmation of receipt+complete,T02 Check confirmation of receipt+complete,T04 Determine confirmation of receipt+complete,T06 Determine necessity of stop advice+complete,T10 Determine necessity to stop indication+complete,T05 Print and send confirmation of receipt+complete"},{"caseDuration":475420.65,"count":40,"variant":"Confirmation of receipt+complete,T06 Determine necessity of stop advice+complete,T02 Check confirmation of receipt+complete,T04 Determine confirmation of receipt+complete,T05 Print and send confirmation of receipt+complete,T10 Determine necessity to stop indication+complete"},{"caseDuration":256788.2142857143,"count":28,"variant":"Confirmation of receipt+complete,T02 Check confirmation of receipt+complete,T06 Determine necessity of stop advice+complete,T04 Determine confirmation of receipt+complete,T05 Print and send confirmation of receipt+complete,T10 Determine necessity to stop indication+complete"},{"caseDuration":1303986.64,"count":25,"variant":"Confirmation of receipt+complete,T02 Check confirmation of receipt+complete,T04 Determine confirmation of receipt+complete,T05 Print and send confirmation of receipt+complete,T06 Determine necessity of stop advice+complete,T10 Determine necessity to stop indication+complete,T11 Create document X request unlicensed+complete,T12 Check document X request unlicensed+complete,T14 Determine document X request unlicensed+complete,T15 Print document X request unlicensed+complete"},{"caseDuration":107351.53846153847,"count":13,"variant":"Confirmation of receipt+complete,T06 Determine necessity of stop advice+complete,T02 Check confirmation of receipt+complete,T10 Determine necessity to stop indication+complete,T04 Determine confirmation of receipt+complete,T05 Print and send confirmation of receipt+complete"},
(GET) /getAllCases

If the user is allowed, gets all cases of the given log (if specified, belonging to a specific variant)

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 considered

variant => if provided, the variant the cases should belong to

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

cases => list of cases of the log along with their duration (caseDuration), their start time (startTime) and their end time (endTime)

{"cases":[{"caseDuration":23836141.0,"caseId":"case-4601","endTime":1316173539,"startTime":1292337398},{"caseDuration":14499725.0,"caseId":"case-6279","endTime":1313657054,"startTime":1299157329},{"caseDuration":13556751.0,"caseId":"case-6437","endTime":1313657150,"startTime":1300100399},{"caseDuration":13393593.0,"caseId":"case-3927","endTime":1303905646,"startTime":1290512053},{"caseDuration":12705238.0,"caseId":"case-8141","endTime":1323187651,"startTime":1310482412},{"caseDuration":11249594.0,"caseId":"case-4346","endTime":1301925261,"startTime":1290675666},{"caseDuration":9701455.0,"caseId":"case-5959","endTime":1308255637,"startTime":1298554182},{"caseDuration":8446989.0,"caseId":"case-5585","endTime":1316702726,"startTime":1308255737},{"caseDuration":7874166.0,"caseId":"case-5457","endTime":1306238622,"startTime":1298364456},{"caseDuration":7862042.0,"caseId":"case-10071","endTime":1326880257,"startTime":1319018215},{"caseDuration":6558282.0,"caseId":"case-4161","endTime":1297073063,"startTime":1290514781},{"caseDuration":6287657.0,"caseId":"case-5351","endTime":1301561394,"startTime":1295273736},{"caseDuration":6223243.0,"caseId":"case-8550","endTime":1316777485,"startTime":1310554242},{"caseDuration":5965056.0,"caseId":"case-8424","endTime":1315911328,"startTime":1309946272},{"caseDuration":5791233.0,"caseId":"case-8656","endTime":1316791267,"startTime":1311000034},{"caseDuration":5692658.0,"caseId":"case-6374","endTime":1305806559,"startTime":1300113901},{"caseDuration":5441689.0,"caseId":"case-4537","endTime":1297781023,"startTime":1292339334},{"caseDuration":5266113.0,"caseId":"case-5141","endTime":1300715617,"startTime":1295449504},{"caseDuration":4317919.0,"caseId":"case-9076","endTime":1317737814,"startTime":1313419894},{"caseDuration":3964776.0,"caseId":"case-4084","endTime":1292848707,"startTime":1288883931},{"caseDuration":3894089.0,"caseId":"case-8743","endTime":1315220208,"startTime":1311326119},{"caseDuration":3888212.0,"caseId":"case-6649","endTime":1305212455,"startTime":1301324242},{"caseDuration":3808296.0,"caseId":"case-10011","endTime":1322149036,"startTime":1318340740},{"caseDuration":3796005.0,"caseId":"case-8653","endTime":1314794835,"startTime":1310998830},{"caseDuration":3795191.0,"caseId":"case-8646","endTime":1314785665,"startTime":1310990473},{"caseDuration":3694737.0,"caseId":"case-5865","endTime":1301650936,"startTime":1297956199},{"caseDuration":3615950.0,"caseId":"case-9860","endTime":1322134900,"startTime":1318518949},{"caseDuration":3558903.0,"caseId":"case-5595","endTime":1303137001,"startTime":1299578098},{"caseDuration":3558005.0,"caseId":"case-891","endTime":1289569244,"startTime":1286011239},{"caseDuration":3521908.0,"caseId":"case-6315","endTime":1303807354,"startTime":1300285445},
(GET) /getEvents

If the user is allowed, gets the events of a specific case of the given log

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 considered

caseID => the case that we are interested to

Returns:

If the session is not valid or the user has not visibility on the event log, then an empty JSON

If the case ID is not in the log, then an empty JSON

If the session id is valid, the user has visibility on the event log, and the case ID is in the log, then a JSON with the following properties:

events: contains the list of events of the case. Each event is expressed as a key-value dictionary

(POST JSON) /getAlignmentsVisualization

If the user is allowed, perform alignments between the log and the model provided in the POST JSON to the service, and returns a Petri net decorated with the deviations and a table of alignments (that is equivalent to the one provided in ProM)

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 considered

POST content (JSON): a JSON with the following properties:

model => the PNML string of the Petri net describing the model that the user wants to use for alignment

Returns:

If the session is not valid or the user has not visibility on the event log, then an empty JSON

If the alignments were performed, but an exception was encountered, then an empty JSON.

If the session is valid, the user has visibility on the event log, and the alignments were performed correctly, then a JSON with the following properties:

  • petri: a base64 string of the SVG representation of the Petri net decorated with alignments
  • table: a base64 string of the SVG representation of the alignments table