

This section introduces the logging functionality for script tasks.
A Script Task is a Step that allows the Workflow engine to perform some kind of automatic processing. It is a function for engineers, which allows you to describe the contents of automatic processing with ECMAScript.
We provide logging functionality to make debugging script tasks easier.
For the log output method, use engine.log(). The character string specified as the argument of the method is output as a log.
Line breaks are entered for each method, and newlines in the string are kept intact and logged.
engine.log("status:" + status);
engine.log("response:");
engine.log(resText);
The output log can be checked in the detail screen of the Case in Administrator mode.
Below is an example of the log output.

The weakness of this method was that it was not possible to cause a Script Task to fail, and if it did, the log would not be stored in the Data Item.
The logging function has the advantage of keeping a log of both the successes and failures of the Script Task. You will not need to disguise a Step which should be naturally recorded as a failure, as a success.
I hope that from now on you can use the logging function for debugging Script Tasks.



