| Description | [Background] There are many steps involved within the product to generate fulfillment packages. Users of the application may notice multiple subtabs within the currently selected Interaction open and close, each one performing a step in the overall process. The steps involved to generate a fulfillment package are as follows: 1. User clicks the generate fulfillment package button 2. A new subtab is opened that contains logic to determine what steps are required to generate the package. The final set of steps are based on the nature of the attached pieces of content, specifically the configured attachment rules (i.e. attach separate in original format, attach separate as a pdf, merge into package). Each permutation represented in the selected files will result in its own subtab being spawned to initiate that portion of the fulfillment package. For example, if the attached documents are only 'merge into package' only a single subtab will be spawned. Similarly, if all three permutations are present then three subtabs will be spawned. 3. Based on the determination of step 2, up to 3 subtabs are dynamically opened - all of which will open, run, and close automatically with the exception of the 'main' subtab that manages the merge into package portion of the process. 4. Once the User makes the desired selections on the main subtab, the final step is initiated and when complete, the tab is closed and the user is navigated back to the associated fulfillment. [Symptoms] Often times the supporting, non-main, subtabs that are spawned in step 3 above will take several seconds to complete their tasks and close. If a User initiates generation of the package on the main tab before the supporting tabs have completed and closed, the tab that supports the main step will be refreshed mid-execution with no indication that a job was initiated or is presently running. In these cases, if a User re-initiates the main step, a second process is initiated (in addition to the original) that will result in a second, duplicative fulfillment package being generated and attached to the fulfillment. [Root Cause] This issue is caused by a combination of conditions that must be met: - A package that has documents attached with the attachment instructions of 'Attach Separate...' (either in original format or as a pdf) is initiated - A User initiates completion of the main step prior to the supporting tabs completing - The Salesforce console is initiating a refresh of the main subtab while actively running | | |
| Steps to Reproduce | 1. Create an Interaction record and then a Request record. 2. To the Request record, attach a document that has a delivery method of `Merge Into Package`, and attach another document that has a delivery method of `Attach Separate, PDF`. 3. Create a Fulfillment record. 4. On the Fulfillment record, click `Generate Package`, and then immediately click `Run`. 5. Once the supporting subtabs cause the main tab to refresh, Click `Run` again. | | |