2024 Feb 23 8:13 AM - edited 2024 Feb 23 8:15 AM
Hi, @marihirvi
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
2024 Feb 25 8:27 AM
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.
2024 Feb 26 3:13 AM
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)
2024 Feb 26 11:55 PM
Hi, @marihirvi , @Dan_Wroblewski . Good morning.
Any update on this. thank you.
2024 Feb 27 11:35 AM
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):
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).
2024 Feb 28 2:26 PM - edited 2024 Feb 28 2:26 PM
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.
2024 Feb 29 2:01 AM
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