Sidebar

How to depreicate QIE "Published Function"

0 votes
272 views
asked Jul 28, 2021 by jason-c-9829 (120 points)

I want to mark a QIE "Published Function" as deprecated and somehow see that as the function gets export and imported between NonProd and Prod QIE instances.

@Deprecated is something that Java supports.

The goal is that a breaking change happens and we want the depreicated method to be imported into Prod and show warning so that the channels affected by this change don't break but can be found and fixed.  Even if the channel is not currently running.

1 Answer

0 votes

We currently don't have a native way to make a function @Deprecated.  However, we often rename a function to reflect that it is, essentially deprecated.  I recommend making the changes in your NonProd environment first, then export the changes, and then import them into Prod and restart any channels.

In your NonProd environment, decide what you want the new name to be.  I like to prepend "zz_" to the name so that it sinks to the bottom of the Published Functions Panel. Navigate to your function, and click the Find Usages button to identify all the locations that the function is called.  I will use a function called sendFlag, which is used in 5 locations:

Click on the links to quickly navigate to each script and update the calling function name to be the new value (zz_sendFlag, in my case).  Note you will need to rerun the Find Usages each time you click on a link, and that list will continue to shrink while you update each function call.

Once all of the Usages have been updated and saved, the Find Usages should show an empty list.

Now, rename the published function and save it.  By again clicking on the Find Usages button, you should find all of the original calls, and they are using the new function name.

Export those changes from the NonProd environment, and then import them into the Prod environment.  This will allow you to update all usages and the name itself in a single transaction.  You will then need to restart each channel for the changes to take effect.

answered Jul 29, 2021 by mike-r-7535 (13,830 points)
...