Question

Using SendSimpleEmail

Are there any issues if I use SendSimpleEmail from an Activity. I need to send a correspondence object as well in the email. However SendSimpleEmail is giving error in higher environment. It is working fine in Dev environment but failing in test with below error.

Tried calling CorrNew from the activity as an alternative , however the email is not generated at all.

Error:

Exception at 20180419T020000.673 GMT: com.pega.pegarules.pub.clipboard.InvalidReferenceException: The reference <code block> is not valid. Reason: FUAInstance-NullMyStepPage at com.pegarules.generated.activity.ra_action_sendsimpleemail_1514f1485bc5212645ab15b16c859210.step14_circum0(ra_action_sendsimpleemail_1514f1485bc5212645ab15b16c859210.java:1586) at com.pegarules.generated.activity.ra_action_sendsimpleemail_1514f1485bc5212645ab15b16c859210.perform(ra_action_sendsimpleemail_1514f1485bc5212645ab15b16c859210.java:322) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553) at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10711) at com.pegarules.generated.activity.ra_action_runccrejobstatuslatest_c2e894acf90ca827b5fd5ad6bea8ade0.step15_circum0(ra_action_runccrejobstatuslatest_c2e894acf90ca827b5fd5ad6bea8ade0.java:1549) at com.pegarules.generated.activity.ra_action_runccrejobstatuslatest_c2e894acf90ca827b5fd5ad6bea8ade0.perform(ra_action_runccrejobstatuslatest_c2e894acf90ca827b5fd5ad6bea8ade0.java:352) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553) at com.pega.pegarules.session.internal.async.agent.QueueProcessor.runActivity(QueueProcessor.java:749) at com.pega.pegarules.session.internal.async.agent.QueueProcessor.execute(QueueProcessor.java:618) at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:1000) at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1286) at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1034) at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:916) at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:707) at com.pega.jsr166backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:991) at com.pega.jsr166backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:532) at java.lang.Thread.run(Thread.java:745)

**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.

Correct Answer
May 3, 2018 - 1:49am

I was able to resolve the issue by using SendEmailNotification activity instead of SendSimpleEmail. I was also able to send the correspondence rule by using Property-Set-Corr in the previous step to get the rule in a property and then pass it to the SendEmailNotification in Message parameter. Also the HTMLMessage checkbox should be checked for the correspondence rule to be rendered in the email.

Comments

Keep up to date on this post and subscribe to comments

Pega
April 23, 2018 - 2:46pm

Perhaps some of your rules did not make it into your new environment?

The "NullMyStepPage" may imply that the rule that called SendSimpleEmail did not do so on the correct Page context, or some other logic did not successfully create a Page or open a record.

May 3, 2018 - 1:49am

I was able to resolve the issue by using SendEmailNotification activity instead of SendSimpleEmail. I was also able to send the correspondence rule by using Property-Set-Corr in the previous step to get the rule in a property and then pass it to the SendEmailNotification in Message parameter. Also the HTMLMessage checkbox should be checked for the correspondence rule to be rendered in the email.