Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Model Evaluation logic is used in following use cases:

  • to provide inputs and results to be presented to the user on a Tab, when the user is browsing the model and looking at various Tabs (of type simple or dashboard), or looking at detail of a tree node (on Tab of type filtertree).

  • when a logic from other module (e.g. Quotes) needs to get data from model, it can call the model’s evaluation (and pass parameters to it), which will call the evaluation logic to provide the information from the model.

The evaluation logic characteristics:

  • evaluated synchronously - e.g. immediately, when the user interacts with the UI

  • their results are never persisted

  • their inputs are saved with the model (in case it is used in scenario, while the user is browsing the model)

  • They can do anything read only related to the Model Object where they are executed, including accessing previous steps inputs, previous calculations outputs, querying Model Tables, reading attachments, etc., via the model binding.

Configuration

The evaluation logic is referenced in the Model Class definition, in the formulaName property of:

  • a tab (only for types dashboard, simple and filtertree)

  • an evaluation

Logic API

To ensure that this synchronous experience is always smooth and reactive for the user : a good practice is to set the elementTimeout property of all the logic elements to 0.

  • Logic Nature: model_evaluation

  • Execution Types

    • Syntax Check - Defines the input fields of the logic. In case of Tabs, they will be rendered on the page, but in case of Evaluation, it will be used to receive the parameters passed from other logic.

    • Standard - Calculates and provides the results.

  • Information provided to the logic:

    • Syntax Check

      • binding variables:

    • Standard

      • binding variables

        • model (of type ModelEvaluationFormulaContext ) - it includes Model table, inputs from previous steps and outputs from previous calculations.

        • input (Map)- When used on a Tab, then it contains values of all inputs provided by the user in the input fields of the current Tab. When used in Evaluation, it contains the parameters values passed to the logic.

  • Expected logic execution outcome:

    • Syntax Check

      • input field definitions placed in the logic’s context

    • Standard

      • the results and their formatting are provided via output of visible (with DisplayMode set) logic elements

        • Critical Alert - when used on Tab, it will block the Continue button

      • the result value can be of almost any type:

        • simple: String, BigDecimal, Map, List, …

        • complex: Chart, ResultMatrix, Controller, …

  • No labels