Introduction
...
Calculation Flows Specifics
api.global
persists between Calculation Flow (CF) logic executions and is stored within the globalFormulaState
property of the CF object. If you do not want to share the global cache between logic executions, use the api.local instead, or add api.retainGlobal = false
at the beginning of CF logics.
Note: api.global
data in Calculation Flows (in the globalFormulaState
property) is stored as a String. Use the jsonDecode(String)
to convert it back to the Groovy object (a Map).
Example:
paste-code-macro | language | groovy
---|
def cf = api.find( "CF", Filter.equal("uniqueName", "ScheduleCalculations"), Filter.equal("draft", "false") ).first() def config = api.jsonDecode(cf.configuration).entries.get(0)?.globalFormulaState return config.lastCalculationDate |
...