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:
968 NPE on submitting a personal care assistant enrollment application
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:
968 NPE on submitting a personal care assistant enrollment application
971 Remove jBPM
1027 Protect forms against multiple submission