Task 8: Adding a final decision node

You learn how to introduce a final decision node to simplify a decision model.

The previous steps introduced a decision diagram with two decision nodes, camera and lenses, which together describe a camera system. To simplify the model, you can introduce a single decision node that represents the entire camera system.

Exercise: Finalizing the decision model

Note: The solution for this exercise is available through the New decision service wizard under Practice tutorials. For more information about importing samples, see Building decision services.

You add a decision node that has a composite value that is made up of the camera model and the lens model:

  1. Go to the data model and create a composite type that is named camera system with the following attributes:
    • A single-valued attribute, camera model, of type string
    • A multi-valued attribute, lens models, of type lens model
  2. Return to the decision model and add a new decision node named camera system.
  3. Create links between the camera system node and the camera and lenses nodes:
    An example of a decision diagram
  4. Define the decision logic of the camera system node by adding the following business rule:
    set decision to a new camera system where 
        the lens models are lenses , 
        the camera model is camera ;

    Introducing a new type for a decision node with a composite value is a good practice.

After decision-making completes, every node in the decision diagram must have a value. Multi-valued nodes contain lists of values.
  • Input data node values are given, whereas decision node values are determined.
  • Node values are immutable once they are determined.

What to do next

You can now start reviewing the Best practices for defining the decision logic tutorial.