A naming convention is a systematic method for naming rules. Developers has to strictly follow the naming conventions as it provides uniformity across the application. It is very helpful in debugging and identifying the rules later on. This might also reduces the duplicated effort and rework.
Every organization defines their own naming conventions as per their needs. But pega also came up with some naming standards and suggests every developer to follow these guidelines. As we are all building applications on pega, we should strictly adhere to these standard guidelines laid out by the product/organization.
In this article, i will share my knowledge on defining the names for some of the rule types.
Use short and precise names for defining a rule
The name should reflect the purpose of the work
Capitalize every first letter in the word. Use Camel-Case formatting.
Don't include any special characters
Data Classes
Data class holds the real time entities Use a proper noun to define its name.For example Data-Org-Contact, Data-Org-Account, Data-Org-Policy etc.
Flow Actions
Flow action represents the type of action that is going to perform in the case. So use verb and noun convention. For example CollectDetails, ApproveClaim, ProcessLoan , VerifyUser etc.
Add prefix
Pre for pre-activity or data transform used in the flow action.
Add prefix
Post for post-activity or data transform used in the flow action.
Add prefix
Val for validation rules used in the flow action.
Use the same flow action name as section name, if it is called from flow action.
Properties
Properties holds the data of an entity. Use nouns to define properties. For example, FirstName, EmailId, PolicyNumber etc.
Case Types
Case type reflects the kind of work that customers are going to do. Name should be very intuitive, so use proper qualify noun. For example, use HomeInsuarnce but not just an Insurance, we need to qualify it with another noun. Some more examples like, PersonalLoan, UpdateProfile etc.
Stages & Steps
Stages represent the phase of the process, so use gerund , a noun ending with (ing) as a convention.For example, financing, underwriting, review etc. Steps indicate the kind of work the user will do, the step name should describe the overall purpose. So use noun plus verb like Collect Information, Submit Application, Approve Claims etc.
Functions
Use java naming standars for defining a function. Example generateRandomNumbers, calculateAmount etc..
Activities/Data transforms
Activities or data transform performs calculations or process the work. So start their names with a verb that indicates what does it does. In most cases, follow the verb with a noun or noun phrase indicating what the it operates on. For example, GenerateUserId, GetAccountDetails, CreateLoanRequest etc.
So, this naming convention might improve the productivity and reduces our development time. After reading this article, please discuss among your team and start setting-up some naming standards for defining the rules. For any help, please reach out to
pegaguide@gmail.com. Happy learning.
You may also want to see: