Forum Discussion

FICO's avatar
FICO
Community Manager
3 years ago

I am wanting to create a variable within FICO DM that holds it value throughout multiple API calls for a specific time.

 An example being I want to set risk tolerances that can be sent and consumed before work hours and are used by our components throughout the day.

3 Replies

  • FICO's avatar
    FICO
    Community Manager

    Decision Modeler is a stateless service. If you want a variable to have a lifetime beyond a single call to the engine, the surrounding architecture will need to store that value and pass it in as an argument. This could be either from your calling application, or a part of the platform orchestration.

  • FICO's avatar
    FICO
    Community Manager

    Tom,

    Would we be able to create a local or global variable within the existing service that holds this value without the need to create 'external' storage variables?

  • FICO's avatar
    FICO
    Community Manager

    There are multiple ways to create local or global variables, the best being the usage of business terms which can store values that could be calculated from data passed into the rules, as well as lists of possible values. These terms would last for the entirety of the call to the rules, and then be cleared from memory at the end of the call.