◷ Reading Time: 4 minutes
In this tutorial, we are going to demonstrate the behavior of a Decision Requirement Diagram using an example of a flight rescheduling scenario.
There will be two lists as the input for this scenario:
- Flights
- Passengers
These are the main decisions we will be making when reassigning the flights for the passengers who got the flights canceled:
- Determine passenger queue
- Reassign the passengers
Furthermore, as business knowledge, we will also filter out:
- Canceled Flights
Running the Sample
1. Open the file, Flight Reschedule.xml.

2. Click on Logic Run Template.

3. Click on one of the given templates.

4. Click Debug.

5. Click Next Step to go step by step.

6. Once the execution completes successfully, you will see the output under the Parameters window.

Process Steps
The process contains a set of main steps:
- Get canceled flights
- Determine passenger queue
- Reassign passengers
- Pick the first passenger in the queue
- Identify the best Active alternative flight
- Assign the alternative flight to the passenger
- Keep reassigning passengers until all the passengers in canceled flights are reassigned to active flights
Project Description
The project contains the following files:
DRD (Decision Requirement Diagram)
- Flight Reschedule.xml: Shows the data flow
- Reassign Passengers.xml: Reassigns the passengers
- BoxedExpressions.xml: Define expressions used in the DRD
The Model Design
We have used a DRD to define the decision hierarchy. The flight list and the passenger list are the inputs for this diagram.
- First, retrieve the canceled flights which are business knowledge.
- Then using the canceled flights, get the passenger list in the canceled flights.
- Finally, reassign those passengers to active flights.

The expressions in the boxed expression file were used in DRD nodes,
- Canceled Flights –> Get canceled Flights
- Determine Passenger Queue –> Get Passenger Queue

Natural language file contains separate functions for each step of making the decision “Reassign Passengers”.
For filtering the passengers and assignments in each logic in the natural language file, we used FlexRule built-in functions.
For example, in the image below, you can see that we have used the filter
function in Pick the first passenger in the queue
, to filter out the passengers

Download the project
Use the attachment at the end of the page to download the sample project.