Help Desk

Submit a ticket My Tickets
Welcome
Login

Conditional Fail

If the last step of a chain is a conditional validation, should it set the chain status to fail if it does not check out correctly?


  • Hi Mike - yes you can do this by simply adding the command Set Chain Result. Here is the link: https://support.onecloud.io/support/solutions/articles/48000964472-set-chain-result

  • Hi Mike,

    This is the difference between technical and functional status.  If a Chain completes it's Commands, that is a technical success.  If the functional result does not align with the business result, then that is a functional failure and is accommodated by the Set Chain Event referenced above.  This is an important concept in OneCloud and integration as a discipline in general.  The Link Status and Set Chain Event are powerful ways to account for this.  

    Tony

  • Thanks Tony that makes total sense, but to be honest I am not sure I see that as a consistent result. Maybe there are nuances I am not aware of, but as I was seeing that in the conditional check, the run chain call appears not to work the same way.  It seems the result I set in the sub-chain is carrying back to the  main chain. I could see the run chain command reporting a fail, but I would also think the functional result of the sub-chain should not be different than any other command.  To me, only the sub-chain should fail, as I will be taking appropriate business actions in the calling chain.  I could see use cases where I want a particular call to fail, and so it would be confusing to have to override in only some instances. Hopefully this makes sense.

  • I hear what you are saying and we actually have a new feature coming to the platform that should provide you the ability to accomplish the use case that you descibe in your follow-up comment.   

  • Thanks Tony, so if I understand correctly, I need to override things in the calling chain to tell it that it has not actually failed. 


    Is that correct?


     

  • After Saturday 7/18/2020, yes you will have the ability to override the technical status of the Run Chain Event or any Event/Command.  

  • Thanks Tony, I am not sure we are saying the same thing, but I look forward to the new release!



  • This is an add on related to the failed path of the conditional.


    I want to test for a condition and when true, run a group of commands. When it is not true I want to skip the group and just go to the next step which is also a group. I assumed a configuration such as this would accomplish it, but it seems I get stuck waiting at the 2nd group, as I am guessing I never get there from the one of the two routes. 


    What am I not looking at correctly? 


    image


  • I looked at using the  execute on skip functionality but unfortunately it only runs the last leg of the chain when the conditional is false.


    Please advise.


    Below is a snapshot of the result when MetaData is not selected. note the last segment is executed.

    image

    In this case the Metadata check is selected, but the last segment of the chain does not run, yet the chain reports success.

    image



  • I experienced something today that may highlight a different facet of the issue first reported in this thread.  


    The synopsis is the failing of the last command does not fail the chain whereas the failing of any node inside the chain will, as it causes the chain to stop. When it is the last command, there is nothing else to run so it figures it passed technically. 


    In other words, when the technical fail is mid chain, it also provides a functional fail, whereas a technical fail at the end does not do the same. 


    Hopefully that helps.

  • Hi Mike,

    I am not sure I am following you so I am going to try to explain based on my understanding of your posts above.  

    Starting with the functional versus technical failure, if any Command fails within the Chain and you do not have an error handling branch for it, then the Chain should have a technical status of failure.  This means that when you go to the Monitor page, the status should be failed/red.  If you are not seeing that, then please raise a ticket with the Chain link.  In terms of functional versus technical failure, I believe it would be a mistake to describe the last Command in the Chain failing as a technical and functional failure.  While it may achieve that end, this does not account for future growth/changes to the Chain.  If additional Commands or Events are added after the "last" Command, you could have a failure that previously matched your definition above but no longer does.  As a matter of good practice, if you need to account for a functional failure, I would recommend explicitly doing so using the Set Chain Status Event.

    To your other statement regarding the Skip, you may need to add a placeholder node/Command into your Chain.  The skip evaluates the immediate inbound branch when determining if the skip is able to be applied.  When coming off a Conditional such as you are, you would only ever have a True (Success) or False (Failure) condition so only one of those branches is ever going to be executed.  In this case, the Command that you are trying to merge those branches into may need a place holder Command previous to it to allow the skip Condition to properly evaluate.  I can't tell you exactly how to do so based on your screenshots but I have done this using something simple like the List Dir Command from File Utilities as it is fast and adds very little overhead to the Chain. 

    Hope that helps.

    Tony 

  • Mike,

    Also, the reason Extract Data to File runs only on the failure branch is because you have it as part of the Command Groud Extract Data.  If you want the Command to always run, you need to take it out of the Extract Data Group.

    Tony

  • Hi Tony, Hopefully you can see in this picture, as I really tried to emphasize it, Extract Data is not part of the Extract Metadata group, but in fact what should be executed immediately after it.


    image



    In terms of your note above, I think we might be saying the same thing, only your use of the OneCloud terminology is better than mine. To help that, I copied your text here from above, and will intersperse in BOLD.


    Starting with the functional versus technical failure, if any Command fails within the Chain and you do not have an error handling branch for it, then the Chain should have a technical status of failure.  I AGREE BUT DON'T BELEIVE THIS IS TRUE WHEN THE LAST COMMAND IS  A CONDITIONAL, ASSUMONG FALSE ON A CONDITIONAL IS A FAIL, AS I AM ALMOST CERTAIN IT IS MID CHAIN. This means that when you go to the Monitor page, the status should be failed/red.  If you are not seeing that, then please raise a ticket with the Chain link.  I WILL In terms of functional versus technical failure, I believe it would be a mistake to describe the last Command in the Chain failing as a technical and functional failure. EFFECTIVELY THAT IS WHAT I BELIEVE I SEE WHEN THE LAST COMMAND IS NOT A CONDITIONAL While it may achieve that end, this does not account for future growth/changes to the Chain.  AGREED If additional Commands or Events are added after the "last" Command, you could have a failure that previously matched your definition above but no longer does.  As a matter of good practice, if you need to account for a functional failure, I would recommend explicitly doing so using the Set Chain Status Event.  I CAN DO THAT, BUT AS NOTED ABOVE, IT IS DIFFERENT AND THEREFORE COUNTERINTUITITVE. YOU GUYS HAVE DONE SUCH A GREAT JOB KEEPING THIS INTUITITVE THAT I WOULD HATE TO DISRUPT IT.

    To your other statement regarding the Skip, you may need to add a placeholder node/Command into your Chain.  The skip evaluates the immediate inbound branch when determining if the skip is able to be applied.  When coming off a Conditional such as you are, you would only ever have a True (Success) or False (Failure) condition so only one of those branches is ever going to be executed.  In this case, the Command that you are trying to merge those branches into may need a place holder Command previous to it to allow the skip Condition to properly evaluate.  I can't tell you exactly how to do so based on your screenshots but I have done this using something simple like the List Dir Command from File Utilities as it is fast and adds very little overhead to the Chain. BASED ON YOUR LAST POST, I AM NOT SURE THIS APPLIES, AND WHY WOULD THE TYPE OF COMMAND MATTER, AGAIN MY JUDGING IS BASED ON YOUR STELLAR CONSISTENCY THAT I WANT TO KEEP THAT WAY.

  • Mike,

    I don't have the full requirements so maybe I'm missing some pertinent information but I can't think of a good reason a Chain would end with a Conditional.  Generally, we see Conditionals being used to create branching logic for what happens next in a Chain, not the end of a Chain.  

    In terms of your Chain, you referred to a segment being executed when the Conditional is Failure.  I assumed you meant the Extract Data to File Command.  Is that right?  If so, this Command executes as part of the Extract Data Group.  I know it's part of the Group because it has the additional red highlight around the Command.

    image

    I've shared the above for others reading the forums to learn more about Conditionals, branching, and technical vs. functional result.  At this point though, I suggest that you open a new support case as I think we've exhausted the ability to help you address your question fully.  After we chat, we can update this post with the solution so others may benefit from it.  

    Tony

Login to post a comment