Skip to main content
Solved

Fail External Tasks if Step Fails


kerry_bespoke
Contributor
Forum|alt.badge.img

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)

 

Best answer by rory.smith

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.

View original
Did this topic help you find an answer to your question?

12 replies

rory.smith
TimeXtender Xpert
Forum|alt.badge.img+7
  • TimeXtender Xpert
  • 649 replies
  • April 10, 2024

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.


kerry_bespoke
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 23 replies
  • April 10, 2024

Thank you for your quick response @rory.smith 

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

Kerry


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1017 replies
  • April 11, 2024

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.


kerry_bespoke
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 23 replies
  • April 12, 2024

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

 

Thank you (:


Christian Hauggaard
Community Manager
Forum|alt.badge.img+5

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


kerry_bespoke
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 23 replies
  • April 22, 2024

@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

 


rory.smith
TimeXtender Xpert
Forum|alt.badge.img+7
  • TimeXtender Xpert
  • 649 replies
  • April 22, 2024

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.


kerry_bespoke
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 23 replies
  • April 22, 2024

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


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1017 replies
  • April 23, 2024

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.


Forum|alt.badge.img
  • Starter
  • 1 reply
  • May 1, 2024

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.

 

 


rory.smith
TimeXtender Xpert
Forum|alt.badge.img+7
  • TimeXtender Xpert
  • 649 replies
  • Answer
  • May 2, 2024

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.


Christian Hauggaard
Community Manager
Forum|alt.badge.img+5

Hi @kerry_bespoke has the issue been resolved? Please let us know if you have any follow up questions


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings