The following functions are used for debugging the Java code, or logging user defined messages and events.
debug
Prints the supplied argument to the output target specified in the Execution tab of the Workflow Properties dialog. Valid options are Event or File.
If File is selected, the debug is saved in the temporary directory as stated in the system property pico.tmpdir
. The file is to be called debug/<workflow name>
. Each time the workflow is activated resulting in new debug information being written, the existing file is overwritten.
If Event is selected, the output is shown in the Workflow Monitor.
public void debug(Object data);
Parameter | Description |
---|---|
data | Object to write to debug output. Note that printing a UDR type will dump all the field values, which may be a large amount of data. Similarly, the debug output for a table or list type may be very large. There is a special case if |
Returns | Nothing |
log*
Logs a message string to the System Log of type error, warning or information. The entry will fall under the Workflow category where workflow name will be the name of the current workflow and agent name will be the name of the agent logging the message.
void logError( String message ) void logInfo( String message ) void logWarning( String message )
Parameter | Description |
---|---|
| A main message appearing in the log |
Returns | Nothing |
Example - Using logWarning
The following code example logs a warning message, which when displayed in the System Log will look like the following figure:
env.logError("This is an error from Java agent."); env.logInfo("This is an information from Java agent."); env.logWarning("This is a warning from Java agent.");