{"id":31753749,"url":"https://github.com/servicenow/queue-reconstruction-tool","last_synced_at":"2025-10-09T17:54:08.415Z","repository":{"id":298899137,"uuid":"1000673691","full_name":"ServiceNow/queue-reconstruction-tool","owner":"ServiceNow","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-13T13:20:53.000Z","size":1014,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-13T14:19:06.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ServiceNow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-12T06:40:30.000Z","updated_at":"2025-06-13T13:20:56.000Z","dependencies_parsed_at":"2025-06-13T14:29:21.908Z","dependency_job_id":null,"html_url":"https://github.com/ServiceNow/queue-reconstruction-tool","commit_stats":null,"previous_names":["servicenow/queue-reconstruction-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ServiceNow/queue-reconstruction-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceNow%2Fqueue-reconstruction-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceNow%2Fqueue-reconstruction-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceNow%2Fqueue-reconstruction-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceNow%2Fqueue-reconstruction-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ServiceNow","download_url":"https://codeload.github.com/ServiceNow/queue-reconstruction-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceNow%2Fqueue-reconstruction-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001805,"owners_count":26083197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T17:54:00.614Z","updated_at":"2025-10-09T17:54:08.403Z","avatar_url":"https://github.com/ServiceNow.png","language":"Java","readme":"# Queue Reconstruction Tool\n\n\n## 1. Overview\n\nThe Queue Reconstruction Tool (QRT) is a command line tool for demonstrating the queue reconstruction approach described in paper \"Reconstructing Events of Processes with Queues\" (to be submitted to the BPM conference).\n\n![Fig.1](./documentation/fig_1.png \"Fig.1\")\n\n\nThe QRT: \n* imports an event log where each event has a case identifier, activity name, timestamp, team (group) identifier, and resource identifier, and\n* uses a provided responsibility map to reconstruct the team and resource queue identifiers for each event. \n\nAdditionally, the QRT allows us to \n* evaluate the queue reconstruction method, proposed in the paper, by generating a synthetic event log of the ITSM Incident process, reconstructing its queue, and comparing the reconstructed queue identifiers with the ground truth of the input synthetic log, and\n* reconstruct queue information in the BPI Challenge 2013 Incident event log.\n\n\n\n## 2. How to Install\n\n### 2.1. Prerequisite: Java 11 or Higher\n\nThe QRT is implemented and tested using Java 11.\n\n1. Install the most recent JRE 11 (or JDK 11 if you want to build the tool from sources)\n1. Ensure that a correct version of Java is configured: run `java -version` in the command line. You should get the following (or similar) response:\n\n`openjdk version \"17.0.10\"`\n\nIf you want to build the tool, install maven as well: https://maven.apache.org/\n\n### 2.2. Building the QRT from sources\n\n1. Clone the repository\n2. Run `mvn clean package` in the root directory of the repository\n3. The executable jar file `queue-reconstruction-tool-1.0-SNAPSHOT-jar-with-dependencies.jar` will be created in the `target` directory\n\n## 3. Getting Started\n\nYou can use this tool in the following scenarios:\n\n1. Evaluate the approach proposed in the paper\n2. Reconstruct the queues for the BPI Challenge 2013 Incident event log and generate its performance spectrum for exploring it in the Performance Spectrum Miner (PSM) https://github.com/processmining-in-logistics/psm\n3. Import an event log in the CSV format and reconstruct queues \n\nWe consider these scenarios in the following.\n\n### 3.1. Evaluating the Approach\n\nIn this scenario, the QRT generates a log of the ITSM Incident process with known queue identifiers, i.e., the ground truth, reconstructs the queue identifiers using the approach, and checks the result for errors.\nEach mismatching queue identifier is considered one error.\n\nThe tool requires the following input:\n`\u003cpath\u003e \u003ctraceNumber\u003e \u003cmaxDurationMs\u003e \u003cmaxEventNumber\u003e \u003cteamNumber\u003e \u003cresourceInTeamNumber\u003e \u003cseed\u003e`, where\n* `\u003cpath\u003e` is the path to the output directory\n* `\u003ctraceNumber\u003e` is the number of traces in the generated log\n* `\u003cmaxDurationMs\u003e` is the maximum duration of a process step in milliseconds\n* `\u003cmaxEventNumber\u003e` is the maximum number of events in a trace\n* `\u003cteamNumber\u003e` is the number of teams in the process\n* `\u003cresourceInTeamNumber\u003e` is the number of resources in each team\n* `\u003cseed\u003e` is the seed for the random number generator.\n\nExample:\n`java -cp ./target/queue-reconstruction-tool-1.0-SNAPSHOT-jar-with-dependencies.jar com.servicenow.processmining.queue.experiments.reconstruction.synthetic.EvaluationTool . 1000 1000000 15 100 100 0`\n\nOutput: `Error count: 0`\nThis output means that the queue reconstruction approach has not made any errors in the queue reconstruction.\nThe synthetic log is recorded in `initial_log.csv`, and the reconstructed log is recorded in `reconstructed_log.csv` in the output directory.\n\n### 3.2. Reconstructing the BPI Challenge 2013 Incident Event Log\n\nFirst, download the BPI Challenge 2013 Incident event log https://data.4tu.nl/file/0fc5c579-e544-4fab-9143-fab1f5192432/aa51ffbb-25fd-4b5a-b0b8-9aba659b7e8c on page https://data.4tu.nl/datasets/0fc5c579-e544-4fab-9143-fab1f5192432\n    \nThen, run the following command (providing the correct path to the log and the output directory):\n\n`java -cp ./target/queue-reconstruction-tool-1.0-SNAPSHOT-jar-with-dependencies.jar com.servicenow.processmining.queue.examples.bpic.BpicIncidentQueueReconstructionTool ./BPI_Challenge_2013_incidents.xes.gz ./output`\n\nAfter executing this command, the tool will generate the reconstructed log `bpic_reconstructed_log.csv` in the CSV format in the `output` directory, and the files to be imported in the Performance Spectrum Miner in the `output/performance_spectrum` directory.\n\nTo explore the performance spectrum, use the PSM to import these files. Choose `Folder with segment files' in the import dialog of the PSM:\n![Fig.2](./documentation/fig_2.png \"Fig.2\")\n\nAn example of the performance spectrum of the agent queues is shown below.\n![Fig.3](./documentation/fig_3.png \"Fig.3\")\n**Disclaimer.** \nWe supported the BPI Challenge 2013 Incident event log for demonstration purposes only. \nWe did not validate if the results were correct due to the lack of domain knowledge. \nMoreover, we do not know how accurate the recorded information on the team and resource assignment is. \n\n### 3.3. Importing and Reconstructing an Event Log\n\nFinally, it's possible to reconstruct an event log if all the required information is presented.\nAn event log must contain the following attributes for each event: case identifier, timestamp, activity label, team identifier, and resource identifier. Their columns must be ordered in the CSV file accordingly.\nThe tool expects the following timestamp format: `yyyy-MM-dd HH:mm:ss`.\n\nTo import and reconstruct an event log, run the following command:\n\n`java -cp ./target/queue-reconstruction-tool-1.0-SNAPSHOT-jar-with-dependencies.jar com.servicenow.processmining.queue.experiments.reconstruction.log.QueueReconstructionTool ./input/initial_log.csv ./input/responsibilities.json ./output/reconstructed_log.csv`\n\nThe first argument is the path to the input log, the second argument is the path to the responsibility map (see the paper for more detail), and the third argument is the path to the output directory.\nEvent log example:\n\n|`case_id`|`timestamp`|`activity`|`team`|`resource`|\n|---------|-----------|---------|------|----------|\n|`5`|`2024-12-05 15:33:23`|`New`|`team_17`|`EMPTY`|\n|`5`|`2024-12-05 15:47:00`|`InProgress`|`team_62`|`EMPTY`|\n\n\nResponsibility map example:\n\n`{\n  \"AwaitingCaller\" : \"REQUESTOR\",\n  \"Resolved\" : \"NOBODY\",\n  \"Closed\" : \"NOBODY\",\n  \"EMPTY\" : \"PROVIDER\",\n  \"New\" : \"PROVIDER\",\n  \"Cancelled\" : \"NOBODY\",\n  \"InProgress\" : \"PROVIDER\",\n  \"AwaitingProblem\" : \"TASK\"\n}`\n\n## 4. Source Code\n\nThe table below shows the package structure of the QRT.\n\n| Package                                                                   | Description                                                           |\n|---------------------------------------------------------------------------|-----------------------------------------------------------------------|\n| `com.servicenow.processmining.queue`                                      | The approach implementation                                           |\n| `com.servicenow.processmining.queue.experiments.io`                       | Import and export of event logs in different formats                  |\n| `com.servicenow.processmining.queue.experiments.simulation`               | Synthetic log generator                                               |\n| `com.servicenow.processmining.queue.experiments.reconstruction.synthetic` | Evaluation using synthetic logs                                       |\n| `com.servicenow.processmining.queue.experiments.reconstruction.log`       | Evaluation using imported logs                                        |\n| `com.servicenow.processmining.queue.examples.bpic`                        | BPI Challenge 2013 Incident log reconstruction and export for the PSM |\n| `com.servicenow.processmining.queue.examples.bpic.io`                     | The PSM  specific export                                              |\n| `com.servicenow.processmining.queue.examples.bpic.io`                     | The PSM  specific export                                              |\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservicenow%2Fqueue-reconstruction-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fservicenow%2Fqueue-reconstruction-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservicenow%2Fqueue-reconstruction-tool/lists"}