ValidateUpdateSetDependencies

  • Release version: Xanadu
  • Updated August 1, 2024
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of ValidateUpdateSetDependencies

    TheValidateUpdateSetDependenciesvalidator in ServiceNow identifies subflows called within a workflow and checks if those subflows are being modified in different, in-progress update sets. This validation warns users when a workflow and its dependencies are edited separately, which can cause deployment and compatibility issues when moving these update sets to another instance.

    Show full answer Show less

    Key Features

    • Detection of Cross-Update Set Dependencies: Flags when a parent workflow and its subflows are edited in separate update sets that are in progress.
    • Warning Mechanism: Issues a warning with severity level “Warning” if dependencies are split across update sets, highlighting potential risks.
    • Validation Results:
      • Valid: No dependency issues found.
      • Invalid: Dependencies exist in different update sets, requiring corrective actions.
    • Publishable and Runnable: The validator can be published and executed as part of workflow validation.

    Risks and Troubleshooting

    If a parent workflow and its dependent subflows are edited in separate update sets, there is a risk that:

    • The workflows become incompatible due to independent changes such as altered return values.
    • Deployments to other instances may fail or result in unexpected runtime behavior.

    The validator specifically checks update sets that are currently In progress and does not consider closed update sets. It also detects when a subflow is checked out by another user working in a different update set.

    Practical Example

    Two users working on related workflows in separate update sets may cause a conflict if one workflow’s return type changes but the dependent workflow is not updated accordingly in the same update set. Deployment of the dependent workflow without the updated parent workflow can cause failures or inconsistent behavior.

    Suggested Actions

    • Modify and deploy all related workflows in the same update set to ensure compatibility and reduce deployment issues.
    • If separate update sets must be used, ensure they migrate concurrently or merge dependencies into a single update set before deployment.

    Solutions for Managing Dependencies

    • Solution 1: Migrate the parent workflow and its dependent subflows together in the same update set by checking them out, republishing, and completing the update set before migration.
    • Solution 2: Move dependent subflows into the parent workflow’s update set manually:
      • Identify the update set for the main workflow.
      • Locate dependent workflows in their update sets.
      • Use the Customer Updates related list to reassign subflows to the parent workflow’s update set.

    Why This Matters

    Using the ValidateUpdateSetDependencies validator helps ServiceNow customers avoid deployment failures and runtime errors caused by independent edits to workflows and their dependent subflows in different update sets. It ensures smooth, consistent migration of workflows across instances by highlighting and mitigating dependency conflicts early in the development process.

    The ValidateUpdateSetDependencies validator identifies all the subflows called in the current workflow and determines if any of those subflows are being edited in a different (in progress) update set.

    This warning informs the user that this workflow and one or more of its dependencies are being actively modified in a way that will not deploy concurrently to another instance without additional effort.

    For information about update sets, see Create and select an update set.

    Validation summary

    • Risk: If a parent workflow is edited in one update set and its dependent subflow is edited in another, the two workflows might not be compatible when moved to a different instance. Making independent changes, such as to common or expected values, can make the two workflows incompatible.
    • Severity Level: Warning
    • Valid Result: Valid
    • Valid Message: There were no Update Set dependency issues found.
    • Invalid Result: Invalid
    • Invalid Message: This workflow has dependent workflows that are in a different update set.
    • Suggested Action: Modify and deploy both workflows in the same update set. If you must modify dependencies in separate update sets, use one of these methods:
      • Ensure that all update sets migrate concurrently.
      • Prior to deploying the main flow update set, merge the dependencies into one update set before completing that update set.
    • Publishable: Yes
    • Runnable: Yes
    • Related Information: Workflow movement with update sets

    Troubleshooting

    A workflow is added to an update set only when the workflow is published. This validator issues a warning when either of the following conditions exist:

    • A published subflow is in a different update set than the parent workflow and that update set is In progress.
    • A subflow is checked out by another user, who is working in a different update set than the current user.
    Note:
    This validator does not look for update sets that have been closed. It looks only at update sets that are In progress or at the update sets of all subflows being used by the current workflow that are checked out to users who are working in a different update set.

    Example

    Following is an example of an at-risk development scenario in which two users create dependencies between workflows in different update sets.

    User A:

    1. Sets Update Set A to the current update set.
    2. Checks out Workflow A.
    3. Changes the return value of the String type in Workflow A to a Reference/User type.
    4. Publishes Workflow A, causing an entry into Update Set A.

    User B:

    1. Sets Update Set B to the current update set.
    2. Checks out Workflow B.
    3. Includes Workflow A as a subflow.
    4. Uses the user reference return value from Workflow A as an approval assignment.
    5. Publishes Workflow B, causing an entry into Update Set B.

    Risks

    • User B moves Update Set B to a different instance that has an older version of Workflow A. The return value is not a user reference, which causes the outcome of Workflow B to be different than it was when tested in development.
    • User B moves Update Set B to a new instance that does not have a version of Workflow A. Workflow B experiences a validation failure at runtime and cannot execute. A log entry is added to the workflow log of the current record.

    Possible solutions

    Solution 1

    Migrate the parent workflow and all dependent workflows to a new instance together using the same update set.

    1. Set the update set to the one you want to migrate to new instances.
    2. Check out and republish the workflows that need to be included, this action forces an entry into the current update set.
    3. Complete the update set with all dependencies.
    4. Follow standard procedures for migrating update sets to local instances.

    Solution 2

    Move dependent workflows between update sets.

    1. Identify the update set containing the main workflow to be migrated.
    2. Navigate to System Update Sets > Local Update Sets.
    3. Find and select the update set that contains the dependencies to the main workflow.
    4. In the Customer Updates related list, select the workflow version of the subflow you want to move.
    5. Select the update set containing the parent workflow in the Update set field. If this field is not on the Customer Update form, configure the form and add the field.
    6. Click Update and the base system moves the dependent subflow to the update set selected.
    7. Repeat steps 4-6 to add additional dependent subflows to the parent flow update set.