alteryx server Knowledge Base

Definitive answers from Server experts.
Check out our powerful new search update! You can read more here. Please let us know if you have any feedback by creating a topic here.

Workflow with VBScript is not working in Alteryx Server

Alteryx
Alteryx
Created

Issue

 

The run command from either the event or the tool used to run an external script (VBScript) that contains the code to access the Excel object does not execute successfully on Alteryx Server. The job exits with a timeout error.

 

Error running Event #1: The external program <EXTERNAL_PROGAM> timed out after <TIME> ms

 

Configuration Example:

clarab_0-1574315350228.pngclarab_1-1574315533941.png

 

Script example:

 

 

Option Explicit

Dim objExcel
Set objExcel = CreateObject("Excel.Application")
..
..
objExcel.Application.Quit

Set objExcel = Nothing

 

 

Environment

 

  • Alteryx Server

 

Diagnosis 

 

To diagnose the actual cause of the issue, add debugging statements in the script to find where the code may be breaking on the server. Suggested code:

 

 

Option Explicit
	
Dim objFileToWrite
Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\temp\debug.txt",2,true)
objFileToWrite.WriteLine("Starting log")

Dim objExcel
Set objExcel = CreateObject("Excel.Application")
objFileToWrite.WriteLine("After Object Instantiation")	
..
..

 

 

Solution

 

The solution will depend on the cause of the issue.

 

In general, when a COM object is used, do ensure that the account that runs the workflow on the server has the necessary permission to launch and activate the COM object. If the debug statement does not go past the COM instantiation, it is likely that this is a permission issue. In this case, check the Windows System Event log for the actual error. Please refer to the "Additional Resources" section to enable the COM object on the server.

 

 

Additional Resources