SLS - ReProcess Daily State Compliance Letters

We seem to have to clean up state compliance letters all too often so I put together a quick query and process to do this fairly easy.
 
Run the query below, it will return three sets of data; Decisions, DecisionSteps, Attachments.  Be sure to adjust the @StartDate as necessary.
The query produces more data than is necessary for processing, but it gives you some necessary pieces to provide a little piece of mind.
 
Once you have the necessary AttachmentID, DecisionStepID, and DecisionID just put them in an adhoc spreadsheet (with the appropriate ClassName and Operation listed below) and drop them into the Import Dashboard within the adhoc template.  They need to be processed in this order.  Make sure the previous sheet is complete before dropping the next one.  Check the Transactions tab in the ImportFile Summary page to ensure all records processed successfully.
  1. Delete Attachments
    1. ClassName: Attachment
    2. Operation: Delete
    3. AttachmentID: Copy/Paste from the query results
  2. Delete DecisionSteps
    1. ClassName: DecisionStep
    2. Operation: Delete
    3. DecisionStep ID: Copy/Paste from the query results
  3. Process Decisions
    1. ClassName: Decision
    2. Operation: Process
    3. DecisionID: Copy/Paste from the query results
 
NOTE:
If any of the Decisions have completed or have been cancelled, the process will need to be adjusted to include a Re-Activation step between steps 2 and 3.
This is why there is more info returned in the query than necessary, to show status.  Decision/Process on a closed or cancelled decision will do nothing. 
  1. Re-Activate Decisions
    1. ClassName: Decision
    2. Operation: Cancel
    3. DecisionID: Copy/Paste from the query results
 

Comments