IRD

From FlexRule Wiki
Jump to: navigation, search

Information Requirement Diagram

Information Requirement Diagram or in short IRD is a model to define a graph to process data using data operations, business knowledge, rules and produce 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 have specific type of associations with other nodes of the graph.

Bellow is an IDR sample:

Ird-sample-car.png

In execution time, IRD uses monadic operators underneath.

Elements

In the table bellow, all the different type of nodes on an IRD model is illustrated:

Node Type Notation Description
Operator Ird monadOperator.png The act of applying an operator on a source of data which would create/generate new set of data as a source to the other nodes of graph. e.g. select, filter...
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 in any stage.
Information Ird information.png Denotes relation between nodes that passes a source as an input information to a destination node. Information is the source of the next monadic operator.
Knowledge Idr knowledge.png Denotes relation between nodes that passes 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 intersection of two or more sources (Monad definition)
  6. Union: Creates a sequence, containing all the input sources (Monad definition)
  7. Minus: Finds differences between two sources (Monad definition)
  8. Skip: Skips a number of element from beginning of a source (Monad definition)
  9. Take: Returns a number of elements from beginning of a source (Monad definition)
  10. Order: Orders a sequence ascending or descending (Monad definition)
  11. Count: Returns numbers of elements inside a sequence (Monad definition)
  12. Min: Returns minimum value of a sequence (Monad definition)
  13. Max: Returns maximum value of a sequence (Monad definition)
  14. Sum: Returns a sum-up value of a sequence (Monad definition)
  15. Average: Returns average value of a sequence (Monad definition)
  16. Any: Returns true, if any element of a sequence meet a criteria, otherwise false (Monad definition)
  17. All: Returns true, if all element of a sequence meet a criteria, otherwise false (Monad definition)

Associations

Associations in the graph are responsible to pass on information to a destination node as the source. 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 passing parameters (knowledge). In the above picture, the Intersect g1, g2 will have two inputs to the whole intersect operator:

  1. one from top green Select, which will act as the information source
  2. the other one, from 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. 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 based to the next operator as an input information or processing parameters without any changes. If some changes required between transferring a source to the next operator, expression property of association can be used. In this case, the receiver will gets information that association's expression was applied on.

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 them 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 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