Skip to main content

Leveraging the email component application

4 Tasks

40 mins

Visible to: All users
Advanced Pega Platform 8.6 English
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

Scenario

Front Stage wants to send personalized emails to recipients at scheduled times and dates. Front Stage wants to reuse this capability in multiple applications. A Lead System Architect analyzes this requirement and the decision is made that the best solution is to build a component Email application, one on which other applications can be built.

The following table provides the credentials you need to complete the challenge.

Role User name Password
Admin COE@FSG rules

Your assignments

  1. Implement a component application that sends emails on a specific date and time.  Emails can be edited and personalized for each recipient before being sent. Emails can also be sent manually.
  2. Use the provided Email Editor component to create the FSGEmail application’s reusable case type.
  3. Configure the case type to be self testable. In Self-test mode, the Email case must attach a Data-Corr-Email instance before creating a second Email subcase. The Email parent case propagates the DateTime property to the email child case, indicating when to send the email. The case also propagates the information about who owns the Email subcase assignments.

 

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Detailed Tasks

1 Analyze design

Any primary case, including the Email case itself, should be able to create Email subcases. In the following diagram, the top-level case is referenced as the parent. The child case is referenced as the child and represents how the top-level case propagates an editable email attachment to the child case.

Email

2 Consider Email case stages

The Email case contains the following four stages.

  1. Enter Test Data
  2. Prepare Email
  3. Edit Send or Skip
  4. Resolve

The processes used by the two middle stages, Prepare Email and Edit Send or Skip, are provided by the Email Editor component. These two middle stages are skipped When DoesNotHaveCover=true. In other words, these two middle stages are only executed when the case is run as a subcase. This is done by design since the email case is intended to be used only as a subcase.

Enter Test Data Stage:

The Enter Test Data stage in the solution consists of three back-to-back processes.

  1. EnterTestData_Flow
  2. SendEmail
  3. Continue_Test

EnterTestData_Flow

This process is the self-testing capability that is added to satisfy the requirement that the Email case can self-test. This process is skipped when HasCover=true. The only test data needed is the WhenToSendEmail property required by the Email Editor component.

The EnterTestData_Flow process captures the WhenToSendEmail date-time value then adds CurrentOperator as the Owner work party.

SendEmail

The SendEmail process creates a test PDF, later used as an email attachment, followed by a Utility shape that calls CorrNew. CorrNew is configured to include all attachments within the File category. The correspondence rule provided to CorrNew is configured as Attach and Hold. The SendMail shape is avoided, as using the shape causes the email to be sent to the background as opposed to waiting to be sent.

Continue_Test

The Review assignment in the Continue_Test process is a pause for anyone running a manual test to view and verify that the generated PDF and Data-Corr-Email are attached. The Owner work party is also visible. The Continue_Test process also shows that the Email subcase has been successfully created.

Prepare Email

Add the CurrentOperator as the Owner work party in the subcase and copy the attachments from the parent case to the Email subcase.

Edit Send or Skip

In this stage, the user can optionally edit the email with the editor or optionally send the email manually or optionally download the .eml file or check the attachments or skip any or all of these options and simply allow the email to be sent automatically on its scheduled date and time. The user can return to this step at any time before the email is sent to perform any combination of these options.

3 Review detailed solution requirements

Email Case

Supporting rules in Dev Studio

  1. Check the following When rules in the FSG ruleset that apply to Work-:
    • HasCover using the condition .pxCoverInsKey exists and has a value.
    • DoesNotHaveCover using the condition .pxCoverInsKey does not exist or has no value.

  2. Email case type is added as a child case type in itself.

  3. In the Data propagation panel, the following property values are propagated:
    • .WhenToSendEmail to the property value .WhenToSendEmail
    • .pzInsKey to property value .EmailWorkKey
    • .pyWorkParty to property value .pyWorkParty

4 Review note solution details

Item name

Description

EmailEditor_20170814T145312970

Email Editor component

AttachParentCaseFiles

Activity to copy email attachments from parent case to child case.



Available in the following mission:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice