So that title is a big question that a client of ours came across that required some additional investigation… What does happen and how do we get around it?
In the below example we’ll use a simple IF Activity as our Parent Activity. To explain briefly how it functions, you provide it with a query that evaluates to either True of False. This then passes down to a set of Activities If True and a different set of Activities If False. We then have three Outputs, On Success, On Failure and On Completion. This looks like:
The IF Activity therefore has logically four different things it does given the query criteria:
- If the query evaluates correctly, then:
- If True, Pass to True Activities
- If False, Pass to False Activities
- Error Activity if the query doesn’t evaluate to True or False.
Following that, we have the below options:
- When 1. If True Activities complete with Success, Trigger On Success Output and On Completion Output
- When 1. If False Activities complete with Success, Trigger On Success Output and On Completion Output
- When 2. completes with Error, Trigger On Error Output and On Completion Output
The issue occurs with the below options:
What happens when the If True Activities complete with Error?
What happens when the If False Activities complete with Error?
Logically you would expect that to cause the IF Activity to error as well. Right? WRONG!
Although it shows as if it has an error in the pipeline view:
The details show “Activity failed because an inner activity failed.”:
This means that the IF Activity itself has still started down it’s success pathway and is now just showing the error from further down. This causes the IF Activity to complete with neither Success or Error! (You can see this in Image 2 above). You can also see that the On Completion Output has triggered successfully.
This means that the Error Output of the If Activity can only be used to handle Errors on the Evaluation of the If Query itself. (When it can’t get to true or false, or can’t execute for another reason).
If you want to monitor the steps inside the IF Activity, you’ll need to put those output pathways inside the True and/or False activities themselves and handle this at a deeper level.
I have launched a new twitter account http://www.twitter.com/PurpleFrogReiss so please follow me there for updates on when I post new blog posts!