Share
Explore

icon picker
Process Mining Setup – Order of Operations

Development Tips
Autocomplete: use CTRL + SPACE to see suggestions for autocompletion
If you already know which attribute should be used in an expression, you can right click on the attribute and select New expression. The attribute will already be entered in the new expression.
You might want to inspect an attribute or expression while you are creating a new expression. In that case, you do not need to close the current expression and open the attribute or expression itself, but you can open the attribute from the editor by holding CTRL and clicking the attribute or expression name.
Open help with the expression editor: When editing an expression, you can also open the documentation of a function directly by holding CTRL and clicking the function in the expression.
Alternatively, you can press F1 to open the help and search for the function name.
Use Ctrl-z to undo any changes you don’t want to keep.
Be sure to save and commit frequently!

1. Setup Development Environment
a. Get access to Superadmin tool
b. Create a repository for the customer project
c. Create a new app for the customer project and commit the workspace to the branch
d. Upload template files with scrubbed customer data
e. Upload connector files or setup SQL connector
https://docs.uipath.com/process-mining/docs/the-superadmin-page
2. Connect and Extract the Data
a. Connectors
i. Basic Connector for AppOne.
ii. SAP Order-to-Cash Connector for AppOne.
iii. SAP Purchase-to-Pay Connector for AppOne.
iv. SAP Connector for Purchase-to-Pay Discovery Accelerator.
v. SAP Connector for Order-to-Cash Discovery Accelerator.
vi. SQL Connector (new)
b. Load data file using appropriate connector for your project
i. Extracting data from source systems can be done by using CSV, XLSX exports, or by establishing an ODBC (Open Database Connectivity) connection and querying a database directly.
ii. Create the necessary connection string in Superadmin by double clicking on “Cases_input” for example. The connection string for a basic connector two files looks like this: 'driver={mvfile}; mv-enable=true; filename=JeffExam/Cases.csv; hasheader=True; delim=,; quote="; encoding=UTF8'
iii. If using SQL connector, (new data needs to be added here once we have a complete working document
c. Data Extraction vs. Data Loading
i. Data extraction takes place when data is pulled directly from a customers source system, and can be in different formats. For example, an ODBC connection to a customers SQL database.
ii. Data Loading occurs when the source data from the customer is already store in csv format for example.
d. Set the Table Scope for the Data
i. Server: the base directory of the files will be server data loaded from the Superadmin server data tab
ii. Workspace: the base directory is the root of the workspace you created for the current project
iii. None:This option is used only for tables that query data from an ODBC connection
iv. The table scope can be set in the Table Options dialog. Right-click on the name of a connection string table and select Advanced → Options
e. Attributes
i. The Basic Connector contains several predefined attributes (e.g. Case ID, Amount etc.). Mandatory attributes, such as Case ID, need to be filled. Optional attributes like Amount, Case type etc. can be used if applicable.
ii. If your input dataset contains exactly the same attribute names as the attributes defined in the Basic Connector, the attributes will automatically be attached to the proper attributes in the Basic Connector.
iii. Attributes contained in your dataset that do not match any of the predefined attributes in the Basic Connector can be added at the bottom of the table. When reloading the data, the software will ask whether you want to add these attributes.
iv. If the name of the attribute in the dataset differs from the name of the predefined attribute in the Basic Connector, then the attributes are not matched automatically. The Name in datasource setting in the attribute editor can be used to map the correct attributes together.
f. Once the data is loaded into the connector, click on a table and “reload”, then commit the data by clicking on the UiPath logo in the top left and select commit.
3. Clean the Data
a. Create expressions to clean the data
b. Syntax highlighting
Functions count, if, avg, case.jpeg
c. Each new expression adds a new column to the table
d. A common use case for a per record expression is to create a conditional check. The following example contains a conditional check: “If the Amount is higher than 20,000, we want to return the "High invoice", otherwise, we want to return the "Regular invoice". In UiPath Process Mining this is implemented using the if()-function.
f. Example expression by table
i. Cases_input: In cases_filter expression, add “Case_ID <> null and isfirstunique(Case_ID)” - Test and commit if satisfied
ii. Cases_preprocessing: Create expressions for “Case start”, “Case end”, “Case throughput time” - Test and commit if satisfied
iii. Events_preprocessing: Create expressions for “Event start for duration” and “Event duration” - Test and commit if satisfied
iv. Events_input: If the records contain leading characters that are not needed, create a new expression for Case_id and add the expression “Replace(Case_ID_input, "CORE_", "")”, then swap UID and name with the original Case_id and the new expression you created. Remember to 1. Set the availability of the new expression to public. 2. Swap UID’s. 3. Check references. 4. Set the availability of the faulty or replaced attribute to private. - Test and commit if satisfied
g. Filtering the data
i. By default, the Cases and Events filter are applied in the join of the Cases_preprocessing and Events_preprocessing table. Because of that, it is sufficient to only alter the filters themselves. The setting guarantees the preprocessing tables only contain data according to the filter definition.
ii. By default, both filters do not filter any data.
iii. Update the Cases_filter in Cases_input table with the following expression “Case_ID <> null and isfirstunique(Case_ID)
iv. In the Events_input table, look for a cases_filter lookup expression that contains
the expression “
v. In the Events_input table, confirm you have a events_filter expression and it contains “true and cases_filter”
vi. Test and commit changes to the dataset
4. Publish your changes to AppOne
a. Commit and export the data set
b. Create a release
c. Activate the release
5. Version Control
a. Version Control is a system that records changes to a file or set of files over time so that you can recall specific versions later. Version Control is essential to working together in teams.
b. Repository: A repository is an optimized storage location for apps. Repositories can be located within your installation, on a folder location, on the same server as the UiPath Process Mining installation, or on a different (external) server.
c. Branch: A branch is the permanent shared storage for all the files that belong to an app.
A branch contains the latest version of an app as well as the complete history of all the changes committed. A branch can also be defined as a list of all revisions that belong together.
d. Revision: A revision is created when you commit your changes. A revision refers to a specific version of all files that together define an app. The app can contain an application file, but also other files such as a settings file, images, help files, and so on. Revisions are saved to a branch and numbered starting at one when a branch is created.
e. Workspace: A branch contains one or more workspaces. A workspace is a personal copy of a revision from a branch. When you create a new app, the files of the latest revision of a branch are loaded. In the workspace, you can make changes in preparation for committing them to a branch. After committing, your workspace will have no more local modifications.
6. Enhance the Data with Table Types
Global tables are tables with only one record. The global tables Globals and Global_settings, are part of the Basic Connector and can be used to create constants etc.
a. UiPath Process Mining also provides the option to add additional input tables to the Basic Connector and enhance the event log with additional data.
b. To create a new input table
Right-click the list of tables.
SelectNew table.
SelectConnection string....
c. Define you connection string and type, i.e., Files, ODBS, SAP datasources
d. For files, use a similar connection string: 'driver={mvfile}; mv-enable=true; filename=JeffExam/Cases.csv; hasheader=True; delim=,; quote="; encoding=UTF8' (check input files for correct delimiter if you encounter an issue)
e. Example for ODBC
image.png
f. To use an ODBC connection, the required driver must be installed on the server running the UiPath Process Mining platform, and this server must be able to access that specific system.
g. Select correct table scope
h. Perform table joins as needed: Inner, left, right, full
i. In SQL, you can use the following clauses: Order by, Where and Aliasing
j. Set table availability to the correct one for your project: Public, Private, Hidden
k. The Global_settings table in the Basic Connector contains a Default period expression attribute to determine the default setting of the period filter within AppOne. This is the default time range presented to the end users in AppOne. You can add the following expression to the “Default period” expression under “Global_settings” > “Output”: listtojson(defaultperiod('quarter', dateadd('month', -1, listmax(records.Event_end))))
l. Commit your changes
7. Enhance the Data with Aggregate Expressions
a. An aggregate expression calculates a value for each unique value in the aggregate level. It can be compared to the GROUP BY function in SQL.
b. In an aggregate expression, it is also possible to access other levels than the selected aggregation level. We can use p (for parent) and c (for child) to traverse up and down the tree structure.
c. Utilize “Filter” and “Sort” in your calculations
d. Commit your changes
8. Enhance the Data with Lookup Expressions
Lookup expressions enable you to access attributes from another table. They can be seen as an implicit join. Lookup expressions have some similar elements to aggregate expressions.
a. For the lookup expression itself, you only have attributes of the Input table available. If you need to make a calculation that requires attributes from both tables used in the lookup, a separate aggregate/record expression is necessary.
b. The datasource attributes listed in both columns need to have the same values and must be placed in the same order. In the example above, we have added Case ID in both columns since it is the shared key between those tables.
c. Commit your changes
9. Debug
a. Metrics are used to define a calculation once and reuse it in the whole application. For example, you can make a metric to calculate the average amount. This metric can then be reused in different charts. It is not tailored to a specific chart.
b. A metric must be used in a place where the records are accessible, for example, Charts.
c. A Process graph gives insight into how the steps of a process relate to each other and shows all possible paths that cases take through the process.
d. To generate a Process graph, at least the Case ID, Activity, and Event end attributes must be available.
e. Next to the debug charts, it is often also beneficial to view the data in its table structure. In UiPath Process Mining this can be done in the data grid in the toolbar.
f. Application issues are grouped into categories. Below is an overview of the different categories of issues in order of importance.
Screen Shot 2022-06-02 at 09.55.25.png
Steps to solving issues: 1. Quick scan. 2. Solve the top issue. 3. Another quick scan. 4. Full scan
g. Ghosts: Deleting table items may cause references to be broken. In this case, a Ghost item will be created to maintain integrity until the developer can resolve the broken references.
h. Ghost items must not be deleted while there are still references to them. To remove a ghost, you must first replace all references to it.
i. To resolve the ghost, each reference needs to be inspected and the ghost attribute needs to be manually replaced with an attribute that should be used instead. Alternatively, if the reference is not needed anymore, it can also be removed.
j. Once the Ghost is no longer referenced anywhere, it can be safely deleted from the application. To do so use the Delete unused ghosts option, by clicking the UiPath logo and navigating to Advanced.
10. Publish Changes to AppOne
a. Making use of generic attributes: Both in the events table as well as in the cases table there are several generic attributes. These can be used to add additional attributes. Attributes added via this method will automatically also be available as end-user filters and in the appropriate selectors.
Release
i. Commit and export the data set
ii. Create a release
iii. Activate the release
b. When we have a release of AppOne and a Dataset we need to generate a cache. Generating a cache combines both and makes it available for the End-user.
11. Tags
a. Update Tags.csv file then reload data in Tags_input in the connector to view the new tags
b. Expressions are defined in the table Tags_preprocessing
c. The final piece of the puzzle is combining the tag and the logic. For this, we use the Tags filter expression in Tags_preprocessing. This has to be done for each tag.
d. Use ctrl+click to open up the Tag attribute to copy and paste the name to prevent typos.
e. To check the number of tags created based on your calculations, you can check the Tags base dashboard located in the output menu.
12. Due Dates
a. A due date is defined as an activity that needs to occur before a specified date and time.
b. A due date checks the difference between the Actual date of the event and the Expected date of the event.
c. Updated in Duedates.csv then reload Due_dates_input in the connector
d. Example expression in Due_dates_preprocessing - (per record): if(Activity = ‘ Pay invoice’
, dateadd(“day”, 10, Case_start))
13. Reference Models
a. Reference models allow you to combine business logic together with the process mining data. Reference models allow you to compare your expected process to the actual process using the process graph.
b. Every reference model needs an entry in the Reference models.csv located in the workspace of the Basic Connector. Here you have to define three things per reference model.
Reference model, i.e. the name of the reference model.
Trace ID, the trace ID can be seen as a variant ID. It allows you to specify multiple paths that belong to one reference model.
Activity, here you have to specify the activity that is supposed to happen at that point in the process. Since we have one line per activity it means that you will have as many lines for one Trace ID as there are activities.
14. Publish Changes to AppOne and the Customer
a. Generate output dataset - Advanced > Export output dataset
b. Release a new version of AppOne if changes were made
c. Generate a new cache
15. Pop open an adult beverage. You did it!

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.