## GDPR Appreciationengine Email flow
Users of the Appreciation Engine have a "Right to be Forgotten" as such they can request 
for their records to be removed from our data entirely. In order to comply with the request 
we will receive a list of emails of users to remove from. 
Main goal of this flow is take such a list and create a new AE "request_to_forget" report in S3 
for use by the Exploration area to comply with this request. 

AE Email Flow is one of the alternative SLZ flows. 
All existing flows can be found in `slz-flow.json` config in `delphi-configs` S3 bucket. 
Сustom flow is specified in the `dsp-specific-settings.json` config as an optional `"flow"` param in implementations section.

Current flow reuses SLZ configs for SLZ UoWs creation. The `slz_job_manager` lambda is responsible for 
processing UoWs and step function running.

`delphi-slzGdprAeEmailFlow` step function consists of service steps and lambdas - 
1. `slz_gdpr_email_downloader` 
2. `slz_uow_reset` from SLZ repo. 

In case of any failures, notifications will be sent to Slack.

In this flow, we are using a new type of UoWs.
Such UoWs don't have complete criteria in config and don't go into complete after processing -
this happens according to the rule described in `dsp_config`(param uow_complete_after_hours).
### SLZ Configs

There is only one licensor independent report(we use sme to keep config structure)

*dsp_config.json:*
```
  {
    "unit_of_work": "appreciationengine-{yyyymmdd}-sme-request_to_forget-v1",
    "uow_active_hours_threshold": 24,
    "schedule": "0 */1 * * *",
    "frequency": "0 0 * * 5",
    "uow_complete_after_hours": 24,
    "args": {
      "dsp": "appreciationengine",
      "extension": "json",
      "type": "request_to_forget",
      "version": "v1",
      "licensor": "sme",
      "valid_from": "2021-04-01"
    }
  }
```

*dsp-complete-criteria.json*

    no complete criteria

*dsp-specific-settings.json:*
```
  "appreciationengine": {
    "uow_active_days_limit": 2,
    "implementations": [
      {
        "rule": "sme/request_to_forget",
        "label": "appreciationengine_email",
        "flow": "gdpr_appreciationengine_email"
      }
    ]
```
### slz_gdpr_email_downloader
As we have complete criteria empty, we start SF with contexts: []

slz_gdpr_email_downloader lambda scan source bucket for available emails, create for each corresponding
content_status in content_status table, extract attached csv from email, validate it using json 
schema and store csv in destination(decompressed) bucket.

