Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Model Evaluation logic is used in the following use cases:

  1. 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 the type simple or dashboard), or looking at details of a tree node (on the tab of the type filtertree).

  2. When a logic from another module (e.g. Quotes) needs to get data from a 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.

  3. When Product Recommendation is configured for Quotes, it can use the Model’s Evaluation (and thus the evaluation logic) to retrieve the list of recommended products.

The evaluation logic characteristics:

...

  • 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 logics.

    • Standard – Calculates and provides the results.

  • Information provided to the logic:

    • Syntax Check:

      • Binding variables:

    • Standard:

      • Binding variables:

        • model (see ModelEvaluationFormulaContext) includes Model Table, inputs from previous steps and outputs from previous calculations.

        • input (Map)

          1. When used for visualizations on a

          tab
          1. Tab, it contains values of all inputs provided by the user in the input fields of the current tab.

          2. When used in evaluation (from other module, via api.model().evaluate()), it contains the parameters values passed to the logic.

          3. When the evaluation is called by Product Recommendation feature on Quotes, it will provide following values:

            • input['categoryName'] - for which category should the list of product recommendations be returned. Those categories are defined in the advanced property quoteProductRecommendationsConfig.

            • input['products'] - List of product IDs, which are already present in the quote.

            • input['customers'] - List of customer IDs, for which the quote is prepared.

            • input['type']

  • Expected logic execution outcome:

    • Syntax Check:

      • Input field definitions placed in the logic context

    • Standard:

    • in case of usage by Product Recommendation feature on Quotes:

      • one element must return result of type List<ItemRecommendation>

    • in other cases (e.g. Tabs evaluation, etc)

      1. When used for visualizations on a Tab - Results and their formatting are provided via the output of the visible (with DisplayMode set) logic elements

      .Critical Alert – When used on a tab, it will block the Continue button
      1. .

      1. The result value can be of almost any type:

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

        • Complex: Chart, ResultMatrix, Controller, …

        • Critical Alert – When used on a Tab, it will block the Continue button.

      2. When used in evaluation (from other module, via api.model().evaluate()) - Results are provided via the output of the visible (with DisplayMode set) logic elements.

      3. when used by Product Recommendation feature on Quotes:

        • one element must return result of type List<ItemRecommendation> (see api.newItemRecommendation())

        • when raised a Yellow, red, critical Alert, it will be presented to the user on the Quote.