Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Table of Contents
maxLevel1

...

Naming conventions make programs more understandable by making them easier to read. In addition to the Java naming conventions, Pricefx has its own set of recommended naming conventions for logics and metadata.

Logic Names

Logic names should be written in CamelCase

Examples: 

  • DefaultLogic
  • Pricelist
  • Main
  • DefaultQuoteLogic

However, there are a few exceptions; the following logic types should be written with the following prefixes:

Logic typeFormula NaturePrefixSuffixExample
Calculation Flow
calculationFlow
CF_
CF_DailyCalculation
Calculated Field Setnull/(default)CFS_
CFS_ProductEnrichment
Dataload
"paDataLoad"
DL_
DL_LoadFromPX
Groovy Library

"library"


LibSharedLib

Element Names

Whenever an identifier is required (uniqueName, name, etc.), it is recommended to use identifiers in a ClassicalCamelCaseFormAsYouKnowItFromJava, e.g. SalesPrice. If there is a abbreviation used in the name, it is naturally useful to separate it with an underscore character "_", for example, ABC_Class (instead of ABCClass).

...

The suffixes can be combined. 

Logic Names

The general rule is to make the first letter uppercase

Example: DefaultLogic, Pricelist, Main, DefaultQuoteLogic

For the following logic types, there is a recommended prefix/suffix:

...

calculationFlow

...

paDataLoad

...

library

...

Element Names

The general rule is to make the first letter uppercase. The reason is that the element is implemented as a Groovy class and therefore referring to the element's methods from Groovy is done as SomeElement.callSomeMethod(). For this syntax the auto-completion will work in Pricefx Studio, since IDEA will understand it as a static call of a method (even though it is not a static call but an instance call on a binded object). Another reason for the first capital letter is to have the possibility to refer to previous elements: 

Jira Legacy
serverSystem JIRA
serverId0e65890b-f559-36c3-b4f7-807e5b0df1a0
keyPM-284

...