Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Functions Issue (By Me) Tab

Jay-eem
Participant
1,087

Hi, @marihirvi 

Jayeem_0-1708675756114.png

I Creating Function and use multiple time. 

when i change one of the function I used and click Advance > Overwrite local template
it should update all function right? but that's not happened

Jayeem_1-1708675819728.png

 

6 REPLIES 6

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos
983

I created a flow function with just JavaScript node inside and put this flow function in 2 different places, and it worked as expected. If I update one of them only that is updated. If I then click overwrite local template all instances are updated.

Maybe give some more details of what's happening in the custom flow function.




--------------
See all my blogs and connect with me on Twitter / LinkedIn

943

Hi, @Dan_Wroblewski 
Please Try this scenarios
I think on second time changes encountered the issue.
Can't upload video. I try to explain it.

1. create flow function
2. drag and drop function created on #1 (even same area with original)
3. update original and overwrite local template (first time)
4. open flow function you put on #2 (it reflected what you put on #3)
5. update original and overwrite local template (second time)
6. open flow function you put on #2 (it not reflected now what you put on #5)

Jay-eem
Participant
885

Hi, @marihirvi , @Dan_Wroblewski . Good morning.
Any update on this. thank you.

0 Kudos
850

OK, it seems like a bug but it depends what you think the proper behavior is.

As I see it, this is how it is working (I don't necessarily endorse this as the proper behavior):

  • There is the local template – this is what appears under By Me.
  • Then you have instances of the flow function. Each of these can be opened and customized.
  • After customizing one, you can "overwrite local template", which updates the version under "By Me" but not the existing instances. For you, this is improper behavior, even a bug, and overwriting local template should update all the existing flow functions. Or perhaps there should be a separate button. This is up to @Mari to answer.

Perhaps this is inconsistent with the way UI components work, though UI components have significant differences with flow function (e.g., UI components have component layout and styling).

If I update a component in the component template editor, it automatically updates all the instances of that component. I can create my own version of that component and then I have a default component and a customized one under "By Me". Perhaps flow functions should work differently, or perhaps its a bug (personally, I think there should be 2 options to update all instances or update the template). 




--------------
See all my blogs and connect with me on Twitter / LinkedIn

marihirvi
Product and Topic Expert
Product and Topic Expert
806

Hi, like you have discovered, updating the template doesn't overwrite the changes into other instances of the flow function that are already present on the canvas. The assumption is that those flows are tested to work, and we don't want to introduce possibly breaking changes to them when the template is changed somewhere else in the app.

You can update all the flows to the latest template by using the "Revert to local template" action in the same dropdown where you have "Overwrite local template". Doing the updates one by one helps you ensure that the logic still works correctly in each place where the flow is used.

771

Hi, So, That's how it work. but how about if i had 10-20 instance . need to "Revert to local template" one by one?. hope you put another option if possible to update all instances.
but thanks for this. thank you for you time @marihirvi  @Dan_Wroblewski