Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Relative File Paths and Gallery

Scott_Snowman
10 - Fireball

Hello, I have a workflow in our team's shared repository that is structured in the following fashion. The workflow file itself is in the "workflow" folder, and it accesses macros saved in a subdirectory "workflow\macros" via the "macros\" relative path (not shown).

 

ScottS28_0-1634773301912.png

 

The workflow saves files to the "file_lists" directory via the relative path "..\file_lists"

 

If I attempt to save this workflow in our private Gallery and run it, I get the below message.

 

ScottS28_1-1634773336611.png

 

This makes sense, since I assume the Gallery is copying the workflow file to the Staging directory for execution, and there is no such "file_list" subdirectory there the same way that it exists in our repository. (And I imagine if we could manually create one in that location on the server, it wouldn't be guaranteed to persist for all time.)

 

Is there a way to get the Gallery to package directory structures, similar to packaged inputs / outputs / other file references during save? Without this it doesn't appear we can schedule this workflow using a Gallery implementation without changing all the relative file paths to be the same directory as the workflow, which we don't want to have to do.

3 REPLIES 3
AZuc
Alteryx
Alteryx

Hi @Scott_Snowman ,

 

One thing I've noticed is that you are using D:\path... to point to the file. Perhaps your server is not configured to understand the same letter as the same point you machine understands. Try to point to your file using \\MACHINE\SHARING\...

 

 

André Zuccatti

Sales Engineer - LATAM -
Alteryx, Inc.


Scott_Snowman
10 - Fireball

Hi @AZuc , thanks for the response.

 

I am not using D:\path to point to the file, either on my machine or on the server. All file paths in the workflow are relative.

 

The workflow uses the relative path ..\file_lists in its output tools. 

 

On the server this expands to the D:\ProgramData\Alteryx\Service\Staging path as indicated by the screenshot. On my machine it expands to a folder on C:\ representing the repository in Github.

 

So the question is, how can the Server environment be configured to match the workflow environment, expecting a file_lists directory to exist at the same level of a directory containing the workflow?

AZuc
Alteryx
Alteryx

Understood @Scott_Snowman ,

 

I see no way to do any configuration on the server side, but you can think about using the constants [Engine.WorkflowDirectory] and
[Engine.WorkflowFileName] (the last one includes the staging folder where the package is uncompressed). If you are creating that .bat file inside your workflow, you will be able to create inside the staging folder or any relative path to it. No folder is gonna be automatically created when the package is uncompressed.

 

See if it helps you and feel free to ask about more details.

 

André Zuccatti

Sales Engineer - LATAM -
Alteryx, Inc.