This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
If you have written an external script to use a COM object, for example, Microsoft Excel and the workflow uses this, you will need to ensure that the appropriate permissions have been given to the group of users or specific users in order to run the script successfully on the Alteryx server. This article guides you through the steps needed.
Logs and files can be hard to find if you’ve never had to deal with them before. This Alteryx Analytic Application will help gather most of the common logs and environmental files Support requests in one fell swoop!
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
Set objExcel = CreateObject("Excel.Application")
Set objExcel = Nothing
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:
Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\temp\debug.txt",2,true)
Set objExcel = CreateObject("Excel.Application")
objFileToWrite.WriteLine("After Object Instantiation")
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.
To enable COM object on the server
We receive quite a few questions on how to properly chain workflows together. We have a few options that depend on what Alteryx type you are using. If you have Designer only, your options are to use the Crew Macros which are found on the Community. No link provided as the tools get updated. Please use the Community search for the latest Crew Macros. In the Crew Macros set, the tools that you will be looking to use are the Runner Tools. You can find a description of the tools here Runner Tools. Note: You will have to create another workflow using these macros to execute the workflows. If you have Designer with Scheduler, you can use the Crew Macros on the Scheduler, but they are not recommended or supported in this configuration. Using Runner Macros on an Alteryx Server or Gallery can risk over-utilization of resources and cause instability in an Alteryx Server or Gallery environment and thus Runner Macros are not supported on Alteryx Server. There are other options that will allow you to use the workflow on the Gallery or Scheduler. When you have Scheduler or Server you have access to the Alteryx Engine Command. This will allow Alteryx to run workflows through the command line to execute additional workflows or programs. In most cases, the AlteryxEngineCmd.exe will be located in C:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe. Great, so what do I do with it? In your Workflow Configuration window, you have a tab called Events. In that tab you can add a Run Command event. You can choose to run the command as: In the Command: you can either browse to your AlteryxEngineCmd.exe or type in the location like so - C:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe In the Command Arguments [Optional]: You will add the location of the 2nd workflow along with the name of the workflow and file type. example: "C:\temp\NHL2.YXMD" VERY IMPORTANT: Notice in the example above that we have quotations around the string. The reason for this is that the command has difficulty with spaces in the directory paths. By putting quotes around the string, this tells the command to essentially ignore the spaces. However, best practice is to not have spaces in your directory paths when using this command. Sample: Note: This method is a great method, but can be finicky. if you are running other command process or do not have admin access to the folders it can cause issues. You have another option as well! You can turn your workflows into apps for either Gallery or Scheduler use and have them run consecutively. When you drag an Interface Tool onto the canvas your workflow will automatically change to an App. If you don't want to use an Interface tool you can still change the workflow to an app to use the chained app option. Once you change the workflow to an app, you can use the Interface Designer window to chain the apps together. Note: When creating chained workflows to use in the Scheduler and Gallery, the workflows and Assets for the workflow must be placed on the Server. Also, the Server will need to have access to any database connections, file directories, and input files. Want to know more about the Interface Designer? Interface-Designer-Part-1 Want to schedule workflows to run consecutively? Check out this article - Scheduling-Workflows-Using-Event-Run-Command
I had a user recently ask about having an app on their Gallery run, produce an output, and have a second workflow send an email with the output from the app. There are a couple of ways to accomplish this, but I came up with an idea that I thought would be useful to share with the Community as they may find this feature useful for many situations.
The idea was to make it simple for the user so that they didn't have to use a chained app. The user just wanted the second workflow to run, but not put the Email tool on the Server. The solution is to use the Events > Run Command in the Workflow Configuration to schedule the email workflow after the app is run.
To accomplish the task, you can use a command line option that will add a specified workflow to the scheduler queue.
Scheduling a workflow via the Command Line:
The Run Command is in the Events tab; click on your Alteryx canvas and in the Workflow Configuration window select Events > Add > Run Command:
Run Event When: to "After Run"
C:\Program Files\Alteryx\bin\AlteryxService.exe (This may not be exactly where your company has the AlteryxService.exe saved. Please check with your Server Admin.)
Command Argument [Optional]:
addtoqueue=C:\location\of\workflow\to\schedule.yxmd,Server name,Controller Token,true
C:\Program Files\Alteryx\bin\AlteryxService.exe addtoqueue=C:\Temp\simpleoutput.yxmd,dib-ps-tst-12,3EA75D9170E4956DC3583C23224BA0898A98376D,true
Where to find Server name:On the machine the holds the server - Windows Start>Control Panel>System>Computer Name
Where to find the Controller Token: Open your Alteryx System setting on the Server and click Next until you reach the General screen under the Controller section. Click View to see the Controller Token and copy the token.
Once the first workflow is run, the Scheduler will queue up the scheduled workflow and run the workflow on the Scheduler immediately.
Hopefully, this will give you some creative ideas to use this operation!