Skip to main content

Workflow versioning

Zuora

Workflow versioning

You can better manage your workflows with the version control feature. Version control enables you to update a workflow at the version level instead of creating a new workflow from scratch. You can switch between different versions with only a few clicks. When you create a new workflow version, the active version and the existing API integration can still work properly. 

After you open a workflow page, a version list for the workflow definition is available on the Versions tab. You can open and view any version. You can set an active version as the current version for the workflow. You can create a new version based on the active version or by using an imported JSON file.

The workflow version starts from version 0.0.1 by default. The version number must be unique. A new version number must be greater than the existing highest version number.

You can retrieve the workflow version information in Data Query with the Version field. All version changes are tracked and recorded in Audit Trail.

View the versions of a workflow definition

You can view the versions of a workflow definition on the Versions tab. Click a workflow to open it, and then click the Versions tab. The information for each version is displayed in a table. 

Workflow versions are either in the active or inactive status, which is indicated in the Version Status field.

  • Active - The active version is loaded by default on the Workflow tab when you open this workflow. The active version cannot be edited. It can be run manually, with event triggers, or on schedule. It is indicated with an Active label in the workflow definition name. Only one version can be set as the active version for a workflow definition.
  • Inactive - The inactive version can only be accessed on the Versions tab for a workflow. The inactive version can be edited and run manually as a development version for test. The Workflow Name and Workflow Triggers fields on the Settings tab for the inactive version are not editable. Except for the active version, all other versions of a workflow definition are inactive versions. It is indicated with an Inactive label in the workflow version name.

The first version created with the workflow definition is always inactive.

It's important to understand the difference between workflow definition status and workflow version status:

  • The status of workflow definitions indicates whether a definition is triggerable: Only active definition can be triggered.
  • The status of workflow versions indicates which workflow version will be run when a definition is triggered.

WF_version_page.png

The following actions are available for each version. Click the menu icon to access these actions.

  • Run - Manually run the selected workflow version.
  • Edit - Open and edit the selected version for the workflow definition. The active version is not editable.
  • Export - Export the logic and configurations of a selected version of workflow as a JSON file. See Export a specific version of a workflow for details.
  • Metrics - Display the task and workflow usage metrics for the selected version.
  • Set Active - Set the selected version as the active version. See Set a workflow version as the active version for details.
  • Delete Previous Versions - Delete the previous versions prior to the selected version. See Delete workflow versions for details.
  • Delete - Delete the selected workflow version. The active version cannot be deleted. See Delete workflow versions for details.

Set a workflow version as the active version

When you complete updates and test on an inactive version, you can activate it so that it can be run with event triggers or on schedule as the current version. For details about the active and inactive versions, see View the versions of a workflow definition.

To set an inactive workflow version as the active version, complete the following steps:

  1. Open a workflow.
  2. Click the Versions tab. 
  3. Click the menu icon next to the workflow version that you need to set to Active and then click Set Active

Create a workflow version

You can create a new version for a workflow definition based on the active version or by using an imported JSON file. When you create and edit the new version, the active version and the existing API integration of the workflow can still work properly. 

To create a new workflow version, complete the following steps:

  1. Open a workflow.
  2. Click the Versions tab to open it.
  3. Create a new version by using either of the following methods:
    • At the upper right of the workflow details page, click the more icon, and then click Create New Version.
    • On the Versions tab, click the plus icon at the upper right of the workflow version table, and then click Create New Version.  
  4. In the New Workflow Version window, create the new version through either of the following ways:
    • Create a new version based on the active version: After the new version is created, the definition and settings of the active version are cloned to the new version by default. You can continue to edit the new version. 
      1. On the General tab, enter a valid version number. The version number must be unique and in one of the following formats. The new version number must be greater than the existing highest version number.
        • integer
        • integer.integer
        • integer.integer.integer
      2. (Optional) Enter any descriptions for this new version.
      3. Click Create.
    • Create a new version by using an imported JSON file:
      1. On the General tab, enter a valid version number. 
      2. (Optional) Enter any descriptions for this new version.
      3. On the Import JSON tab, paste the content of your JSON file or update the pre-loaded JSON file of the active version.
      4. Click Create.

The newly created workflow version will always be in the Inactive status. Set it to Active when you complete the configuration.

Edit a workflow version

The active version of a workflow definition is not editable. To edit a workflow version, you must first set the workflow version status to Inactive and re-activate it after editing is complete. For information about how to edit a workflow version, see Edit a Workflow.

You can still view the details of the tasks by clicking the pencil icon on each task.

Alternatively, you can also create a new development version of the workflow and mark active once changes are complete. See the above Create a workflow version section for details.

Configure the settings of a workflow version

You can configure the settings of a workflow version in the Settings tab. Available settings include execution priority, triggers, notifications, cleanup policy, security, and input parameters. For more information, see Configure the settings of a workflow version.

Delete workflow versions

You can delete inactive versions of a workflow. You can delete a specific version or all previous versions prior to a selected version. The active version cannot be deleted. The deleting operation cannot be undone.

  1. Open a workflow.
  2. Click the Versions tab to open it.
  3. On the Versions tab, click the menu icon next to the workflow version and perform either of the following actions for your needs:
    • To delete a specific version of a workflow, click Delete.
    • To delete previous versions prior to the selected version, click Delete Previous Versions.

Export a specific version of a workflow definition

You can export the logic and configurations of a specific version of a workflow definition as a JSON file. The data that has been processed in this workflow version cannot be exported.

To export a specific version of a workflow definition, complete the following steps:

  1. Open a workflow.
  2. Click the Versions tab.
  3. On the Versions tab, click the menu icon next to the version that you need to export, and then click Export

When you export a workflow on the Workflows tab, the active version for the workflow definition will be exported. See Export and import a workflow for details.