Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Action output monitors make it easy to react to the presence of a word, such as "error" in the output from an action. But what if

Example Problems

If you want to abort the build if when there are more than five errors, for example, or you want or there is a requirement to process each line of the output somehow? Here . The following are some solutions to those two problems.;

Counting warnings

The key is to log the output of the action to a variable, then analyse the contents of the variable. You'll need two variables, "Output" and "Count"

First, on the Runtime tab of the relevant action, go to "Logging Properties" and select "Log to Variable".

Next, use a "Text Find / Replace" action to count the number of times the string appears:

...

Start by logging the output of action to the Output variable. You will also need a variable to hold each line of output. Call it "Line".

Next, use a List Iterator Action action. Use %Output% as the "List of Items" value. At runtime, it will be expanded to the full value of the log. Don't worry about the size, FinalBuilder has a very large upper limit on variable size.

...