Pricefx Project Structure
Pricefx Studio expects the project to have certain structure of folders and files. Also, one project can have more Modules (see below), if you need to split the configuration package into separate folders.
Generally the project contains:
Partition configuration – set of folder and files as described in Configuration Package | Structure
config.json file with connections to partitions
pom.xml file with links to Groovy library and TDD4C library for unit testing
.gitlab-ci.yml file with the pipelines definition for continuous deployment as described in GitLab Pipelines for Customer Projects
Basic project structure sample:
project root folder
├─ CalculationLogic
│ └─ QuoteItem
│ ├─ elements
│ │ ├─ Inputs.groovy
│ │ └─ InvoicePrice.groovy
│ └─ logic.json
├─ ProductAttribute
│ ├─ attribute1.json
│ ├─ label.json
│ └─ sku.json
├─ .gitlab-ci.yml
├─ config.json
└─ pom.xml
Modules
IntelliJ has a concept of Modules (see Modules | IntelliJ IDEA) which potentially allows you to set up more Configuration Packages inside a single project, e.g. for projects with complex environment setup. Studio supports this concept of modules.
Each module is inside of a subfolder in your project. You can imagine the project root folder also as a base module. So, for example, the project structure can look like this:
project root folder
├─ Module1
│ ├─ CalculationLogic
│ ├─ ProductAttribute
│ └─ config.json
├─ Module2
│ ├─ ProductExtension
│ ├─ WorkflowFormula
│ └─ config.json
└─ config.json
Each module can contain the same content as a project, i.e. partition configuration, own config.json. If a module does not have its own config.json file, it will use the first one found in parent folders.
That is why in some tools (like PfxFetch Toolbar and PfxDeploy Toolbar) you have to first select the Module, before you can start selecting the environment and partition.
Found an issue in documentation? Write to us.