IsAppEditable

Description: Returns TRUE if the application can accept changes without being re-started.
Returns: Boolean
Usage: Script or steady state.
Function Groups: Configuration Management
Related to: HasCompilationErrors | HasUndeployedChanges | AppIsRunning | GetAppInstance | GetLoadedAppInstance | GetOEMLayer
Format: \LayerRoot\IsAppEditable() or \IsAppEditable()
Parameters: none
Comments: Note that a steady-state call of this function is not automatically updated with a repository change.
This function can evaluate to false if applying an outstanding set of changes would cause an error or if there are outstanding changes that require a restart to be applied. It will also return FALSE if the working copy is not at the repository tip, or if there is a compilation error (generally due to corruption of the working copy files).

The Layer object can be acquired using GetAppInstance, GetLoadedAppInstance or GetOEMLayer.

If WorkingCopyLock Commit;
[
   { Now that we have the WC lock, make sure the Layer still is editable }
   IfElse(Layer\IsAppEditable(),
      WriteINIPropertiesObj = Layer\WriteINIProperties(ConfigData, TRUE);
   { Else }
      ForceState("ReleaseLock"); { Abort if app not editable }
   );
]