Alteryx Server Knowledge Base

Definitive answers from Server experts.

Clean Up Duplicate Workflows In the Gallery

AmeliaG
Alteryx
Alteryx
Created

It’s okay, it happens to the best of us.

Perhaps you forgot to open the workflow from the Gallery for editing or maybe you accidentally chose ‘Save As’ even though you’d already saved your workflow to the Gallery once before. Now your Gallery looks a little something like this…

image 1 - duplicate workflows.png

To combine the workflows into a single workflow with multiple versions, follow the steps below:

  1. Go to the oldest duplicated workflow in the Gallery. Click the ‘Replace Workflow’ link.image 2 - 'replace workflow'.png
  2. Search for the newer workflow and click ‘Replace’.image 3 - select workflow and replace.png

Note: By clicking replace, the workflow which you have selected to replace the existing workflow will now be available as the most recent version of existing workflow. The results from the workflow which you have selected to replace the existing workflow will be lost and only the results from the original workflow will remain.

Comments
RohitChopra
6 - Meteoroid

Hi @AmeliaG 

 

Assuming I am working on a workflow name 'W1' on Day 1 

 

I deploy 'W1' in our Private gallery with the Workflow settings: Set Workflow Credentials > "Always Run this workflow with these credentials"  and it runs fine after the first deployment

 

Now Lets say on Day 7 I have deployed the 'W1' again after few days with some changes in the workflow but keep the settings same as above and this will also work fine. However, if I go to 'W1' Deployed on Day1 in Private and choose the replace workflow option and select 'W1' deployed on on Day7 for replacement  the workflow never runs going forward 

 

This shows an error when I click on run option "This workflow uses Owner specified credentials, but those credentials have been deleted. Please contact the owner of this workflow or your Gallery Administrator." 

 

I tried to dig into this further and I am able to get to know from the existing set Schedule that both the workflows are deployed correctly but after using Replace Workflow, the workflow Starts Running As 'local user'  instead of pre-defined user Credentials for user 'S'

 

Capture.PNG

Can you please assist if I am missing something while performing replace workflow option or if I need to get some settings changed through my Admin

EdP
Alteryx
Alteryx

Hi @RohitChopra - I'm sorry we didn't get back to you sooner. 

This behavior is by design for security reasons, although the error message is quite confusing. 

When you replace Workflow_A with Workflow_B we don't want to allow Workflow_B to use the credential that was saved with Workflow_A because it could use that credential to access data beyond what was accessed in Workflow_A.  To get the workflow running, the owner needs to open the workflow, confirm it's not accessing data it shouldn't, then resave it to the Server and respecify the credential it should use.

While that seems to make sense, what if both Workflow_A and Workfflow_B were published to use the SAME credential?  Unfortunately, this will still lead to the credential being stripped from the workflow and necessitate the owner open and resave it to the Server, respecifying the credential.  The security argument seems more tenuous here, but this is the expected behavior.

(Jira TCPE-15)

Paul_Holden
9 - Comet

Hi,

 

I'm really struggling to explain this lifecycle to our developers

.

They expect to be able to grab the latest "source" from git, modify it, and then just overwrite the previously saved workflow on the Gallery with the new version.

 

Can you point me to a best practice document which explains to a developer who is used to having code in source control how the lifecycle management should work for the Gallery?

EdP
Alteryx
Alteryx

Hi @Paul_Holden -

To help with GitHub integration, our v3 API added the ability to upload a new version of a workflow that does not require the manual Replace Workflow steps described in the above article.  See Upload a New Version of an Existing Workflow in

 

 

This endpoint is expected to be fully functional in Server 2023.1 release due to the defect TGAL-7009.

 

We also have a v3 Macro Pack to make Server API calls using OAuth2 from within a workflow to help automate the use of the Server endpoints:

 

https://community.alteryx.com/t5/Engine-Works/Introducing-the-Alteryx-Server-v3-API/ba-p/899228