Decision Models

Navigation:  Decisions >

Decision Models

Previous pageReturn to chapter overviewNext page

A decision model is an ordered collection of decisions. It is the unit-of-work that is generated as source code, and which is ultimately implemented as a discrete ‘Decision Service’. It is the smallest unit that is addressable by the external application. Because it is a complete unit-of-work, it can be owned and managed by a particular workgroup/department.

Decision groups are primarily used to keep similar decisions within the decision model together so that IDIOM can process them as a single unit at runtime – that is, all children of a decision group will be processed together and in order (recursively). If the decision group is executed then the IDIOM Decision Engine will execute its child decisions and decision groups in the order presented. However, a decision group can be ‘aborted’ or ‘exited’ by any child decision beneath it. An aborted decision group rolls back all changes made by the decision group (on this execution only); an exited decision group simply stops processing at the point that the exit was issued.

Aborting a decision group can also occur when a child or other descendent decision or decision group aborts – the action can be ‘rolled up’ to the parent decision groups via the ‘Abort Parent’ action.

Decision groups are also able to update the schema in their own right, by creating nodes in particular.

We build a decision models by creating a ‘tree’ of decision groups and decisions. Decisions are always the leaves of the tree. The decision groups are used to give structure to the decisions, but they are not always passive – as noted, decisions groups are used to group decisions and other decision groups for processing, and they may also create context nodes that are subsequently used by their child decisions.

The pattern for building a decision model is similar to ‘mind mapping’ – we usually just drag the schema context node onto the decision group that we want our new decision/decision group to live under and it is done. We can then change the name and other attributes of the decision/decision group if we need to, but usually this is not needed.

In general, we suggest leaving the naming as defaulted – this makes decisions easy to find and understand, since they will have the same name and meaning as the context nodes that they create. The node names will be in NMTOKEN format (no blanks, few special characters etc), which is a rule of the W3C schema notation.

 

Tip

If you change the name of a decision/decision group, use normal mixed case. Any time you see a decision/decision group name with normal mixed case, you will immediately understand that the decision designer has made an exception for this decision/decision group – often this will be because there is more .

 

To get started on your decision model ‘tree’ we suggest that you always create a parent decision group to act as the ‘root’ for the model. The best node to use for the decision tree root is the Schema root node itself. You can have more than one ‘root’ node in your decision model, each one providing the root of a different ‘tree’, and each will execute in succession as you move down the decision model pane. You then construct your decision model ‘tree’ by dragging on decisions and decision groups as required. In an exception to the above naming tip, we suggest that you rename the root decision group to indicate the purpose of the entire tree – the fact that it uses the root node of the schema as context can usually be assumed.

For example, in our VehicleInsurance.idm repository we have a decision model for Validation and Price Private Vehicle Insurance, and a separate decision model for Commercial Vehicle insurance, etc.