Lee Pederson (pedel)
Global Tech Enablement, Principal Instructor - LSA
Pegasystems Inc.
pedel Member since 2009 9 posts
Posted: April 10, 2017
Last activity: April 18, 2017
Posted: 10 Apr 2017 19:44 EDT
Last activity: 18 Apr 2017 8:12 EDT

Dynamically-constructed CC lists

When sending correspondence you can specify a repeatable WorkParty role for the CC_PartyRoles parameter passed to the CorrNew Activity. Which persons are added to that repeatable WorkParty role can vary depending on a number of factors. Those persons tend to belong to different subsets – some persons are always added to the CC list, some are only added some of the time, and some are only added in rare circumstances.

At first glance you would consider using an “Evaluate all Rows” Decision table, i.e., for every set of true conditions being met, add to the CC list. But where would the subset of persons to add be defined? And how would the addWorkObjectParty Activity invoked for each person in the subset?

Also the decision whether to add persons to the CC list may be tree-like. At each depth branch of the tree different subsets of persons could be added.

One way to attack the problem is to use a Data Transform – at different When / Otherwise When / Otherwise branch points apply a different Data Transform that adds that branch point’s subset of persons. But is this truly the best solution from a maintainability perspective? Plus suppose a certain order should be imposed among the persons mentioned in the CC list – the higher the person’s position in the company, the earlier in the CC list the person is mentioned.

Perhaps a hybrid rule + data solution is the best? In this approach, persons to consider for CC list inclusion are defined in a Data- class, that Data class having a Property for every condition that could affect whether or not the person should be added. The person’s rank could be an additional Property – that Property used for sorting. But now the problem is how to generate a query that has a WHERE clause equivalent to all of the conditions tested when an “Evaluate all Rows” Decision Table is traversed?

Case Management Data Integration
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.