1) Could you tell me how to know which type of rules we should create in Data Class and which type of rules in work Class generally ? is there any standard best practices that is followed in PEGA to decide this?
2) How can we decide whether to create a rule in data class(subclass) or work class(or its subclasses)\
3) For any rule What is the advantage if we create in work class and what is the advantage if we create in data class
***Edited by Moderator: Pooja Gadige to add capability tag***
You always have to make a judgement call on which class is best to create rules, based on your particular business requirements and from the technical perspective, what is the easiest to understand, maintain, and reuse.
Generally it is recommended to follow the object oriented best practices which are laid out in the Pega academy courses.
I recommend going through the following missions from the CLSA course as they give the best explanation on how to model application layers and data modelling, where you place rules largely follows on from the principles laid out here:
Data related objects are created in the data classes. It can be sections, properties, flows, datapages etc. If there are at the data layer, we can use it in across the casetypes in the application. In work classes, we can make use of the created data classes rules. Most of times in work classes, we can create the transactional items that is business flows and the case types.