IRD
Contents
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:
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:
Operators
In the current version of IRD the following operators are supported:
- Select: Selects properties of an element from a sequence (Monad definition)
- Select All
- Filter: Filters a source based on some conditions (Monad definition)
- Group: Groups a source based on combination of values (Monad definition)
- Intersect: Finds intersection of two or more sources (Monad definition)
- Union: Creates a sequence, containing all the input sources (Monad definition)
- Minus: Finds differences between two sources (Monad definition)
- Skip: Skips a number of element from beginning of a source (Monad definition)
- Take: Returns a number of elements from beginning of a source (Monad definition)
- Order: Orders a sequence ascending or descending (Monad definition)
- Count: Returns numbers of elements inside a sequence (Monad definition)
- Min: Returns minimum value of a sequence (Monad definition)
- Max: Returns maximum value of a sequence (Monad definition)
- Sum: Returns a sum-up value of a sequence (Monad definition)
- Average: Returns average value of a sequence (Monad definition)
- Any: Returns true, if any element of a sequence meet a criteria, otherwise false (Monad definition)
- 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
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:
- one from top green Select, which will act as the information source
- the other one, from bottom green Select which will act as parameters
When passing information around in the graph, the receiver node may need:
- Exactly the result of the previous operator
- 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.
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.
- Information Requirement Diagram
- Common cars tutorial