RapidGen Supporting Decision Model & Notation (DMN)

Jan03

RapidGen Software, with its own Decision Table-based language, RPL, is adopting the Decision Model & Notation (DMN) open standard from the Object Management Group to standardize its representation of business decisions.

Decision Modelling, and DMN specifically, are quickly gaining acceptance across all industries worldwide. James Taylor and Jan Purchase, authors of Real-World Decision Modeling with DMN, have expressed confidence that Decision Modeling will flourish in 2017:

DMN represents the most complete and best supported means of modeling business decisions that is currently available or likely to become available in the near future.

DMN uses established means of representing business logic, such as decision tables, for which there are already many published best practices. It also supports analytic models and is open to extension to other logic representations. It remains under active review and development, with the 1.1 revision, for instance, adding formal support for the definition of Decision Services.…

Decision modeling adds value by bringing the organizations’ decision-making approach “out of the shadows”. Creating an explicit, managed and business-accessible definition of decision-making allows for validation, management, automation and more.

RapidGen Customers

RapidGen has been collaborating closely with Jan Purchase of Lux Magi to implement support for DMN within RapidGen Software. Priority has been placed on features that apply to efficiently executing decision management applications in the real-world.

RapidGen has extensive experience in large-scale, business-critical installations in many industries, including: mobile telecoms, aerospace, health care, and government. This experience together with the compact and elegant Decision Table logic of the RPL language enables RapidGen to provide a highly performant execution engine for DMN. Our collaboration with Lux Magi allows us to support large-scale financial applications such as regulatory compliance and liquidity risk management.

Expressing business logic in DMN decision tables and compiling them into RPL has many advantages. DMN is compact and easier for humans to read and it can be used to explain the outcome of decisions in each case. Also RPL has a proven track record for very high performance execution using minimal system resources.

Decision Table Example – Vacation Days (part 2)

Feb18

In part 1 we saw an example of the complex business rules for calculating days of annual leave entitlement.

We saw one way of representing those rules as a compact decision table. Here is another way…

This approach is based on first grouping together into age bands and then by length of service. This layout is probably easier to read than the first approach.

Days_leave MV 22
AGE >= ?          -  18 18 18 45 45 45 60 ELSE
AGE < ?           18 45 45 45 60 60 60 -  -
SERVICE >= 15     -  N  Y  -  N  Y  -  -  -
SERVICE >= 30     -  N  N  Y  N  N  Y  -  -
Days_leave +5     X  .  .  X  .  .  X  X  .
Days_leave +2     .  .  X  .  X  X  .  .  .
Days_leave +3     .  .  .  X  .  .  X  X  .

Solution 2 Explained

Initial ActionA Days_leave MV 22
  Rules 1B 2A 3D 4BC 5D 6D 7BC 8BC else
Conditions AGE >= ? 18 18 18 45 45 45 60 ELSE
AGE < ? 18 45 45 45 60 60 60
SERVICE >= 15 N Y N Y
SERVICE >= 30 N N Y N N Y
Actions Days_leave + 5 XB . . XB . . XB XB .
Days_leave + 2 . . XD . XD XD . . .
Days_leave + 3 . . . XC . . XC XC .

Notes

A Every employee receives at least 22 days.

  • The initial action assigns 22 days.
  • Rule 2 does not add any extra days.

B Only employees younger than 18 or at least 60 years, or employees with at least 30 years of service will receive 5 extra days.

  • Rule 1 adds 5 days for under 18s.
  • Rule 8 adds 5 days for over 60s.
  • Rules 4 & 7 adds 5 days for others with over 30 years service.

C Employees with at least 30 years of service and also employees of age 60 or more, receive 3 extra days, on top of possible additional days already given.

  • Rules 4 & 7 add an extra 3 days for those with over 30 years service.
  • Rule 8 adds an extra 3 days for those over 60 years old.

D If an employee has at least 15 but less than 30 years of service, 2 extra days are given. These 2 days are also provided for employees of age 45 or more. These 2 extra days can not be combined with the extra 5 days.

  • Rules 3 & 6 add 2 days for those with 15-30 years service.
  • Rule 5 adds 2 days for 45-60s with less than 15 years service.

