◷ Reading Time: 9 minutes
At the end of each sample, there is a link to download the complete project. Each project has a folder named sampleJSON which contains sample inputs.
- All the videos related to Sample projects: Sample Project Playlist
- Learn from building to testing a project: Build a project, deploy in the server and test the service URL
- Build a Project from Scratch: How to Build a Project from Scratch: FlexRule Designer
Business Decision and Rule Management System
This tutorial will use the scenario of checking the eligibility of a pilot as a means of scheduling flight duties. There are rules and regulations defined by the aviation authority, such as the maximum flight period, the maximum number of night shifts that a pilot can work, etc. For example, the maximum duty period should be 12.5 hours. The process contains a set of important steps.
- Calculate the daily flight duty period
- Count the number of landings
- Calculate flight time
- Check the eligibility of pilot on duty
Create a simple Decision Table that calculates delivery costs based on the total weight of a parcel. In the post office, this is usually based on a couple of conditions and business rules, but for the sake of this tutorial, let’s make it simple, as shown in the business rules below:
- If is Package between 0 and 22 kg then the delivery cost is 30$
- If is Package between 22 and 50 kg then the delivery cost is 33$
- If is Package between 50 and 110 kg then the delivery cost is 120$
- If is Package is heavier than 110 kg then the delivery cost is 200$
Defining rules to validate the names and addresses of an address book. Natural Language was used to write business rules.
This is a sample for the car insurance industry that calculates the premium of a car based on Auto and Base premium components. The business rules are for risk classification and calculation of the premium of a car. This example requires an SQL database connection.
The process of determining the eligibility of providing firearm licenses contain a set of serious rules that require 100% accuracy as it is related to security. The example will show how FlexRule can be used to automate this process.
- Read data from the previous applicant list
- Check whether the applicant is already applied
- For previous applicants, get the previous score
- For new applicants, calculate the score
- Determine eligibility
The process of approving a building plan contains a set of step according to building type, building size, number of stories, etc. The example shows how to use FlexRule Decision tables to write rules to automate this process.
Calculate a premium for a given liability amount based on these rules:
- Up to and including $50 000 –> fixed amount of $500.00 (Base premium)
- $50 001 to $100 000 –> Add $40.00 for each $10 000 increment
- $100 001 to $200 000 –> Add $30.00 for each $10 000 increment
- $200 001 to $300 000 –> Add $20.00 for each $10 000 increment
- $300 001 to $1 000 000 –> Add $10.00 for each $10 000 increment
- $1 000 001 to $3 000 000 –> Add $7.00 for each $10 000 increment
- $3 000 001 to $5 000 000 –> Add $10.00 for each $10 000 increment
A sample solution in order to create a home loan borrowing calculator.
The application gets information about the applicant’s personal details, earnings, and expenses as the input and as the output, it shows how much the applicant can borrow. We can also check whether the applicant is an existing customer of the bank by reading the database.
This is a sample for a symptom checker customised for checking the symptoms of COVID-19. The model takes the symptoms and certain other details of a patient and as the output, it provides recommendations to show what to do next. This model can be easily customised to provide recommendations for any disease/ diseases.
The tutorial will use the scenario of checking the symptoms of a patient and alert the carer with the next best action to be taken.
- The patient can select the symptoms and their status
- Then the system will go through a set of business rules to do the initial diagnosis and decide the next best action to be taken
- Finally, an alert email will be sent to the carers along with the next best action
Decision-Centric RPA (Robotic Process Automation)
Automate the process of a Google-search. It will search for a value in Google and filter the search results to get the list of links on the first page.
- Open a web browser (eg: Chrome, Firefox)
- Navigate to ‘www.google.com’
- Type ‘Flexrule’ in the search bar
- Press ‘Enter’ key- Copy each link one by one
- Close the web browser
Automate the process of reading emails of a recruitment email account to download applications and candidates’ details.
- Input the email address, and password of the recruitment email account and the job position that needs to be filtered.
- The process will read emails and download applications.
- Store them in separate folders according to the email address and date
Automate the process of reading résumés to check whether the required skills are presented.
- Load the résumé (PDF file)
- Search for each keyword
- Count the matching keywords
- Calculate the matching keyword percentage
Automate the process of reading data from an Excel file to get student records, calculate the total, average, and pass/fail state and write back to the file.
- Open the Excel sheet where you have saved student scores
- Calculate the Total
- Calculate the average
- Depending on the average determine pass/fail state
- Save the Excel sheet with a defined filename
Automate the process of writing a value in MS Paint and save the image file.
- Open MS Paint
- Click on the Text icon
- Click on the canvas where you want to type
- Type the text
- Save the file with a given name
Automate the workflow of the loan approval process
- Collect the applications
- Validate applications
- Check eligibility according to the bureau’s standards
- Determine loan application routing
- Team review if required
- Determine whether the loan is approved
Decision-Centric Data & Analytics
This example takes a dataset of weather details to train the model and finally, predicts the possibility of playing golf. It uses the C45 algorithm for predictions. It will:
- Input data
This example takes a dataset of symptoms to train the model and finally, diagnose whether the patient has cold, flu or allergies. It uses the Naive Bayes algorithm for predictions.
- Input data
The example is about predicting the flower type with a custom made algorithm using the PMML capability in FlexRule.
We have created a PMML file of a trained model using Python and connect that to make predictions. These predictions can be used as a part of a DRD to make decisions.
The example is about detecting breast cancer with a custom made algorithm using the PMML capability in FlexRule. In the end, the system will be able to determine whether the patient has the possibility of having breast cancer.
We have created a PMML file of a trained model using Python and connected that to make predictions. These predictions can be used as a part of a DRD to make decisions.
The data flow and ETL (Extract, transform, load) process was automated using the IRD (Information Requirement Diagram). The example will get details of a list of bank accounts and determine/calculate the following facts.
- Maximum balance
- Minimum balance
- Average of bank accounts
- Summation of balances
- Find the latest and oldest Bank accounts by Account opened date
RPA and Business Rules
Check the eligibility of a supplier. The supplier assessment will perform both a qualitative and quantitative evaluation and help to get the final decision. It will:
- Check the business registration number validity
- Check online whether the company is registered in the business registry
- Give a score depending on different criteria and calculate the final score
- Decide whether the supplier is eligible