Question
Morgan Stanley
IN
Last activity: 4 Oct 2018 13:54 EDT
Difference between Activity and Data transform from PRPC Perspective
Hi
I'm trying to understand the difference between an activity and a data transform from the prpc's technical perspective.
Why is a DT called light weight when compared to an activity? Why can't we perform DB operations in a DT?
Regards
Avinash
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Likes (1)
THARUN Chandubatla -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hello Avinash,
Thanks for posting your query.
Could you refer below posts and let me know if this helps at your end?
- https://pdn.pega.com/introduction-data-transforms/introduction-data-transforms
- https://pdn.pega.com/community/pega-product-support/question/question-about-using-data-transform-vs-activity.
- https://community.pega.com/nine-tactics-reduce-your-need-custom-activities-prpc-62-sp2
Regards,
Rincy
Pegasystems Inc.
IN
Hi Avinash,
Activity rules provide us with one way to automate the processing of work in pega applications using a program-like approach.
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).
Activities are harder to maintain and not as easy to construct as other rules in PRPC.
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.
For data manipulations, we can use a Data Transform instead of an activity.
To query from an external DB, we can use Report Definition rules instead of activities.
We may need to automate the processing of cases with a sequence of steps to be executed. Most of the time, this is possible with the steps in the case designer or multiple shapes in a flow rule or with
declarative rules or data transform rules or a combination of those and other rules.
Also remember that before writing our own activities, take a look at the standard activities that come with PRPC.
Hi Avinash,
Activity rules provide us with one way to automate the processing of work in pega applications using a program-like approach.
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).
Activities are harder to maintain and not as easy to construct as other rules in PRPC.
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.
For data manipulations, we can use a Data Transform instead of an activity.
To query from an external DB, we can use Report Definition rules instead of activities.
We may need to automate the processing of cases with a sequence of steps to be executed. Most of the time, this is possible with the steps in the case designer or multiple shapes in a flow rule or with
declarative rules or data transform rules or a combination of those and other rules.
Also remember that before writing our own activities, take a look at the standard activities that come with PRPC.
There are certain scenarios where we cannot avoid writing an activity. For example:
To perform Case related functions such as creating a case instance, routing the case, or updating
the work status, as part of certain operations such as parsing an input file.
To send requests to external systems or to receive requests from external systems.
To perform functions such as writing to a log file or to the history database.
Hope this helps!
Thanks,
Gisela
Thirdware solutions
IN
HCL Technologies
IN
Thanks Gisela very nice explanation.
Morgan Stanley
IN
Thanks for great explanation gisela.. However, i'm trying to understand the way DT's and Actities are implementated in PRPC (the internals i mean).
Any rule in pega is converted to java and then executed. From this perspective how are DT's and Actities different
Pegasystems Inc.
IN
I am not entirely certain about the internals.
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.
The approach has been to factor popular use cases for Activity into other, simpler rule types such as Data Transform. My understanding of this trend was that we didn't really want to replace Activity, because anything sufficiently complex to replace Activity will probably be just as confusing. I think this has been largely successful: use cases that previously demanded Activity, e.g. looping and branching to set values on a page, are now commonly performed in Data Transforms instead. Because it's unlikely that there will ever be a strong business need to simplify some of the more esoteric Activity methods, it's unlikely that Activity ever goes away entirely.
The general product direction is away from Activities unless absolutely necessary.
Hope this helps!