IRD

From FlexRule Wiki
Jump to: navigation, search

Information Requirement Diagram

The Information Requirement Diagram (IRD) is a model used to define a graph in order to process data using data operations, business knowledge, and rules. It produces appropriate output to meet the data requirements of a specific business process or logic. An IRD is built by combining different nodes that are related to each other. Each node may specific types of associations with other nodes of the graph.

An IDR sample is shown below:

Ird-sample-car.png

In execution time, the IRD uses monadic operators underneath.

Elements

All of the different type of nodes on an IRD model are illustrated below:

Node Type Notation Description
Operator Ird monadOperator.png The act of applying an operator on a source of data which would create/generate a new set of data as a source to the other nodes of the graph (e.g., select, filter, etc.)
Input Data Ird input data.png data used as an input by one or more monadic operators.
Output Data Ird output data.png Denotes the output of the IRD model at any stage.
Information Ird information.png Denotes the relationship between nodes that pass a source as an input information to a destination node. Information is the source of the next monadic operator.
Knowledge Idr knowledge.png Denotes the relationship between nodes that pass a source as the processing parameters of a destination node.

Operators

In the current version of IRD, the following operators are supported:

  1. Select: Selects properties of an element from a sequence (Monad definition)
  2. Select All
  3. Filter: Filters a source based on some conditions (Monad definition)
  4. Group: Groups a source based on combination of values (Monad definition)
  5. Intersect: Finds the intersection of two or more sources (Monad definition)
  6. Union: Creates a sequence containing all of the input sources (Monad definition)
  7. Minus: Finds the differences between two sources (Monad definition)
  8. Skip: Skips a number of elements from the beginning of a source (Monad definition)
  9. Take: Returns a number of elements from the beginning of a source (Monad definition)
  10. Order: Orders a sequence either as ascending or descending (Monad definition)
  11. Count: Returns the number of elements inside a sequence (Monad definition)
  12. Min: Returns the minimum value of a sequence (Monad definition)
  13. Max: Returns the maximum value of a sequence (Monad definition)
  14. Sum: Returns a sum-up value of a sequence (Monad definition)
  15. Average: Returns the average value of a sequence (Monad definition)
  16. Any: Returns true if any element of a sequence meets a criterion, otherwise false (Monad definition)
  17. All: Returns true if all elements of a sequence meet a criterion, otherwise false (Monad definition)

Associations

Associations in the graph are responsible for passing on information to a destination node as the source. The source of information is provided to an operator (node) in two different roles:

  • Information
  • Knowledge

Association-role.png

The next node in the graph receives the information as an information source or passes parameters (knowledge). In the above picture, the Intersect g1, g2 will have two inputs to the entire intersect operator:

  1. one from the top green Select, which will act as the information source
  2. the other one from the bottom green Select, which will act as parameters

When passing information around in the graph, the receiver node may need:

  1. Exactly the result of the previous operator
  2. The result of the previous operator plus its association

In the first scenario, based on the role of the association (Information or Knowledge), the source will be passed to the next operator as an input information or processing parameters without any changes. If some changes are required while transferring a source to the next operator, the expression property of association can be used. In this case, the receiver will get the information on which the association's expression was applied.

Association-expression.png

In the above example, the purple group node does not pass the source as information directly to the next node (green select) because the association between these would apply a function (expression) on the information source before the next node (green select) receives it.

Sample

When you install FlexRule Designer, there is a sample called "Collections" which has a few examples in IRD.

Next sections

In the next couple of articles we will cover different aspect of modelling and executing the IRD.

  1. Information Requirement Diagram
  2. Common cars tutorial