Leveraging the email component application
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.
- 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.
- Use the provided Email Editor component to create the FSGEmail application’s reusable case type.
- 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.
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.
2 Consider Email case stages
The Email case contains the following four stages.
- Enter Test Data
- Prepare Email
- Edit Send or Skip
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.
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.
The SendEmail process creates a test PDF, later used as an email attachment, followed by a OOTB Smart shape send email. This email generated is ready to be trigerred.
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.
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
Supporting rules in Dev Studio
- 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.
Email case type is added as a child case type in itself.
- 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
Email Editor component