Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: rboccuzziYou will want to look specifically at two parameters. Certain errors could trigger automatic graph restarts, and these controller properties should determine the restart behavior. A restart means the whole graph restarts as it would if the laeController was executed a second time. Nodes that completed successfully would still run again.
-
ls.brain.controller.restartMaximum - maximum number of times a graph can restart (0 if not set)
-
ls.brain.controller.restartableErrors - a regular expression (defined by java) used on the error message that will yield a restart of the entire graph (match everything if not set). This item only restarts to the maximum number of times as defined byls.brain.controller.restartMaximum. Therefore, if restartMaximum is not defined, then the graph is never restarted no matter what the value of restartableErrors.
A regular expression could be as simple as "timeout", which would trigger when the word "timeout" occurred in an error message. A simple example graph is attached, where I ALWAYS abort with the error message ISSUE1. If you look at the command line script that launches the controller, you can see how I will cause 2 additional restarts (so three runs in all), using this fact. It will of course always fail because nothing changes, so this isn't terribly interesting. In general, you would only use this to restart when an error is transient. So a better example would be using the "timeout" above, if you have a connection to an external server that occasionally times out.
This is a java regular expression, so if you wanted multiple search items, you could also do "timeout|ISSUE1|ISSUE2", etc.
Cheers
Rich
Attachments:
ErrorRestart.zip