Open Kyle-Herceg opened 10 months ago
On 10/23 during DSU it was discussed DPC will work on this
@ergjustin reach out to @mark-hayward-erg and @esaber76 before you start this. We should schedule a meeting.
First, make sure the correct submission window job is running. Another meeting with Mark, Scott, and Chris should be set up to discuss this ticket before development can start.
Submission confirmation emails are only going to the users performing the submissions. The various ECMPS 2.0 environments need to use the CBS Recipient List API so further testing can be done for ECMPS 2.0 events and emails. The API will return recipient lists for the following actions:
New stack/pipe monitoring plan submission. Submission confirmations. Submission reminders. Windows notifications. https://camddevelopment.atlassian.net/browse/EASEY-255 includes examples of who should be in the recipient lists to help with testing efforts in 2.0.
init_and_close_em_submission_access
add_window_email
SubmissionReminderProcessQueue
SubmissionWindowProcessQueue
EmailQueue
MailTemplateService
Submission Reminder
Submission Window
Emission Submission Windows Initial Creation, Reminders, and Notifications (init_and_close_em_submission_access)
Produces email events when the following occur by calling add_window_email.
add_window_email also stores the following values for use as plugin values in email templates.
Processing Submission Reminder Queue (SubmissionReminderProcessQueue) & Submission Window Queue (SubmissionWindowProcessQueue) Steps
Processing Email Queue Steps (EmailQueue)
Sending Email (MailTemplateService)
Steps:
_Note that the following includes the plugin [EM_SUB_ACCESS_LIST] which has the following format_:
"{PLANT_NAME}, '{PLANT_STATE} ({ORIS_CODE}) {LOCATION_LIST} - Emissions File for {REPORTING_PERIOD} (as of {EM_SUB_ACCESS_OPEN_DATE})"
Event 151: The "No" Submission Reminder Email
As of the date and time listed below, the EPA has not received your Quarterly Emissions Report(s) for the following facility and monitoring location(s):
[EM_SUB_ACCESS_LIST]
This is a reminder that Quarterly Emissions Reports are due no later than the 30th of the current month.
If you have any questions regarding this correspondence, please contact your EPA Monitoring/Emissions Reporting analyst as soon as possible. For analyst contact information, see CAMD Staff Contacts.
Thank you for your attention to this matter.
Event 152: The Emissions Critical Level 1 Reminder Email
As of the date and time listed below, the following Quarterly Emissions Report(s) were received by the EPA with critical errors:
[EM_SUB_ACCESS_LIST]
This is a reminder that all critical errors must be resolved and the revised Quarterly Emissions Report(s) must be submitted to the EPA within 30 days of the date of the ECMPS feedback letter (see ECMPS feedback letter for details).
If you are unable to meet this deadline, or if you have any questions regarding this correspondence, please contact your EPA Monitoring/Emissions Reporting analyst as soon as possible. For analyst contact information, see CAMD Staff Contacts.
Thank you for your attention to this matter.
Event 155: Open Initial EM Submission Window
This email is to announce the opening of the quarterly emissions submission reporting period for the following:
[EM_SUB_ACCESS_LIST]
This is a reminder that Quarterly Emissions Reports are due no later than the 30th of the current month.
If you have any questions regarding this correspondence, please contact your EPA Monitoring/Emissions Reporting analyst as soon as possible. For analyst contact information, see CAMD Staff Contacts.
Thank you for your attention to this matter.
Event 156: Outstanding Emissions Submission Reminder
As of the date and time listed below, the EPA has not received your Quarterly Emissions Report(s) for the following facility and monitoring location(s):
[EM_SUB_ACCESS_LIST]
This is a reminder that Quarterly Emissions Reports are considered past due, and should be submitted as soon as possible, but no later than 30 days from the date of this email.
If you have any questions regarding this correspondence, please contact your EPA Monitoring/Emissions Reporting analyst as soon as possible. For analyst contact information, see CAMD Staff Contacts.
Thank you for your attention to this matter.
Event 157: Emissions Resubmission Window Closed for Non-Submitters
As of the date and time listed below, the EPA has closed the resubmission window for the following emissions files. No resubmissions were received for these files:
[EM_SUB_ACCESS_LIST]
If you have any questions regarding this correspondence, please send an email to ecmps-support@camdsupport.com as soon as possible.
Thank you for your attention to this matter.
The CBS email recipients API endpoint is on NCC dev (https://cbsstagei.epa.gov/CBSD) and staging (https://cbsstagei.epa.gov/CBS). It will be migrated to NCC beta (https://cbsprodbeta.epa.gov/CBS) later this week.
The email recipients endpoint can be accessed by appending “/api/auth-mgmt/emailRecipients” to the URL.
All parameters for this endpoint should be passed in the request body:
emailType (required; possible values are "SUBMISSIONREMINDER", "WINDOWNOTIFICATION") plantIdList (required for SUBMISSIONREMINDER and WINDOWNOTIFICATION; array of FAC_ID values)
Authentication:
SUBMISSIONREMINDER and WINDOWNOTIFICATION Combines bearer token and x-client-id in request header
Sample request bodies:
{
"emailType": "SUBMISSIONREMINDER",
"plantIdList": [1,3,5]
}
Sample response (SUBMISSIONREMINDER):
[
{
"emailAddressList": "Trey Lightsey <CAMD_BP_3.1_CBS_Rearch_Mail_Test@easternresearchgroup.onmicrosoft.com>",
"plantIdList": [
5,
3,
1
]
},
{
"emailAddressList": "Brad Vick <CAMD_BP_3.1_CBS_Rearch_Mail_Test@easternresearchgroup.onmicrosoft.com>",
"plantIdList": [
3,
1,
5
]
},
{
"emailAddressList": "Toya Williams <CAMD_BP_3.1_CBS_Rearch_Mail_Test@easternresearchgroup.onmicrosoft.com>",
"plantIdList": [
5,
1,
3
]
},
{
"emailAddressList": "James Bice <CAMD_BP_3.1_CBS_Rearch_Mail_Test@easternresearchgroup.onmicrosoft.com>",
"plantIdList": [
3,
1
]
},
{
"emailAddressList": "Submitter Agent-Two <CAMD_BP_3.1_CBS_Rearch_Mail_Test@easternresearchgroup.onmicrosoft.com>",
"plantIdList": [
3
]
},
{
"emailAddressList": "Zhiqin Ma <CAMD_BP_3.1_CBS_Rearch_Mail_Test@easternresearchgroup.onmicrosoft.com>",
"plantIdList": [
5,
1,
3
]
}
]
Acceptance Criteria:
SUBMISSIONREMINDER (Old 151 and 152 events)
WINDOWNOTIFICATION (Old 155 and 156 events)
Now that we have the recipient list endpoint from ERG, we can wire up the email queue process to populate the emails to send with the correct emails returned from the recipient list endpoint.
Changes Needed
Background Information
Subsequent comments made on this issue with the following headings contain background information.
Original Notes
*This work is contained in easey-quartz, and the recipient list endpoint is currently being mocked.