cancel
Showing results for 
Search instead for 
Did you mean: 

Remove reference to cloned recipe

AMacourek
Deputy Chef III
Deputy Chef III

I cloned a recipe and made significant changes.  I noticed in settings there is a message: "The parent recipe that this recipe was copied from has a new version. Installing this new version overwrites the current recipe. Installed updates can be reverted via recipe version history." with an Install button.  A person could click this and overwrite the recipe.

Why would you want this feature?  In my view, cloning a recipe would be the same thing as "Save As."  Why would you want to propagate changes to all other recipes that started from one?

My question is how to remove a reference for a cloned recipe?  

1 ACCEPTED SOLUTION

gary1
Star Chef I
Star Chef I

I agree, this is weird and kind of dangerous!

Do this:

  1. Original > clone Copy 1 > clone Copy of Copy 1
  2. Delete Copy 1

Deleting Copy 1 breaks the lineage and the reference on "Copy of Copy 1" to "Copy 1" will disappear.

View solution in original post

7 REPLIES 7

gary1
Star Chef I
Star Chef I

I agree, this is weird and kind of dangerous!

Do this:

  1. Original > clone Copy 1 > clone Copy of Copy 1
  2. Delete Copy 1

Deleting Copy 1 breaks the lineage and the reference on "Copy of Copy 1" to "Copy 1" will disappear.

AMacourek
Deputy Chef III
Deputy Chef III

Thanks! I am glad that I am not the only one who thinks this is odd and problematic.

RussellJ
Deputy Chef III
Deputy Chef III

I need to chip in here... because actually this is a real time saver for one current use case for me!

When one of my Recipes runs it needs to process things in a destination app by making an API call.  But there are (currently) two instances of this destination app and probably more in future.  These are not Dev and Prod but simply Prod A and Prod B.  The data I'm working with tells me to which instance I should direct my activity. At first I thought a simple IF statement in a Recipe - if for Prod A then use an Action configured with a Connection to the Prod A instance.  If for Prod B then use an Action configured for Prod B - easy, right?

But then you bump into a current Workato constraint that "Most connectors only allow one connection per app, per recipe" - see https://docs.workato.com/en/connections.html#use-connections-in-recipes. So, if you add another Action for the same app in a Recipe, but want to use a different destination instance, Workato uses the *same* Connection for both Actions.  If you change the Connection for the first action, Workato uses the new value for the other one too.  So you can't just use a simple IF clause in a single Recipe to point to multiple instances of an app.

My solution is to split out the part of the Recipe that makes the API call to the destination system into it's own Recipe Function, and name it "..._switch_ProdA".  I then clone this to make another Recipe Function "..._switch_ProdB". The parent Recipe is where I do my IF, and this then calls the relevant Recipe Function.

But later on, because I am an imperfect hooman, I discover I want to improve/bugfix something in "..._switch_ProdA".  Because of the naming convention I know it has a clone-buddy, so after saving and testing "..._switch_ProdA" I then visit it's clone-buddy and just accept the changes.  (I always know to edit the ProdA RF first so the changes are knocked down to the ProdB RF).

This has saved me huge amounts of time, prevents the error prone manual application of changes to multiple Recipes, and ensures both Recipe Functions are easily in perfect sync.  It's a beautiful thing.  And would make me cry if it went away.

I agree that on occasion it is irritating that cloned Recipes hold a candle for their parent.  But rather than take away this facility my suggested feature request would for Workato to make this facility *selectable* by the user.

It's interesting that the current facility is labelled "Clone" (rather than simply "Copy") and I suspect this is because someone wanted to imply this kind of "in sync" connection.  But it's an interesting omission (to me) that there is no (simple) Copy facility!

So, my suggestion would be to introduce another menu option of "Copy" alongside the existing "Clone".  When using the "Copy" facility, there would be no expectation of an ongoing connection.  The new Recipe would be an unlinked Copy at that point in time.  And the user would never be bugged by the constant message about updating it.  But you'd still have the (deliberate) choice of making an (intentional) Clone with the connection retained. 

That way everybody would be happy!  A perfect Product Owner solution 😀

[Waits nervously for @gary1  to tell me that there's an easier way to achieve my goal rather than duplicate Recipe Functions]

Haha, yeah there's a wayyyy easier way than maintaining two recipes that do the same thing.

On any function recipe, you can configure its actions to accept a connection parameter from the parent recipe calling the function. On the action, choose the "Calling recipe's connection". Then when you call the recipe you'll see a new required input field where you simply connection ID or name into the function and the function/action assumes it. 

If the connection is the only thing changing, this should be a quick update. If there are any other differences between the recipes, you should just add additional params to pass on input.