1. Home
  2. Sample Projects
  3. School Staff and Student Validation

School Staff and Student Validation

◷ Reading Time: 4 minutes

This tutorial shows how to use Decision Tables and Natural Language to model business rules to execute in a JavaScript environment.

We will be using a scenario of validating the school staff and student relations.

Validation logic

  • A school should have only one principal.
  • Class teacher’s related principal ID should match with school principal’s ID.
  • All the students must have a class teacher ID.

Running the Sample

  • Open ValidateRelations_NL.xml or ValidateRelations_NL.xml.
  • Click on one of the given templates.
  • Click Debug.
  • Click Next Step to go step by step.
  • You will see the output under the Parameters window and error notifications in the Notification window (if there are any).

Test in JS Test Bed

You can test your logic in the built-in JS Test Bed.

  • Open ValidateRelations_NL.xml or ValidateRelations_NL.xml.
  • Click on JS Test Bed.
  • Click on Launch.
  • You will be directed to the JS Test Bed where you can test your logic.

Project Description

We have modeled the same business rules in two different files.

The project contains the following files:

Fact Concept

  • To show the properties of the person. But we have not used it in the project itself.

Decision Table

  • Define business rules in the tabular form and expressions

Natural Language

  • Write business rules in spoken language and monad expressions

Download the project

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

Updated on March 6, 2024

Article Attachments

Was this article helpful?

Related Articles