20.5 Managing Workflow Versions

Each workflow can only have one Active workflow version.

20.5.1 Creating a Workflow Version

Create a workflow version by right-clicking on a workflow and selecting Create.

To create a workflow version:

  1. Right-click on the workflow and select Create Version.
    If the workflow already has an existing active version, you can either duplicate the existing version or create a new version.
  2. (Optional) In the Property Editor, set the workflow version.
    The Workflow Version can be a name (New) or a number (1.0).
  3. (Optional) Select a source for Additional Data.
    You can specify a SQL Query or table the workflow uses for bind variables during workflow execution. If the source is a table, you must identify the primary key column.
  4. (Optional) Set the Debug Level:
    • Info - The default debug level for the workflow version.
    • Warning - Debug level for logging less critical errors.
    • Error - Debug level for logging critical errors.
    • Trace - Debug level for tracing messages with procedures and functions.
    For more information on debug messages, see Utilizing Debug Mode and Viewing the Workflow Instance ID in Debug Messages.
  5. Click Show Messages to view and fix errors.
    The Show Messages icon indicates whether there are any workflow modeling or workflow configuration errors. When you click the icon, APEX displays the list of errors. You can click on an individual error to focus on that activity in the workflow. Note that you cannot save the workflow until you address any errors.
  6. Click Save to save your changes.

20.5.2 Saving and Activating a Workflow Version

Activate a workflow version by right-clicking the workflow version and selecting Activate.

In order to activate an In Development workflow, you must have participants defined for the workflow.
If your workflow has one or more Invoke Workflow activities, the invoked workflow(s) must have an active version. A workflow cannot be activated if any of the workflows it invokes are in development.

To resolve any errors in the workflow:

  1. Click Show Messages.
    A list of errors displays. Each error lists the location of the error and the error message.
  2. Click on a specific error to go to the error location in Workflow Designer.
  3. Make any changes necessary to resolve each error.
    Show Messages disappears when all errors are resolved.

To save changes to a workflow version:

  1. Click Save.

To activate an In Development workflow version:

  1. Right-click on the workflow version and select Activate.
    Alternatively, in the Property Editor, click Activate next to the State property.

    If a workflow already has an existing active version, the existing active version moves to Inactive and the current version becomes Active.

    If the current workflow has an Invoke Workflow activity and the invoked workflow does not have an Active version, the current workflow cannot be activated.

  2. Click OK to confirm.
  3. Click Save.
The workflow version is now Active.

20.5.3 Editing a Workflow Version

Edit a workflow version by clicking on it in the workflow tree.

To edit an In Development workflow:

  1. In the Designer Tree, click the In Development version of the workflow.
  2. Edit the workflow by:
    • Adding and deleting activities and connections
    • Adding new variables
    • Deleting existing variables
    • Deleting the workflow version
    Once you delete a workflow version, APEX deletes any workflow instances based on that version. You cannot delete the In Development version of a workflow if that workflow is used in the Invoke Workflow activity of another workflow.
  3. Click Save.

To edit an Active workflow:

  1. In the Designer Tree, click the Active version of the workflow.
  2. Edit the workflow by:
    • Adding activity variables local to an activity
    • Modifying branch conditions on switch activities
    • Adding new workflow participants
    You cannot delete existing participants on an active workflow. You also cannot delete the workflow version.
  3. Click Save.

20.5.4 Copying a Workflow Version

Copy a workflow version by right-clicking the active workflow and selecting Duplicate.

You must have an Active version of the workflow in order to create a copy.

To copy a workflow version:

  1. Locate the Active version of the workflow in the Designer Tree.
  2. Right-click the workflow version and select Duplicate.
APEX duplicates the active workflow. The duplicated workflow is now In Development.

Note:

Only one version is allowed to be In Development at a time. If duplicating the active workflow creates two In Development workflows, you must delete one in order to continue.

20.5.5 Deactivating a Workflow Version

Deactivate a workflow by right-clicking the active workflow and selecting Deactivate.

If a workflow is used in the Invoke Workflow activity of another workflow, you cannot deactivate the Active version of that workflow unless there is an In Development version available.

To deactivate a workflow version:

  1. Locate the Active version of the workflow.
  2. Right-click the workflow version and select Deactivate.
    Alternatively, you can select the workflow version, and click Deactivate in the property editor.
  3. Confirm you want to deactivate the workflow by clicking OK.
The workflow is now Inactive. Any running workflow instances based on this workflow definition continue to run, but no new workflow instances can start.

20.5.6 Importing a New Application Version Containing Workflows

When replacing an application, any running workflow instances are automatically suspended, and must be restarted by a workflow administrator.

When replacing an existing version of an application with a new version of the same application, any running workflow instances are automatically suspended. The workflow administrator can then decide which existing workflow instances should be resumed and which should be terminated.

APEX does not automatically resume suspended workflow instances since the workflow definition in the imported application could have drastically changed. If the workflow definition is changed, automatically resuming workflow instances could lead to irregular results.