Managing Workflow Revisions

When a workflow or workflow module is created, the workflow definition for that workflow or module is saved to the Commander database. Any subsequent configuration changes are then captured as revisions of that definition. By keeping track of the changes made to workflow definitions, Commander allows you to view workflow and module revisions and, if required, to revert to prior revisions.

In this topic:

Note: If you upgrade your Commander system from a version prior to 7.0 (when Workflow Revisions were introduced), your existing workflows will be registered as Revision 1.

Viewing workflow and module revisions

Access through:

Configuration > Command Workflows

Configuration > Self-Service > Approval tab

Configuration >Self-Service > Completion tab

Available to:

Commander Role of Superuser and Enterprise Admin

To view the revision history for a workflow or workflow module:

  1. On the appropriate Workflow page, click the Workflows or Modules tab.
  2. Select a listed workflow or workflow module and click Revisions.

    In the Definition Revisions dialog, the change history for the workflow definition is listed in order from the current to oldest.

Reverting to prior revisions

Access through:

Configuration > Command Workflows

Configuration > Self-Service > Approval tab

Configuration > Self-Service > Completion tab

Available to:

Commander Role of Superuser and Enterprise Admin

To revert your workflow or module to a prior revision:

  1. On the appropriate Workflow page, click the Workflows or Modules tab.
  2. In the Definition Revisions dialog, select a listed workflow or workflow module and click Revisions.

    The change history for the workflow definition is listed in order from the current to oldest.

  3. Select the revision that you want to revert back to and click Revert.
  4. In the Revert Revision dialog, enter details about why you're reverting to a prior revision in the Description of Changes field, then click Revert. For example, you might describe the purpose of a new workflow or, if you're editing an existing workflow, the nature of the changes that you made.

    When the revert process completes, a new copy of the selected workflow definition is listed as the current workflow or module and the revision number is incremented.

    Note: If there are errors with the revert, review the listed errors, click Close to cancel the operation. You can't revert to a prior revision until you resolve the errors. If you resolve the errors, you can then try to revert again. An example of an error that may occur and can be corrected is that a credential that existed in a prior revision may no longer be available in Commander.

  5. Click Close to exit the Definition Revisions dialog.

Exporting and importing workflow and module revisions

Access through:

Configuration > Command Workflows

Configuration > Self-Service > Approval tab

Configuration > Self-Service > Completion tab

Available to:

Commander Role of Superuser and Enterprise Admin

You can export and import specific workflow revisions and workflow module revisions through the Definition Revisions dialog. This allows you to edit a workflow definition in a text editor, then import it back to the same Commander system. This export/edit/reimport process may offer an advantage over a simple revert; for example, if you made many changes after your last revision, and you want to maintain some of those changes, reverting all the way back to the last revision isn't the best option as you may lose some changes that you want to keep.

To import a modified workflow revision through the Definition Revisions dialog, the definition's guid (globally unique identifier) that's provided in the JSON or YAML file must not be changed. The workflow definition's name that's provided in the JSON or YAML file, and the definition's file name can be changed.

Note: You can also export a specific workflow and workflow module revision, optionally modify that workflow definition, then import the workflow or workflow module in either the same Commander system or another Commander system as a new workflow or workflow module. To import a workflow revision as a new workflow or workflow module, the workflow definition's name that's provided in the JSON or YAML file must be unique to the Commander system, otherwise it'll overwrite an existing workflow definition. The workflow definition's guid that's provided in the JSON or YAML file and the definition's file name can be changed.

When exporting and importing workflow definitions, you must consider credentials that may be associated with the steps in the workflow definition:

  • When you export a workflow definition, any credential names are also exported.
  • When you import a workflow definition with steps that contain credentials, credentials with the same name must exist on the Commander system where you're importing the file. If they don't match, the import will fail.

    However, if you edit the workflow definition in a text editor to remove the credential names before you import it, the workflow definition will import successfully. However, before you can use that workflow or workflow module, you must edit the imported workflow definition file and add the appropriate credentials.

To export a workflow or workflow module revision:

  1. On the appropriate Workflow page, click the Workflows or Modules tab.
  2. Select a listed workflow or workflow modules and click Revisions.

    In the Definition Revisions dialog, the change history for the workflow definition is listed in order from the current to oldest.

  3. Select the revision that you want to export and click one of the following:
    • Export > JSON — exports the workflow or module as a JSON file
    • Export > YAML — exports the workflow or module as a YAML file

    By default, the file will be saved to your local Downloads directory. However, depending on your browser, you may be able to change the directory it's downloaded to or open the file with a text editor. The default filename of an exported revision is a concatenation of the workflow or module name and the revision number; for example, yourExampleWorkflow_v3.yaml.

  4. Click Close to exit the Definition Revisions dialog.

To import a workflow or workflow module revision:

  1. On the appropriate Workflow page, click the Workflows or Modules tab.
  2. Select a listed workflow or workflow module and click Revisions.

    In the Definition Revisions dialog, the change history for the workflow definition is listed in order from the current to oldest.

  3. Click Import.
  4. In the Import dialog, click Browse and navigate to a saved Commander workflow definition. JSON or YAML file formats are supported.
  5. Select the file and click Open.

    The file validation results are displayed in the Messages section.

    • If the file is successfully validated, review the displayed messages, then click Import.
    • The workflow you're importing will become the current revision.

    • If the file can't be validated, review the listed errors, then click Cancel. You can't import the file until you resolve the errors.
  6. Click Close to exit the Definition Revisions dialog.