How to call pipeline (Have rest get snap) recursively
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2021 04:04 AM
I am having a child pipeline calling rest get snap and we have a status column values (0 or 1) in response we need to check status until status comes ‘0’.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2021 04:05 AM
Attached response screenshot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2021 04:08 AM
Hi @Rahul,
If the $entity.exports
will always be an array of a single object then you can check the status with the following expression: $entity.exports[0].status
or jsonPath($, "$entity.exports[*].status").toString()
. If the exports
array can have multiple objects with multiple statuses, then that depends which status you want to check.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2021 04:14 AM
If status comes 1 for the first API hit then we need to retry until status comes 0.
Note: The status column can have two values (1 or 0). 1 indicates a report in progress and 0 indicates a report in progress.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2021 04:22 AM
There are two ways that I can think of at the moment, of how you can implement the retry:
-
Handling the retry on the parent pipeline
- After pipeline execute, check the status using Router Snap. If its 1 then call the child pipeline again. If its 0 then proceed with post - processing steps.
-
Handling retry on child pipeline level:
- After the REST Call, to have a check for the status. If its 1 then self-call the child pipeline until the status comes to 1.
You can also implement a counter, where you will specify the number of retries.
Regards,
Spiro Taleski
