Edit Logics

To open editor for a Logic:

The editor looks like this (the exact look depends on the type of logic you open)

editor.png

Actions:

Tabs:

Available Element Actions

Edit Elements

When you edit the elements, you can make use of the following Pricefx Studio / IDEA functionality:

Logic File Format

To edit logics, it is important to understand the structure of a project in Pricefx Studio. 

─── my-project/                                       project folder
    ├── CalculationLogic/                             folder storing all non-workflow logics
    │   ├── Default_logic/                            logic folder
    │   │   ├── elements/                             elements folder
    │   │   │   ├── ApprovalReason.groovy             element file
    │   │   │   ├── ItemGroup.groovy                  ...
    │   │   │   ├── ProductGroup.groovy
    │   │   │   ├── ResultPrice.groovy
    │   │   │   └── ResultPriceReason.groovy
    │   │   ├── logic.json                            logic file
    │   ├── ProductInfo/
    ├── WorkflowFormula/                              folder for workflow logics
    ├── ProductExtension/                             folder for Product extension definitions
    │   ...
    │── pom.xml                                       maven config file - adds Groovy and TDD4C library. Required for SonarQube
    └── config.json                                   config holding PFX connection

Available Fields (PfxMetadata)

Pricefx Studio provides you information on all available objects and fields which you can use when editing logics. 

  1. Go to the PfxMetadata panel. (If you do not see it, enable it in View > Tool Windows.) 

  2. Select Environment, Partition and search for a field, for example: 

  3. When you have an element file open and you double-click a particular field in this PfxMetadata panel, it will get inserted into the element code. This makes the work faster and prevents typos. 

(tick) For easier navigation in the search results use the Expand All and Collapse All icons at the top.