Question

Fail External Tasks if Step Fails


Userlevel 1
Badge

I have setup an Execution Package and am running a number of Perspectives in the order they need to build in the project. I then call 2 External Steps, which are Execution Packages in other TX Projects in the same environment. 

I am having an issue where when a step fails in the project, the build then continues onto the External steps whereas I would like the entire package to fail. I thought this would be accomplished by selecting the FailPackage action on Failure Handling but it is not working. 

Do I need to set this up a different way to get this to work?

(I have hidden sensitive data in my screenshot)

 


11 replies

Userlevel 5
Badge +7

Hi @kerry_bespoke ,

 

as far as I am aware your selected steps should run sequentially as you have Merge Steps turned off. I am not sure why you would use Classification over Execution Time, I assume you are running a legacy project from before Execution Time management. My expectation would be that a failure would lead to subsequent steps not being fired. Perhaps the Execution Management selection you have is influencing that?

You could enforce your expected behaviour by embedding the external steps in a separate package that you call in your initial package from Run Package, thereby only triggering the external step package on full and successful completion of the initial set of steps.

Userlevel 1
Badge

Thank you for your quick response @rory.smith 

I have setup your recommendations in the package and will see how this works out.

Kerry

Userlevel 6
Badge +5

Hi Kerry

If you want it to run each step as its own thing I would make a execution package for each of the perspectives and one for the external executions, then I would set each execution package to run with 5 threads and managed execution set to execution time.

Then I would change the main one to include these other execution pacakges set it to not use managed execution and only run in one thread.

Then if one package fails it will stop completely. This is also more failsafe than using a run on success option as you can easier resume the failed load or run an individual perspective without running all the other parts.

Userlevel 1
Badge

@Thomas Lind That makes sense… I will set that up now and test it.

 

Thank you (:

Userlevel 6
Badge +5

Hey @kerry_bespoke did you get a chance to test this?

Userlevel 1
Badge

@Christian Hauggaard 

Heya, I did get a chance and it did not work as expected.

I am including a screenshot of the 3 Steps. Main Build (Step 1) that then runs Step 2 (Perspectives in Project) then Step 3 (External Steps). We need Step 2 to retry a few times if it fails and then not run Step 3 if it is not successful. 

Step 2 failed last night and Step 3 still ran. Step 2 also did not retry….

I guess my next step would be to use @Thomas Lind ‘s recommendation of changing the Managed Execution to disabled on Step 1?

Kerry

 

Userlevel 5
Badge +7

Hi @kerry_bespoke ,

 

I believe that the “outside” package settings get applied to the "inside” packages. So you probably need to set up the retries in the outer package. This is why I suggested my solution the way I did, it allows for more differentiation in the package settings.

Userlevel 1
Badge

@rory.smith OK, I will set my retry on the Step 1 and see how this works out…

Userlevel 6
Badge +5

Hi @kerry_bespoke 

You should use another managed execution setting. It should be set to disabled to run them in the order you applied the packages in.

The other package I am not sure I understand, why all these perspectives and why not run them with merge threads.

I assume it is essentially all tables, you could just create a big overarching perspective that have all the tables in it instead of 10-15 small ones.

In the last one you should also turn of managed execution.

Badge

Hi @rory.smith 

For your solution were you suggesting using the Run Package as the post execution option? Will this only run if a package is successful?

 

I did run a quick test on a local test project, and it seemed to work as expected.

 

 

Userlevel 5
Badge +7

Hi @vrowse ,

 

with the default setup and failure handling it will indeed only run the package specified in Run Package if the contents of the current package is fully successful. If you have many Exclude Steps or large amounts of Dynamic Perspectives it can become a bit heavy on your VM, you may want to consider Exmon in more complex scenarios.

Reply