Jonathan PHOON

11/19/2021, 10:49 AM
hi guys, just want to check on what is the best practice on using sensors. here is my use case... 1. call and api to generate a report 2. poll another status api with reportId returned from the first api... waiting for success status 3. call third api to get report data my idea initially was to have the following: 1. Op to call api to generate report and output reportId 2. sensor to receive api and start polling and then generate a runRequest for next Op 3. Op receive runRequest and download report however from what im seeing from the doc, its not possible to use a sensor within a job... they are independent of any jobs.. which means i cant recreate the sensor dynamically with the specific reportId on runtime... any idea how i can solve this issue?


11/19/2021, 10:43 PM
a couple ways you could implement this: • split this up into two jobs and put a sensor in between • have the op that calls the api also do the polling, and have it only return when it receives what it's waiting for