Executes a draft logic for a given approvable and calculates the result. This command is used to test a logic during editing (the "Test Logic" button in IntelliJ Pricefx Studio).
The backend will compile and execute the test logic (specified in the testFormula
property) without persisting it in the database.
OK
object | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
{- "data": {
- "targetDate": "2021-12-10",
- "testFormula": {
- "elements": [
- {
- "allowOverride": false,
- "combinationType": "FUNCTION",
- "displayOptions": 16,
- "elementGroups": [ ],
- "elementName": "NewElement",
- "elementTimeout": 0,
- "hideOnNull": false,
- "hideWarnings": false,
- "protectedExpression": false,
- "summarize": false,
- "formulaExpression": "api.inputBuilderFactory()\n .createStringUserEntry(\"MyStringParameter\")\n .getInput()"
}
], - "status": "ACTIVE",
- "uniqueName": "MichalS",
- "validAfter": "2020-01-01",
- "__PROC": {
- "sourceId": "CalculationLogic/MichalS+2020-01-01",
- "typeCode": "F",
- "fsId": "CalculationLogic/MichalS+2020-01-01",
- "type": "CalculationLogic"
}
}
}
}
{- "response": {
- "node": "pricefx-cluster-app-frontend-65c978b8dd-6wgk5",
- "data": [
- {
- "elementName": "NewElement",
- "elementLabel": "NewElement",
- "elementResultDescription": null,
- "traceMessages": null,
- "alertMessage": null,
- "warnings": [
- "UserEntry parameter not found: MyStringParameter"
], - "alertType": null,
- "displayOptions": 16,
- "formatType": null,
- "overridden": false,
- "overridable": false,
- "summarize": false,
- "hideOnNull": false,
- "hideWarnings": false,
- "excludeFromExport": false,
- "userGroup": null,
- "resultGroup": null,
- "labelTranslations": null,
- "suffix": null,
- "cssProperties": null,
- "cellStyles": null,
- "overrideValueOptions": null,
- "overrideAllowEmpty": true,
- "fieldType": 0,
- "resultType": "SIMPLE",
- "elementResultClass": null,
- "elementResult": null
}, - {
- "elementName": "__TRACE__",
- "elementLabel": "__TRACE__",
- "elementResultDescription": null,
- "traceMessages": null,
- "alertMessage": null,
- "warnings": null,
- "alertType": null,
- "displayOptions": 0,
- "formatType": null,
- "overridden": false,
- "overridable": false,
- "summarize": false,
- "hideOnNull": false,
- "hideWarnings": false,
- "excludeFromExport": false,
- "userGroup": null,
- "resultGroup": null,
- "labelTranslations": null,
- "suffix": null,
- "cssProperties": null,
- "cellStyles": null,
- "overrideValueOptions": null,
- "overrideAllowEmpty": true,
- "fieldType": 2,
- "resultType": "SIMPLE",
- "elementResultClass": "java.lang.String",
- "elementResult": "---------------------------------------------------------\nDuration (ms) Count Execution element\n---------------------------------------------------------\n 599.54 100% ██████████ 1 TestExecute\n 0.26 0% ░░░░░░░░░░ 1 ├── search.Partition\n 2.34 0% ░░░░░░░░░░ 1 ├── search.ApplicationProperties\n 562.31 94% █████████░ 1 └── MichalS\n 0.09 0% ░░░░░░░░░░ 1 ├── POS.flush\n 562.11 94% █████████░ 1 └── NewElement\n 3.10 1% ░░░░░░░░░░ 1 └── search.PricingFormula\n"
}
], - "status": 0
}
}