Support Article
Reference to D_GlobalParam does not work in email accounts
Summary
In email accounts, the reference to the D_GlobalParam data page does not work.
This occurs after upgrading to Pega 7.4.
Error Messages
Not Applicable.
Steps to Reproduce
- Open Designer Studio > Integration > Email > Email Accounts
- Open any email that is running successfully
- Set the Host value using Global Resource Settinfgs. For example, D_GlobalParam)
- Run the flow. The account verification fails.
Root Cause
An issue in the custom application code or rules.
Resolution
Perform the following local-change:For Sender:
- Open 'Data-EmailAccount. SMTPConnectivity' and save as to an open the ruleset
- Edit the Java Step 6 and add the below code. The modified code should look like the following:
// get tools
ServiceUtils svcUtils = tools.getServiceUtils();
com.pega.pegarules.priv.util.ServiceUtilsPriv svcUtilPriv = pega.getServiceUtilsPriv();
final String[] ACCOUNT_KEYS = { "pyHost", "pySMTPUserName", "pyEmailAddress", "pyReplyTo",
"pyAdminEmail", "pySMTPPort", "pyReceiverHost", "pyReceiverUserID", "pyReceiverPort", "pyKeyStoreInstance",
"pyKeystoreAlias"};
for (String key : ACCOUNT_KEYS) {
String res = svcUtilPriv.getStringIndirect(emailAccount,key);
emailAccount.putString(key, res);
}
For Receiver:
- Open 'Data-EmailAccount.POP3orIMAPConnectivity' and save as to an open the ruleset
- Edit the Java step 5 and add the below code. The modified code should look like the following:
final String[] ACCOUNT_KEYS = { "pyHost", "pySMTPUserName", "pyEmailAddress", "pyReplyTo",
"pyAdminEmail", "pySMTPPort", "pyReceiverHost", "pyReceiverUserID", "pyReceiverPort", "pyKeyStoreInstance",
"pyKeystoreAlias"};
for (String key : ACCOUNT_KEYS) {
String res = svcUtilPriv.getStringIndirect(emailAccount,key);
emailAccount.putString(key, res);
}
Published October 12, 2018 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.