When a web service import set having multiple associated transform maps is run in ASYNC mode via the schedule script execution 'Asynchronous Import Set Transformer', only one transform map is executed.
Steps to Reproduce
- Create an import set table 'u_web_service_import'.
- Create two transform maps for this import set table with different orders.
- Create a before insert business rule on 'sys_import_set' table having:
Import set table is 'u_web_service_import'
Mode to Asynchronous
4. Navigate to the Scheduled Script Execution 'Asynchronous Import Set Transformer'.
5. Modify the script as follows:
Change line #8
This is required, otherwise the import will never be transformed.
6. Send data from REST API explorer or Postman to the Import set API for this import set table.
7. Go to the scheduled script execution from step 4 and click on Execute Now.
8. Open the recently created import and observe that there is only 1 import set run and 1 import set row. Only one of the two transform maps runs.
When GlideImportSetTransformerWorker is initialized, the list of all transform map sys_ids need to be passed. For this, you need to update the functions sTransform() and getMap() with the script below.
Related Problem: PRB1330544