Calculation Flow Logic

You will use a Calculation Flow logic when you need to:

  • Implement a scheduled task, which will be executed periodically (or just once).

Logic API

  • Logic Nature: calculationFlow

    • Logic Type: Calculation/Pricing

  • Execution Types:

    • Standard - to perform certain actions - usually to trigger some specific pricing actions, e.g., start Price List recalculation, etc.

  • Information provided to the logic:

    • Binding variables:

    • api.global - Its content is persisted between two executions of the same calculation Flow Items, so you can use it to remember information between the executions. Note that because there can be a long time between the two executions, the content of api.global is persisted in the database and there’s only limited space available for it. So ensure that before the scheduled task finishes, the api.global contains really only the data you need to persist between the calls, and nothing else (like cached objects etc.)

    • Allow object modifications - true. This logic can modify data in tables.

  • Expected logic execution outcome:

    • From Standard mode execution:

      • the logic can perform many actions, for example:

        • Perform calculations

        • Modify data in some master tables (e.g., using api.update()).

        • Modify data in some analytics tables

        • Execute actions available on the provided CalculationFlowActionBuilder object.

        • set values to api.global

      • content of api.global will be stored into database for next execution of the same Calculation Flow

      • elements outputs are not used in any way

Configuration

This logic must be registered in a Flow Item, which keeps the scheduling of the logic - on the page Administration › Configuration › System Configuration › Calculation Flows.

Code sample

Found an issue in documentation? Write to us.

Â