Legacy: Define the Change Manager script

The change manager script is responsible for the logical change process and exposes customization hooks for provider implementations, which are scripts that determine how the assets are handled.

  1. Create a new script that extends the CfgAutoChangeManager script include.
  2. Implement the following mandatory functions:
    • isAuthorized(GlideRecord record)
    • isChangeRequired()
    • getChangeId(GlideRecord current)
    • setChangeId(GlideRecord record, String changeId)
    • prepare(GlideRecord record)
    • finalizeChange(GlideRecord record)
    • getWorkflowVariables(String workflowName, GlideRecord record)
    • getPushWorkflowName()
    • cleanupAfterCancelChange(GlideRecord record)
  3. Implement the optional getPushWorkflowName() override function if it applies to the provider.
    Example Change Manager Script
    var ChefNodeDefinitionChangeManager  = Class. create ( ) ;
    ChefNodeDefinitionChangeManager. prototype = Object. extendsObject (CfgAutoChangeManager , { // Code body omitted for brevity } ) ;