When using a "for each" loop in a recipe, the job report only contains the input & output for the last execution of each action in that loop.
This makes it very hard debugging when something went wrong in an earlier iteration (but the recipe didn't stop with an error).
I'd like to be able to see the input & output of the actions in the loop for every iteration of the loop when looking at the job report, so I can debug issues that occurred in the loop.
I totally agree we have struggled with this many times trying to understand where the issues is with one record of many. Being able to see the entire loop would be helpful or at least make it something that could be turned on and turned off.
Hi Martin and Jeremy,
I agree that this would be helpful! We'll certainly look into ways to make this easier for you and other users.
In the meantime, perhaps you can try using callable recipes. In the parent recipe, you should indent a "Call Recipe" action under your repeat action. In the callable recipe, you should have the actions that were originally under your repeat action. The callable recipe will then show one job per iteration of the loop, making it easier to troubleshoot.
A tip to help with debugging when using foreach loops, you can create a Workato Lists - Append item to list action, add it to the end of the loop to store the data input/output for the relevant action(s) within the foreach loop.
Amanda this is a good idea but does not help when you've got a nested for loop. The next iteration of the parent loop overwrites the original list.
I imagine this is going to be complicated to solve. We've handled this by using Callable recipes to handle the "function" of whatever we're trying to keep track of. It's not a great solution for debugging but if you keep track of the callable job url on the record in which you're working on it makes it slightly easier.
Hi Chase, agree it does get more complicated when there is a nested for loop. You probably need an "append item to list" action at the end of each loop i.e. one to store the status for the nested loop, one to store the status for the parent loop.
Depending on the step output you are interested in, you can configure your data fields in the lists accordingly. You need to set the `Clear step output` field in the for loop to "Yes" so that Workato does not incorrectly refer to data from previous iterations. You can also "watch" particular actions using the action with error monitor to help with debugging. Finally, I also like to add a Log Message action to print out the debug list in an easy-to-read format.
Check out this recipe example (additional notes in step 10): https://www.workato.com/recipes/802293-get-selected-output-from-every-iteration-of-a-loop#recipe
I'd like to see better overall reporting. That would be great.
I know this is an old topic but I was wondering if there was any update to this? I'm new to Wrike and WorkATO and couldn't find anything. My solution was to create a lookup table and put results in that to see what I was dealing with and debug.
I also agree that this is pretty limiting. The workarounds are very complex for what should be a basic feature of most iPaaS systems. Really hope Workato can enhance this area...
Yep, 2 years since I raised this, and it would still be useful to me!
Good idea, seeing similar need. I agree and could use this detailed output too. This would benefit everyone to reduce the troubleshooting time.
I've accomplished this with Google Sheets - works very well.
I found that Google limits requests per 100 seconds, which can be increased. While testing I included all the records, once confident, I limited the Google Sheet conditions https://developers.google.com/sheets/api/limits
Hi Mendy - so you're writing data into Google Sheets for each iteration? Do you find this slows down the overall processing rate if you're dealing with a large volume?
Hey David, at peak, it was several thousand records a day. Though I was only writing a subset of those to the Sheet.
The whole recipe ran quite slow, but I didn't monitor the recipe as long as it did its job.
This was out of desperation, I couldn't troubleshoot issues and track successful transformations without the visibility. This did the job. I used Workato Log Message to compare against the Sheet data to identify a bug, otherwise, Sheets did the trick.
I believe there is a solution here that will work for a limited number of items. You can create a variable list and add your schema. Then in the loop, add an item to the list. You'll then be able to see a certain number before I believe it cuts out a certain number of them.
Alternatively you could use a lookup table where you get the added functionality of search but that seems slightly tedious to have to delete all the data after every run. Might be good just for testing.
Send us a ticket, we will try our best to assist you with your problem