What Are Custom Actions

Custom actions are .Net classes that derive from an abstract Kjs.AppLife.Update.Engine.Core.UpdateAction class.  This class is located in the Kjs.AppLife.Update.Core.dll.  Custom actions can be written in any .Net language and can utilize the entire .Net framework to accomplish the functions for which they are being built.  The AppLife Update Engine processes your custom actions just as it processes the built-in actions.  At a minimum, a custom action must implement an Execute method and a Rollback method.  You can do much more with custom actions though, such as build a custom builder that enforces rules during the update build process, interact with other actions through the UpdateContext object, build a custom user interface to configure the action within AppLife Builder, manipulate the progress bar shown to the user while your custom action executes, and create custom palettes to organize your custom actions within the AppLife Builder user interface.

Custom Actions essentially allow you to implement any actions that you need in order to update and maintain your software in a simple, intuitive and easy to use framework.  Please reference the Custom Actions Quick Start to quickly learn how to create and implement custom actions.

 

Update Action Configuration and State

Most useful actions will require some configuration by the implementer of the action.  You configure your custom actions by implementing public properties on your custom action class.  Doing so allows the AppLife Builder application to persist your actions using Xml serialization.  In addition, you can configure your custom action with the default Action Builder.  This builder uses a property grid to manipulate your public properties.  While it is not normally necessary, you can extend this interface by implementing type converters, custom editors and other standard Property Grid extension techniques.  Alternatively, you can implement your own Custom Action Builder and/or Custom Action Editor.  These classes allow you to better control how your custom actions interact with the update build process.

 

Update Action Methods

The Update Build Engine process actions sequentially and in stages.  Building a custom action that participates with the build engine simply requires you to override the virtual methods on the abstract UpdateAction class.  To perform prep work during the prepare stage, override the Prepare method within your custom class.  The methods that can be overridden are: