Pricefx Studio expects the project to have certain structure of folders and files. Also, one project can have more Modules (see details below), if you need to separate split the configuration package into separate folders.
Generally the project contains:
partition Partition configuration - – set of folder and files as described in https://pricefx.atlassian.net/wiki/spaces/KB/pages/99200697/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 stores with the pipelines defintion definition for continuous deployment as described in GitLab Pipelines for Customer Projects
Basic project structure sample:
paste-code-macro |
---|
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 |
...
IntelliJ has a concept of Modules (see https://www.jetbrains.com/help/idea/creating-and-managing-modules.html) , 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 a base module - so. So, for example, the project structure can look like this:
paste-code-macro |
---|
project root folder ├─ Module1 │ ├─ CalculationLogic │ ├─ ProductAttribute │ └─ config.json ├─ Module2 │ ├─ ProductExtension │ ├─ WorkflowFormula │ └─ config.json └─ config.json |
Each module can contain the same what content as a project can contain, i.e. partition configuration, own config.json. If a module does not have it’s its own config.json file, it will use the first one found in parent folders.
That’s 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.