Skip to main content
Question

Workspace Runner: How do I make the parent workspace fail when the child workspace fails?


sdepriest
Contributor
Forum|alt.badge.img+9

I have configured a "master" workspace that runs 4 Workspace Runners sequentially. I run the master workspace from a BAT file via the fme.exe command line. When one child workspace fails, the parent workspace stops, but does not fail. The workspaces are linked together by the Succeeded port. The Failed port is not linked to anything. I imagine I should link it to something? If so what? Thanks.

8 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

Connect a Terminator to the Failed port, that should do the trick.


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • January 13, 2016

Or just do not connect anything to the FAILED port.

This way only on success of the child workspace the parent workspace will continue.

Be aware that a workspace only fails if an ERROR occurs. It will not fail if no output is generated by design or if a WARNING occurs!


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • January 13, 2016

Make sure your workspaceRunners are set to wait for job to complete: Yes. Connect a Terminator to the Failed port.

 

As Erik_jan notes, just because a workspace completes without errors, it does not mean that the expected results occured and you should continue processing. Some sort on interim validation is generally recommended.

If your interim workspaces are expected to produce a file you can check the existence of the file(via FileExistenceChecker custom transformer, or python) in the Succeeded stream between the WorkspaceRunners, while also connecting a Terminator to the Does_Not_Exist port.


sdepriest
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • January 13, 2016
redgeographics wrote:

Connect a Terminator to the Failed port, that should do the trick.

Thank you, I will try that.


sdepriest
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • January 13, 2016
erik_jan wrote:

Or just do not connect anything to the FAILED port.

This way only on success of the child workspace the parent workspace will continue.

Be aware that a workspace only fails if an ERROR occurs. It will not fail if no output is generated by design or if a WARNING occurs!

Thank you. I do not have anything connected to the FAILED port right now. My master/parent workspace is configured to run 4 workspace runners in sequence all connected by the SUCCEEDED port. Yes, thank you, I understand the workspace will only fail if an ERROR occurs in the log. That makes sense. Its good to know that a WARNING will not trigger a "fail".


sdepriest
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • January 13, 2016
jdh wrote:

Make sure your workspaceRunners are set to wait for job to complete: Yes. Connect a Terminator to the Failed port.

 

As Erik_jan notes, just because a workspace completes without errors, it does not mean that the expected results occured and you should continue processing. Some sort on interim validation is generally recommended.

If your interim workspaces are expected to produce a file you can check the existence of the file(via FileExistenceChecker custom transformer, or python) in the Succeeded stream between the WorkspaceRunners, while also connecting a Terminator to the Does_Not_Exist port.

Thank you. Yes I have my WorkspaceRunners set to wait for the job to complete. I will try to connect a Terminator to the failed port and see how that works for me. Thank you for the recommendations on validation. My interim workspaces are writing to an ESRI Geodatabase, not to files, but thanks for the suggestion. I'll keep it in mind for the future.


sdepriest
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • January 13, 2016
redgeographics wrote:

Connect a Terminator to the Failed port, that should do the trick.

Adding the Terminator to the FAILED port worked perfect. Thank you.


kimo
Contributor
Forum|alt.badge.img+10
  • Contributor
  • June 19, 2017

What if a featurewriter is used instead of a writer? Could we then trigger the terminator for a writer error?


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