E ELSE

  • The ELSE rule covers any rules not stated.

It is unlikely that rule 4 will be satisfied as the age of the employee would have to be 14 or less when they joined.

Data Checks

The decision table above works so long as the input data is valid. There probably should be checks on age and service. For example, age could be 20 and service 30 which although invalid would satisfy rule 4.

Possible checks

  • Checks for minimum and maximum ages
  • Check that an age of a person is greater than their years of service — or take the minimum age from their real age and check that the result is more than their years of service.

Of course if you know your data is valid then there should be no problem but unfortunately data can become corrupted.


The following decision table, written in RapidGen’s decision table language RPL, includes the condition to check that the years of service cannot be more than they should be for the person’s age.

*DETAB Calculate_Days_leave
I Days_leave  MV 22         [Everybody gets 22 days
  Minimum_age MV 15         [Set minimum age
  Service_age MV AGE        [Set Service age to be age
  Service_age - Minimum_age [less the minimum age for comparison
C SERVICE     <= Service_age Y  Y  Y  Y  Y  Y  Y  Y  ELSE
  AGE         >= ?           -  18 18 18 45 45 45 60  -
  AGE         <  ?           18 45 45 45 60 60 60 -   -
  SERVICE     >= 15          -  N  Y  Y  N  Y  Y  -   -
  SERVICE     >= 30          -  N  N  Y  N  N  Y  -   -
A Days_leave  += 5           X  .  .  X  .  .  X  X   . [+5 extra days
  Days_leave  += 2           .  .  X  .  X  X  .  .   . [+2 extra days
  Days_leave  += 3           .  .  .  X  .  .  X  X   . [+3 extra days 
  DISPLAY     ‘Error’        .  .  .  .  .  .  .  .   X [show error

Executing Decision Table Logic

These screenshots show the original decision tables being run without the additional data checks.

run decision table

This screenshot shows a decision table being run from a command prompt. The user is prompted to input:

  • Name = Jim
  • Age = 44
  • Service = 14

The output repeats the input values and the calculated days leave = 22. It also shows which rule was used (Rule E)

A command prompt like this can be useful when testing, but typically input and output are both data files. RPL offers great flexibility for reading and writing in many formats.

run embedded decision table

In this screenshot instead of a command window the decision table logic has been embedded in a C or C++ program.

For inputs:

  • age = 59
  • service = 30

The result is calculated as 30 days leave and used rule 3 (R3).

Decision Table Example – Vacation Days (part 1)

Feb18

This decision table example addresses one of the challenges faced by business analysts — by bridging the complexities of the real world with the simplified, logical, organized world of IT systems.

Business analysts need a way to distill the fluid, complex business rules and decision-making processes from the real world of business. They need a format that is 100% precise for IT but still makes sense for non-IT specialists.

Decision tables have been used for decades but recently have been re-emerging as a popular format to represent logic like this. So that IT developers and business professional can work together more easily and more efficiently.

One of the main reasons decision tables are being used more frequently again is their adoption in September 2015 as the official standard by Object Management Group (OMG) for Decision Model and Notation (DMN).

Read the DMN Demystified blog series by Bruce Silver for a useful explanation of DMN.

Realistic Business Problem — Vacation Days

This scenario was set as a challenge by Prof. Jan Vanthienen at the Decision Management Community to test how companies can use decision tables for business logic.

The number of vacation days depends on age and years of service

Every employee receives at least 22 days. Additional days are provided according to the following criteria:

  1. Only employees younger than 18 or at least 60 years, or employees with at least 30 years of service will receive 5 extra days.
  2. Employees with at least 30 years of service and also employees of age 60 or more, receive 3 extra days, on top of possible additional days already given.
  3. If an employee has at least 15 but less than 30 years of service, 2 extra days are given. These 2 days are also provided for employees of age 45 or more. These 2 extra days can not be combined with the extra 5 days.

Solution 1

The business rules can be written unambiguously as conditions and actions in a decision table. The following decision table has unique conditions and uses an ELSE rule to catch any exceptions.

Days_leave <- 22
AGE < 18         Y N N N N ELSE
AGE >= 60        N Y - N N -
SERVICE >= 30    N - Y N N -
SERVICE >= 15    N - - Y N -
AGE >= 45        N - - - Y -
Days_leave + 5   X X X . . .
Days_leave + 2   . . . X X .
Days_leave + 3   . X X . . .

The decision table above is compact and precise. It is also readable by business and IT professionals when they have been shown how to read a decision table.

How to Read a Decision Table

Below is a brief refresher on reading decision tables. Watch this introduction to decision tables video for a clearer explanation.

Decison tables are usually shown with text aligned in columns. This is optional but is recommended for readability.

Conditions AGE < 18 Y N N N N ELSE
AGE >= 60 N Y N N
SERVICE >= 30 N Y N N
SERVICE >= 15 N Y N
AGE >= 45 N Y
Actions Days_leave + 5 X X X . . .
Days_leave + 2 . . . X X .
Days_leave + 3 . X X . . .
The 2 main horizontal parts to a decision table are conditions and actions

  • Conditions are like questions. Data is checked to see whether it meets each condition (Y) or not (N).
  • Actions are what should be done if the conditions above are met. X means do the action.

Each column of table entries makes up a rule. If the combination of conditions being true(Y) or false(N) matches that rule then the corresponding actions in that column should be performed.

Where a rule contains a dash(-) this means either true or false. i.e. this condition does not need to be checked.

Solution 1 Explained

Initial ActionA Days_leave <- 22
  Rules 1 2 3 4 5 else
Conditions AGE < 18 YB N N ND ND ELSEE
AGE >= 60 N YBC ND ND
SERVICE >= 30 N YBC ND ND
SERVICE >= 15 N YD ND
AGE >= 45 N YD
Actions Days_leave + 5 XB XB XB . . .
Days_leave + 2 . . . XD XD .
Days_leave + 3 . XC XC . . .

Bold text and yellow footnotes have been added to help explain how the business logic from the problem has been translated into a decision table.

Notes

A Every employee receives at least 22 days.

  • An initial action to assign 22 days regardless of anything else happening.

B Only employees younger than 18 or at least 60 years, or employees with at least 30 years of service will receive 5 extra days.

  • Rules 1-3 check the first 3 conditions and if true add 5 days leave.

C Employees with at least 30 years of service and also employees of age 60 or more, receive 3 extra days, on top of possible additional days already given.

  • Rules 2 and 3 check conditions 2 and if true add an extra 3 days leave.

D If an employee has at least 15 but less than 30 years of service, 2 extra days are given. These 2 days are also provided for employees of age 45 or more. These 2 extra days can not be combined with the extra 5 days.

  • As the 2 days leave cannot be combined with 5 days leave, rules 4 and 5 ensure the first 3 conditions are all false (N).
  • When conditions 4 and 5 are met without the first 3 conditions being met, then 2 days annual leave is added.

E ELSE

  • The ELSE rule covers any rules not stated (and is normally an exception handler) and in this instance covers all the ages and service years that don’t receive extra days.
  • Watch this ELSE rule video for more information.

Full Code

The decision table represents all the logic. For a full working program we need to also define the fields, inputs, and outputs to display. And it’s always good practice to add comments, shown after “[“

This full code example is written in RapidGen’s decision table language: RPL

 
*DIC
 Days_leave %I2                [Define an integer field
 AGE        %I2  !15-80        [set age limits 15-80
 SERVICE    %I2  !0-65         [set service limits
 Name       %V32               [Define character string
 
*DETAB Calculate_Days_leave
I Days_leave    MV 22          [Everybody gets 22 vacation days
  INPUTP        Name;          [In this example we input employee’s
  INPUTP        AGE;           [name, AGE
  INPUTP        SERVICE;       [and years of SERVICE
 
C AGE     <  18	Y N N N N ELSE [Is age less than 18
  AGE     >= 60	N Y - N N -    [Is age greater or equal to 60
  SERVICE >= 30	N - Y N N -    [Is service years greater or equal to 30
  AGE 	  >= 45	N - - Y N -    [Is age greater or equal to 45
  SERVICE >= 15   N - - - Y -  [Is service years greater or equal to 15
 
A Days_leave + 5  X X X . . .  [Add 5 to vacation days
  Days_leave + 3  . X X . . .  [Add 3 to vacation days
  Days_leave + 2  . . . X X .  [Add 2 to vacation days
 
  DISPLAY Name,' ',AGE,' ',SERVICE,' Vacation ',Days_leave [show the result
  DISPLAY 'Rule ?' 1 2 3 4 5 E                             [show the rules
 
*GO

Summary

In the first part of this post we saw how a decision table can accurately represent complex business logic in a compact format that IT and business professionals can both read.

Read part 2 to see a different way to write this decision table, how to add some data quality checks, and to see examples of the decision table code running.

Example Decision Table in Action

Sep16

I recently put together some examples of real decision tables in action.

This example prepares invoices for sending to customers. It shows how concisely a decision table can contain the necessary logic in less than a page.

example-decision-table

The equivalent in COBOL or Java would run to a number of pages and be much harder to understand.

Download PDF Example

RapidGen at OpenVMS Boot Camp 2015

Jun16

2015 OpenVMS boot camp

OpenVMS Boot Camp 2015

Senior members of the RapidGen management team will be joining other leading members of the OpenVMS community for four days of technical content and peer-to-peer networking.

Attendees include HP OpenVMS engineers and executives, analysts, consultants, and industry professionals.

OpenVMS Boot Camp 2015
Radisson Hotel Nashua
11 Tara Blvd
Nashua, New Hampshire 03062
USA
27 – 30 September, 2014.
OpenVMS Boot Camp website

The OpenVMS Boot Camp is the largest gathering of the entire OpenVMS ecosystem in the world! Bringing together OpenVMS customers, engineers, executives, and partners from around the world to learn from each other and subject matter experts.

There will be over 50 sessions, expected topics will cover: databases, decision tables, future of OpenVMS, high availability, migration, performance, security, virtualization, and the new roadmap for OpenVMS.

Presentations and audio from last year’s sessions are available at 2014 sessions. Following the success of last year’s conference, RapidGen will be represented by

  • Ritchie McGladdery, Chairman & CEO
  • Jolyon Cox, Director and Head of Development
  • Howard Rogers, Director Technical Support

Naturally, the renewed development of OpenVMS by VMS Software Inc will be a central topic for the conference, with the Bolton release having recently shipped and OpenVMS V9.0 due in 2017.

RapidGen is committed to supporting OpenVMS v9.0 on x86-64 architecture and to porting Genius Suite and other RapidGen software to this platform soon after its release.

Are You Attending OpenVMS Boot Camp 2015?

The RapidGen team are taking the opportunity to meet with customers and partners at the conference

Please let us know if you’re attending and we can arrange a private meeting for you.
info@rapidgen.com

The ELSE Rule – Why Every Decision Table Needs One

Dec02

All decision tables have an ELSE rule whether explicit or implicit.

David Durant explains why you should always define your own.
Watch

RapidGen at Building Business Capability 2014

Oct27

bbc-building-business-capability-2014-conference-640

bbc Business Building Capability

Ritchie McGladdery, RapidGen’s Chairman and CEO, will be attending the bbc conference in Florida 2-6 November.

The Building Business Capability conference combines insight into business analysis, business strategy & transformation, and business rules & decisions to facilitate creating the agile enterprise.

Building Business Capability 2014
Westin Diplomat Resort & Spa
Hollywood Florida
2-6 November, 2014.
www.BuildingBusinessCapability.com

This event includes workshops and nine tracks of presentations over five days. Key themes include

RapidGen’s Embeddable Decision Table facility, currently in development, will offer flexibility and advanced business logic to business analysts. It allows external calls to powerful Decision Table tabular logic from most business software packages. Business analysts can modify and create business logic and rules without needing to involve their IT department.

Are You Attending bbc 2014?

Please let us know if you’re attending and we can arrange for you to meet up with Ritchie McGladdery.
info@rapidgen.com

Decision Tables as a Programming Tool

Oct16

Howard Rogers was invited to present a best practices session at Decision CAMP 2014 in Silicon Valley. The session compared decision tables as an alternative to “conventional” programming languages.

Questions?

Please let us know if you have any questions for Howard Rogers or would like to receive an annotated copy of the presentation which provides detailed explanations of individual slides.
info@rapidgen.com

RapidGen Speaking at Decision CAMP 2014

Oct08

Decision Camp 2014


Update: 8 October Full schedule of sessions and speakers has now been published. Full Agenda


Howard Rogers, RapidGen’s Director of Technical Support is speaking at Decision CAMP 2014
Decision Tables as a Programming tool
1:00pm 14 October 2014

Decision CAMP is the event for decision management practitioners. Attendees include business analysts, business experts, developers, and architects that use decision management technologies such as business rules, predictive analytics, business intelligence, and decision optimization.

Decision CAMP 2014
PayPal Silicon Valley Campus
San Jose, California
13-15 October, 2014.
www.decision-camp.com

Paypal Office

Decision Tables as a Programming Tool

Howard’s presentation and demonstration is on the theme of decision tables as a programming tool and will be included in the best Practices sessions on Tuesday 14, October.

The talk will include

  • Rule redundancy
  • Rule reduction
  • Optimisation
  • Bit-masking for run-time evaluation
  • Demonstrating relevance testing

Practical code examples will compare decision tables with “conventional” programming languages and demonstrate

  • How decision tables can be used but as a practical and efficient programming tool, not just as visual representations of complex logical processing
  • Shortcut compact coding techniques
  • Comparisons for simple truth and complex logic coding

The advantages and disadvantages of using tools based on interpretive, tokenised, or fully-compiled execution architectures will be fully explained.

There will be a round-up of current programming and application development tools on the market that can use decision tables. We will discuss future developments and techniques that allow structured decision tables (embeddable decision table facility) to be incorporated into any programming language.

Are You Attending Decision CAMP 2014?

Please let us know if you’re attending and we can arrange for you to meet up with Howard Rogers.
info@rapidgen.com

RapidGen at OpenVMS Boot Camp 2014

Sep15

OpenVMS Boot Camp 2014

OpenVMS Boot Camp 2014

David Durant, RapidGen’s consulting lead is joining other OpenVMS practitioners for four days of technical content and peer-to-peer networking in Boston, USA. Attendees include HP OpenVMS engineers and executives, analysts, consultants, and industry professionals.

OpenVMS Boot Camp 2014
Doubletree by Hilton
44 Middlesex Turnpike
Bedford, Massachusetts, USA
29 Sep – 1 Oct, 2014.
connect-community.site-ym.com

The OpenVMS Boot Camp is the only event that brings together OpenVMS customers, engineers, executives, and partners from around the world to learn from each other and subject matter experts. There will be over 50 sessions covering big data, cloud, databases, high availability, migration, performance, programming, secuity, storage, and virtualization.

One of the hottest topics will be the announcement in July that VMS Software Inc. (VSI) has been formed to continue development of OpenVMS. This has prompted a surge of creative energy to support modernization across the OpenVMS community.

VSI has been allocated three of the General Sessions and is offering one-on-one sessions with participants to encourage input from the OpenVMS community on the forward path of this Operating System. Of particular relevance for RapidGen customers are VSI’s plans to release a version for the x86 architecture, currently proposed for 2016.

RapidGen is committed to supporting this new version of OpenVMS on x86 and to porting Genius Suite and other RapidGen software to this platform soon after its release.

David will also be attending the Pre-Conference Seminar “OpenVMS Boot Camp: Modernization – What is Being Done and How – Open Source, Web, Cloud and…BEYOND!” on Sunday 28 September.

Are You Attending OpenVMS Boot Camp 2014?

Please let us know if you’re attending and we can arrange for you to meet up with David Durant.
info@rapidgen.com

Sidebar