Question
Pegasystems Inc.
JP
Last activity: 17 Dec 2015 20:02 EST
How to send notification email to those newly added work parties?
I am looking for a design pattern to send notification email to those newly added work parties, for situations similar as described in the below prhelp document.
However, declare trigger defined on the Index-WorkPartyUri doesn't get fired.
https://pdn.pega.com/sites/pdn.pega.com/files/help_v719/procomhelpmain.htm#rule-/rule-declare-/rule-declare-trigger/main.htm?Highlight=About Declare Trigger rules
For example, a Declare Trigger rule can execute an activity each time an instance of Data-Party-Person class is saved with a modified ZIP code (property Data-Party.pyPostalCode). The activity might send an email message to the sales representative whose territory includes the new address. Similarly, a Declare Trigger rule can implement a form of logging or audit history for a class, recording the date, time, and other facts.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Updated: 7 Dec 2015 5:45 EST
Pegasystems Inc.
IN
Hi Chunzhi,
If you are referring to reports scenario, you need to explicity add the users to which the notification emails needs to be sent .
Else you may either need to edit the pyCaseManagementDefault rule, to add the parties to the case while creating it .
Then you can give the added party here in any correspondence rule to send the email notfication
I dont think there is any such ootb activity which will automatically sends email notification .
May be we can acheive it by configuring an activity to run via agent .
Pegasystems Inc.
IN
Hi
I would suggest you to consider using Declare On Change rules.
It can detect the change in the property ( for example, new workparty addition here ) and call an activity accordingly to send out email .
Details of Declare on Change usage can be found here : https://community.pega.com/using-declare-onchange-rule
Updated: 14 Dec 2015 1:35 EST
Pegasystems Inc.
JP
Updated: 17 Dec 2015 4:18 EST
Pegasystems Inc.
JP
It seems on change rule doesn't track the changes on a property with page group mode.
Did you have any chance to successfully define a on change rule on pyWorkParty property?
Pegasystems
US
It may be safer and more maintainable to avoid the onchange and trigger strategy and instead, enhance your version of the add-new-party flow action to send out correspondence to the new parties. /Eric
Hi,
Declare trigger can be fired on top level pages
Index- and Embed- are not top level pages.
BUG-228400 is created to correct the help documentation
Thank you
Pegasystems Inc.
JP
Can you please correct your wording based on the comments from Eric Osman.
Pegasystems Inc.
JP
If declare trigger approach doesn't work,
the possible approach could be,
1. Sending emails in each and every places where a new work party might be added, and obviously this approach only can be established as a coding rule.
2. Define a declare trigger rule on the work class, and implement logic which compares current pyWorkParty page group values against old values. This approach could be waste of electricity and not echo at all
Pegasystems
US
>>> Declare trigger can be fired on top level pages
>>> Index- and Embed- are not top level pages.
I am confused about this. It seems to me that "Index-" or "Embed-" are classes, not pages. They could be the pxObjClass of either a top level page or an embedded page.
/Eric