1106 views

Moving workflows within update sets

 

Update sets and workflows

Moving workflows between instances using update sets can sometimes introduce errors. This article describes some of the issues that can occur and how to fix them. 

 

Symptoms


Symptoms may include the following:
  • Workflow fired twice after update set
  • Workflow did not run after update set
  • Notification worked on dev instance, but not on prod instance

 

 

Workflow fired twice after update set


If this error occurs, there may be two versions of the same workflow published. This is unlikely if you are using a Dublin or later version of ServiceNow. To troubleshoot and fix this issue, follow these steps:

  1. Click Workflow > Administration > Workflow Versions.
     
  2. Sort the list by name.
     
  3. Find the workflow with the issue.
     
  4. If there are two published versions, examine them and delete the one you do not want.

    You can only delete a workflow if there are no running contexts.

  

Workflow did not run after update set


If this error occurs, the workflow may be marked Active is False or Published is False.

  1. Click Workflow > Administration > Workflow Versions.
     
  2. Sort the list by name.
     
  3. Find the workflow with the issue.
     
    • If you cannot find workflow, remove the filter on the list by clicking All in the filter string.
    • There may be several workflow versions with the same name. Examine them and ensure the one you want active is marked Active=true and Published=true.
       
  4. The Published field of workflow version table is read-only. To mark one of your workflow versions as published, personalize the dictionary for this field. Right-click Published in the form of a workflow version and select Personalize Dictionary. Clear the read-only option on the dictionary entry.

 

Notification worked on dev instance, but not on prod instance


Notifications can stop working when an update set is moved to prod. The common cause is target users not present on the prod instance. If the users do not exist on the prod instance, their sys_ids, instead of their usernames, are displayed on the Notification Activity.

  1. After running the workflow, check the tables under System Mailboxes > Outbound
     
    • There are four collections of messages: Outbox, Sent, Skipped, and Failed.
       
  2. Finding the notification in one of these collections ensures that the workflow has properly sent the notification to the mail system.

 

Workflow validation on first run


When a workflow is run for the first time, it is validated. The same validation process occurs when the following is done:

  • Click the Validate Workflow UI action on a workflow version form.
  • Click the Validate button on the Graphical Workflow Editor screen.

If the workflow passes all critical validations, it is marked as validated and then run. Because it is marked validated, it is not validated on subsequent runs.

If the workflow version fails any critical validations, it does not run. The failure is logged in the context record for the attempted run within the Workflow log related list.

Article Information

Last Updated:2015-05-02 10:13:07
Published:2014-05-05