---
title: "Test a Logic"
method: POST
path: "/formulamanager.testexec"
tags: ["Logics"]
---

# Test a Logic

`POST /formulamanager.testexec`

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).<p>
The backend will compile and execute the test logic (specified in the `testFormula` property) without persisting it in the database.

## Request body

- object
  - `data` object, required
    - `targetDate` string
    - `testFormula` PricingFormula, required — The `Formula` object. The type code is F.
      - `lastUpdateByName` string
      - `createdByName` string
      - `typedId` string
      - `lastUpdateDate` string, date-time
      - `label` string
      - `formulaNature` string
      - `version` integer
      - `simulationSet` string
      - `uniqueName` string
      - `formulaType` 'PRICING' | 'WORKFLOW' | 'LIBRARY'
      - `createdBy` integer
      - `elements` object[]
        - `version` integer
        - `typedId` string
        - `elementName` string
        - `elementLabel` string
        - `elementDescription` string
        - `elementGroups` string[]
        - `conditionElementName` string
        - `hideWarnings` boolean
        - `excludeFromExport` boolean
        - `protectedExpression` boolean
        - `elementTimeout` integer
        - `displayOptions` integer
        - `formatType` 'NUMERIC' | 'NUMERIC_LONG' | 'MONEY' | 'PERCENT' | 'TEXT' | 'MONEY_EUR' | 'MONEY_USD' | 'MONEY_GBP' | 'MONEY_JPY' | 'MONEY_CHF' | 'MONEY_PLN' | 'DATETIME' | 'DATE' | 'INTEGER' | 'LINK' | 'COMPLEX' | 'SPARKLINE'
        - `elementSuffix` string
        - `allowOverride` boolean
        - `summarize` boolean
        - `hideOnNull` boolean
        - `userGroup` string
        - `cssProperties` string
        - `resultGroup` string
        - `combinationType` 'ADD' | 'SUBTRACT' | 'RESULT' | 'INFO' | 'FUNCTION' | 'BRICK' | 'PYTHON'
        - `criticalAlert` object
          - `message` string
          - `operator` string
          - `threshold` number
          - `comparisonElement` string
        - `redAlert` object
        - `yellowAlert` object
        - `labelTranslations` string
        - `createDate` string
        - `createdBy` integer
        - `lastUpdateDate` string
        - `lastUpdateBy` integer
        - `formulaExpression` string
      - `userGroupEdit` string
      - `userGroupViewDetails` string
      - `validAfter` string, date
      - `inputDescriptors` object[]
        - `name` string
        - `label` string
        - `labelTranslations` string
        - `group` string
        - `dataType` string
        - `inputType` string
        - `formatType` string
        - `from` string
        - `to` string
        - `values` string
        - `required` boolean
        - `alwaysEditable` boolean
      - `status` 'ACTIVE' | 'SIMULATIONONLY' | 'INACTIVE'
      - `createDate` string, date-time
      - `lastUpdateBy` integer
    - `knownElements` string[]
    - `productSKU` string
    - `item` string
    - `items` string[]
    - `nature` string
    - `natureValue` string
    - `headerPhases` object
    - `formulaExpression` string
    - `allResults` boolean
    - `type` string
    - `debugPort` string
    - `allowObjectMods` boolean
    - `selectedRows` string[]
    - `formulaFilterParam` string
    - `forceLineRecalculation` boolean — Used by PFX Studio for Header logics only.

## Response `200`

OK

- object
  - `response` object
    - `node` string
    - `data` object[]
      - `elementName` string
      - `elementLabel` string
      - `elementResultDescription` string, nullable
      - `traceMessages` string, nullable
      - `alertMessage` string, nullable
      - `warnings` string[], nullable
      - `alertType` string, nullable
      - `displayOptions` integer
      - `formatType` string, nullable
      - `overridden` boolean
      - `overridable` boolean
      - `summarize` boolean
      - `hideOnNull` boolean
      - `hideWarnings` boolean
      - `excludeFromExport` boolean
      - `userGroup` string, nullable
      - `resultGroup` string, nullable
      - `labelTranslations` string, nullable
      - `suffix` string, nullable
      - `cssProperties` string, nullable
      - `cellStyles` string, nullable
      - `overrideValueOptions` string, nullable
      - `overrideAllowEmpty` boolean
      - `fieldType` integer
      - `resultType` string
      - `elementResultClass` string, nullable
      - `elementResult` string, nullable
    - `status` integer

---

[API](https://skmtc.net/pricefx/apis/the-pricefx-backend-api.md) · [All operations](https://skmtc.net/pricefx/apis/the-pricefx-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pricefx/the-pricefx-backend-api/versions/0850b5d6be73/schema)
