Groovy Windows Job unable to restart as Task in Workflow

Document ID : KB000085108
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\Automic\Agents\smt12kapp005_groovy_8\Temp\JAAGTNTX.TXT.groovy: 1: expecting ''', found '\r' @ line 1, column 96.
01021',SMT12KAPP005_GROOVY_8,M

A Windows job compiles Groovy code (type: Interpreter).
It is placed inside a workflow.
If it is restarted as a task inside the workflow, it fails.
If the whole workflow is restarted, it works. 
If restarted outside the job (not inside a workflow), it works. 

Investigation

  1. Edit your Windows .ini file > set ECPEXE= to the path and name of the Groovy interpreter > set ECPEXT= to the Groovy file extension > Save > restart Windows agent 
  2. Create a Windows job that compiles Groovy script. 
  3. Place that Windows job inside a Workflow. 
  4. Run the JOBP. 
  5. Restart the Windows task inside the workflow.

Results
Actual: Fails with above error message.
Expected: Restarts successfully - failed tasks in workflows are able to restart.

Environment:
OS Version: N/A
Cause:
Cause type:
Other
Root Cause: Only found when running the Automation Engine version 10.0.2. Should not be a problem in the latest v10 release 10.0.8.
Resolution:
Install a Windows agent version 10.0.8 and verify if the issue still occurs because there is no longer any maintenance on version 10.0.2.

Fix Status: No Fix

Fix Version(s):
N/A
Additional Information:
Workaround :
N/A