ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Server Discussions

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

Chained Gallery app Concurrent Users Conundrum

_Robb_
5 - Atom

We are running into an issue with a chained app in the Gallery that passes data through the chain.

 

As each app in the chain creates a separate temp file, we are using a network drive so save the files from app#1 that are picked up in app#2 or app#3 etc.

 

The issue comes in with concurrent users. Depending on selections made, User#2's project may complete before User#1's project causing User#1's data to be overwritten and hence providing incorrect results.

 

Is there a way pass the information from app#1 to app#2 without writing to a temp file on a network drive, or to identify the temp folder used by app#1 in subsequent apps in the chain?

 

Thank you. 

MarqueeCrew
19 - Altair
19 - Altair

Robb,

 

I'd likely suggest something like:  Use a GUID to create a subdirectory where subsequent jobs look into a private set of data rather than into the general temp pool.

 

A short and directional answer....

 

See you at inspire!

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
KMiller
8 - Asteroid

Hi @MarqueeCrew

 

I have this same problem. I have taken a GUID type approach, using the __CloudUserId script to identify the user and create output files from workflow 1 with the users Server id. However I am having trouble figuring out how to get workflow 2 to dynamically select the users input files for a drop down or list box, using an external source. Do you know of a way to update the below file path dynamically in the workflow.

 

Thanks.

 

Kevin

 

2020-10-13_11-36-56.png

phottovy
11 - Bolide

Hi @_Robb_ and @MarqueeCrew,

 

I am having the same issue as @KMiller . I am able to create a unique file to send to the second app but I'm not sure the best way to get the second app to know which unique file to look for. Can you elaborate more on the GUID and subdirectory method you mentioned in your previous post?

patrick_digan
16 - Nebula
16 - Nebula

@phottovy @KMiller 

I have had success with the following approach that works for the gallery:

1) Put all of your workflows in the same directory. So if Workflow 1 kicks off workflow 2 which kicks off workflow 3, save them all to the same folder.

2) Have Workflow 1 output relative files for use in workflow 2. For example, workflow 1 can output to file1.yxdb which workflow2 will then use. Since no folder is specified, it will save in the same directory as the workflow.

patrick_digan_0-1605640069046.png

 

3) In the interface designer settings, type in the filename of your second step. Again, no folder means it's a relative path. 

patrick_digan_1-1605640161736.png

 

4) In your second workflow, have any input/interface tools that are getting data from your first workflow use a relative reference just like step 2. You just want the filename. 

5) When you save workflow 1 to the gallery, be sure to check the box in the workflow options >>> manage workflow assets for your successive workflows. I don't think it should matter whether you check the box for your relative outputs.

 

This works because when alteryx runs the workflow in the gallery, it will spin up each instance in a separate temp folder. So there is no chance of concurrent users tripping up over each other. And all of your steps are run from the same temp folder, so they can all read/write to the folder.

 

Hope that helps!

 

phottovy
11 - Bolide

@patrick_diganI will give this a try. Thank you for the detailed description!