Using Log Output for Debugging of Script Task

I would like to introduce a function of logging of Script Task/Service Task (Add-on) which has been newly added to Version 11.6.

v11.6 2018-03-12 Corresponds to HTTP Start which can Receive Request Body as It Is

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 describing contents of automatic processing with ECMAScript.

Script Task Manual

A service task (Add-on) is a modularized version of the automatic processing performed at those Script Tasks. By importing a modularized definition file, you can add a corresponding auto-step item. You can also create your own definition files.

Service Task (Add-on) Manual


In order to facilitate debugging of these Script Tasks/Service Task (Add-on), we have added a logging function. Since it is used in the Add-on of “Google Drive Folder Generate”, you can refer to the codes of the script in the definition file.

Google Drive: Create Folder


For log output method, use engine.log(). The character string specified as the argument of the method is output as it is as a log.

Line breaks are entered for each method, and newlines in the string are kept intact and logged.

engine.log("status:" + status);


The output log can be checked in the detail screen of the Process on Administrator mode.
Below is an example of the log output from the “Google Drive Folder Generation” Add-on I mentioned earlier.


Until now, I suppose that there was no way other than saving the log in a String type Data Item in order to examine the behavior in the script in detail.

This method has a weak point, that is, a Script Task/Service Task cannot be failed, if it does, the log is not stored in the Data Item.

The logging function has an advantage that the log can be saved in either of success or failure of the Script Task/Service Task. You will not need to disguise the Step which should be naturally recorded as a failure, to a success.

I hope that from now on, you can use the logging function for debugging Script Task/Service Task (Add-on).

2 thoughts on “Using Log Output for Debugging of Script Task”

  1. Pingback: Sending a Text Message in the Middle of Workflow Using SMS – Script Task version – Questetra Support

  2. Pingback: Script Task – Questetra Support

Comments are closed.

%d bloggers like this: