10-11-2022 01:49 AM - last edited 05-24-2023 06:27 AM
Do you want to log different actions, inputs, outputs, final status like successful, failed. Or store the start time and end time. Then this is cookbook for you.
Things to not here:
In case of logging error:
And set it to has failed.
Output in Sharepoint:
Logging is a good technique to do because the run history is only available till 28 days. You can download the run history on regular basis but you can do this too. You can analyze later, at what output you were getting successful results and at what output you were getting a failed result.
You can add multiple actions in the scope and get information about all the actions that are inside it.
I hope you guys will find this cookbook helpful.
Do comment if you find any difficulty in the above method or have any doubts.
And if you like it kudos are appreciated. 🙂
I have an apply to each loop that loops through cases. If an action fails for a particular case, I want to update that case's status as Failed. Is there a way to know that for which item of the apply to each, the error occurred?
Its a little difficult to handle errors inside apply to each if it has a lot of actions. But if it has really less actions that will be possible.
So what you can do is make a logging list in sharepoint first.
Now you will have to focus on the actions which can result on failure or that fail very often.
Lets say in the below picture I know my "compose 2" fails most of the times so I can add a parallel branch and use create item to log the particular error.
Now if there are a lot of actions, you can use a scope for it. Something like below:
If you have any other doubts you can reply below or personally message me as well on this platform itself.
I hope this helps 🙂