- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 09:17 AM
I'm building a Scripted REST API that takes in an array of JSON objects. Each object in the array needs to be processed, and in some cases the processing takes long enough so that the entire request times out.
Any suggestions on the best way to handle this? I'm attempting to use GlideImportSetTable, GlideImportSetTransformer, etc. to insert the data into an import set and apply a transform map to it. I'm struggling with loading the data from the REST call into the import set tables, and generally how to connect the dots.
The other approach I'm considering is to load the data into a custom table and use Business Rules to process it.
Any advice would be appreciated - thanks!
Solved! Go to Solution.
- Labels:
-
Architect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 01:25 PM
Hey @Miles Clark,
If your JSON object is not too 'big', another option is to trigger Events and process them via Script Action.
I guess it comes down to what you are doing with that JSON object.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 08:51 AM
Hi,
Couple ideas here:
1. Quick and dirty - import set table + transform map -> take the request body, parse it into array of objects, iterate through it and push each object as separate record to import set table.
2. If you have IntegrationHub Ent subscription - there is a REST API trigger - so pushing the data to custom endpoint will trigger flow that can do data processing.
3. Use the idea of REST API trigger - in scripted REST API use ScriptableFlowRunner API to run custom subflow that will take request body as input and will process the data. I think I would go with this one as once you trigger flow/subflow you have the access to contextId of the execution - push this as response and have additional scripted API created to check the status of data processing flow execution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 10:07 AM
Great ideas - thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 01:25 PM
Hey @Miles Clark,
If your JSON object is not too 'big', another option is to trigger Events and process them via Script Action.
I guess it comes down to what you are doing with that JSON object.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 11:44 AM