An Activity is something different where of course you can call Property-Set method or call DataTransform as well but you do many other things. Like showing harnesses, calling service rules etc.
Activity also provides a way to execute Java code directly, that DT does not.
Activities are harder to maintain and not as easy to construct as other rules in Pega.
We should not use an activity for calculations or property validations that we can implement as constraints rules or Declare Expression rules. Use of a declarative rule (rather than an activity) eliminates the need to control how and when an activity executes. A best practice is to use declarative processing rather than activities when feasible.
A data transform rule provides a purpose-built rule for easily transforming and mapping clipboard data without using activities. In general, the data transform defines how target data (properties, pages, etc) is mapped from and transformed by source data (properties, pages, etc). I would say the DataTransform is a bit like a Property-Set method in an Activity. Mainly used to set values on clipboard pages for example. For data manipulations, we can use a Data Transform instead of an activity.
While they share much helper code, e.g. for the generation of property sets and When conditionals, the two assemblers have very different implementations. This difference was primarily necessitated by Data Transform's "dual step page" model.
Posted: 2 months ago
Updated: 2 months ago
Posted: 1 Feb 2021 4:05 EST Updated: 1 Feb 2021 4:06 EST
Activities are harder to maintain because we can add Java step which itself might be poor performing, difficult to maintain, or simply used for debugging.
But I feel it's not recommended due to multiple reasons, foremost being maintainability and upgrade. Pega takes care of the changed logic in Engine, Integration or any other layer of the application while upgrading environment to latest Pega version. And Pega's main objective is agility with less coding rather providing OOTB feature for implementing most of the business requirement.
DSLs are small, expressive programming languages custom designed for specific tasks, like BPM and progressing towards complete CRM with SaaS for non-programmer as well. Another reason is security, which I don't have much idea but Java code is less promoted it being a reason as well.
@SantoshAnisetty The answer to this question is because Activities and Data Transforms are actually generated and executed differently. In the last couple years, the back-end of Data Transforms along with a few other rules have been rewritten to generate and execute much faster.