Executes a logic and returns results.
The main difference between this command and the executeformula command is, that in this formulamanager.executeformulaservice command, the logic context is preserved and reused. This allows the formula to build and maintain a cache, as elements like api.global persist between calls.
Each thread operates with its own formula context and api.global
instance. The system maintains a fixed number of service threads, with a predefined lifespan for each. Parallel API requests are queued and executed on these threads in sequence. If a request cannot be processed within a short timeframe, it will fail. For this reason, it is crucial that subsequent requests execute efficiently, leveraging caching whenever possible. Be aware that during long cache warm-up periods (e.g., when new threads are initialized), there is a higher risk of request failures.
Use the output=rawjson
parameter in the URL, for example /formulamanager.executeformula/QuoteLogic?output=rawjson
in order to return the result in the simple JSON format as "resultName"
:result
.
{- "data": {
- "priority": "high",
- "quantity": 14,
- "map": {
- "key": "value"
}
}
}
{- "response": {
- "node": "node",
- "data": [
- {
- "formula": {
- "version": 7,
- "typedId": "2147484837.F",
- "uniqueName": "PriceList",
- "label": "Price List",
- "validAfter": "2021-07-12",
- "status": "ACTIVE",
- "simulationSet": null,
- "userGroupEdit": null,
- "userGroupViewDetails": null,
- "formulaNature": null,
- "lastUpdateByName": "admin",
- "formulaType": "PRICING",
- "createdByName": null,
- "createDate": "2021-11-04T14:56:11",
- "createdBy": 2147490696,
- "lastUpdateDate": "2021-12-08T15:45:57",
- "lastUpdateBy": 2147490696
}
}
], - "status": 0
}
}