Thursday, March 22, 2012

Things to Watch Out for When Upgrading an APEX Plugin

Now that APEX plugins have been around for a while I'm starting to notice that upgrades are being released for the same plugin. This is a natural occurrence in the lifecycle of software development and is expected.

Prior to upgrading an APEX plugin you should be aware of what will happen to the settings (also known as Custom Attributes) for your plugin before upgrading. Before I continue it's important to note the two different types of custom attributes a plugin can have.

Application: These attributes are applicable for the plugin as a whole across the entire application. Think of them as a global variable for the plugin

Component: These attributes are applicable for each instantiation of the plugin. For example, if the plugin is an item type plugin the settings found while editing the item are component level attributes.

When upgrading a plugin the component level attributes/settings will retain their value (this is good). The same is not true for application level attributes. They will be reset to the plugin's default values. For example if I configure the ClariFit Dialog plugin they're a few settings I can change: Background Color and Background Opacity. In the image below I've changed them from the default values to red and 50% respectively.

After I upgrade the plugin to a newer version the application level attributes are reset back to the plugin's default values shown below.

Be sure to take note of your plugin application level settings before updating a plugin. I find the easiest way to do this is to take a screen shot, similar to the images above, before I upgrade the plugin and compare the values with the new default values and make the appropriate changes.


  1. Hi Martin,

    good point! Because of your blog posting I have rethought that behavior and changed it in APEX 4.2.

    1) A plug-in export doesn't contain the values of application level custom attributes anymore. I think that's also good for plug-in developers which don't have to cleanup there values (eg. Google API keys, ...) before they do the export

    2) The values of application level custom attributes have been refactored out into it's own table. Accessible with view APEX_APPL_PLUGIN_SETTINGS. This "Component Settings" can be found in Shared Components -> User Interface. They will also be used for application level settings for our built-in item-, region-, ... types.

    3) For subscribed plug-ins there is a new setting called "Subscribe Component Settings" to indicate if the settings for that plug-in should be copied from the master application or if the application wants to use it's own values.


  2. Patrick, when is 4.2 scheduled for release/beta?

    Alistair Laing