Open TomNUSDS opened 2 years ago
Update: @clediggins-usds is helping investigate this feature. Resubmission needs some features (like a unique id to tie to a record) and some deep thought (like how to link a resubmission back to the original for audit purposes).
A minor FYI: The Basic Resend says "may result in multiple reports being generated to difference receivers".
That is not the case. The api/requeue/send capability only ever sends one file at a time and it never generates data - it merely grabs an existing report (that must be the output of the Batch step) and attempts to re-send it.
Current syntax for calling it as of this writing is:
curl -X POST -H "content-length:0" -H "x-functions-key:<SECRET>" "https://prime.cdc.gov/api/requeue/send?reportId=861f31ec-276c-489c-a733-b55f701bcb4a&receiver=nm-doh.elr"
The secret is for the requeue azure function; NOT for any of the regular submission endpoints.
Because it operates within the existing code, any data re-sent gets correctly linked in the auditing tables.
A summary of our current working proposal for REPROCESS:
Simplifying slightly, there were two main tools required:
An important requirement is for resends to happen within the framework of the normal lineage tracking, so that we have a record that a particular item was in fact sent, albeit not on the first try.
The above process meets use cases where the problem is ReportStream’s fault (eg, ‘process’ step fails, or we had an erroneous filter) - we fix the problem, then do the resend. The above process presumes that if incoming data itself must be corrected, that’s our customer’s job to fix, not ours.
An MVP version of the above steps would be to only show database data, and not actual file data. Then (1) and (2) could be accomplished by only looking at the rows in the covid_result_metadata or other metadata tables (that is, by only looking at the non-PII) - then this work could be greatly simplified.
A further possible simplification: The receive step take a routeTo=org.receiver
URL parameter which basically only allows the data in that submission to go to one receiver.
Instead of us creating a complicated Chooser UI, the reprocess feature could simply allow O&O to pick the one recieve they want to "fix", and use the routeTo
feature to ensure only the data goes to that one receiver.
The routeTo
works the way you'd expect it to:
Example:
routeTo=id-phd.elr
, Oh good call out on the routeTo
option. Being able to select the receiver would need to be part of the MVP.
@jimduff-usds move to platform board?
Related: #6506
Feature initially for Admins only, eventually allow Orgs to do this action as well.
See user story details :lock: from @MauriceReeves-usds
Sub-Task:
resend
is already implemented. Need areprocess
Simplified overview of Report Stream
Basic Resend (Reforwarding)
Solves Issue: A Receiver was unable to get the data. Maybe an authentication issue or service down.
Solution: No data needs to be changed. Just and event triggered to retry a send to a specific receiver (or set of receivers).
Note: This function exists today in the command line tool/API but does not seem to be working.
Reprocess Resend approach 1 (as of today)
Solves Issue: A Sender's data needs minor fixing before it can be processed.
Reprocess Resend approach 2 (as of today)
Solves Issue: A Sender's data needs major fixing before it can be processed. Filters need to be modified to re-run.
Solution:
Reprocess Resend approach 3 FULLY MANUAL (as of today)