Console Action

A Console Action is a simple action that prints data to either standard out (stdout) or standard error (stderr). For example, to print the value of some data to stdout, build the following Console Action and add it to your flow chart as your are constructing your job’s flow chart.

ConsoleAction consoleAction = flowChart.makeConsoleAction("My Console Action");
 
int myIntegerData = 42;
 
double myDoubleData = 77.9;
 
boolean myBooleanData = true;
 
String myStringData = "Hello World";
 
consoleAction.println(myIntegerData);
 
consoleAction.println(myDoubleData);
 
consoleAction.println(myBooleanData);
 
consoleAction.println(myStringData)

When this Console Action executes as part of your flow chart, you will see the following output printed to stdout.

42

77.9

true

Hello World

If you want to print your data to stderr, instruct the Console Action like so.

consoleAction.setStderr();

Console Actions on Windows Services

When using Windows services, all Console Action output (to both stdout and stderr) is directed to the engine service log. By default, this log file is called engine-service.log.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.