SolutionGuidance / psm

Welcome to the Medicare/Medicaid Provider Enrollment Screening Portal
http://projectpsm.org/
Other
26 stars 20 forks source link

Improve enrollment submission page response time #1029

Open jasonaowen opened 6 years ago

jasonaowen commented 6 years ago

The time between submitting a new enrollment application (clicking "Submit" on the last page of the enrollment application sequence) and getting a success response can take multiple seconds. In addition to being a bad user experience, it also can provoke the double-submission bug (#1027).

This is due, in no small part, to running all the post-submission processing on an application during the web request, which is a poor practice. This includes spinning up jBPM, going through all the steps in our business process - including checking the LEIE and, soon, other external data sources - and sending an email acknowledging the submission.

As much of that work as possible should be deferred. Checking the LEIE and sending an acknowledgement email can happen asynchronously; all we should do in the web request thread is record the submission and return success.

Related issues: