Jon G Lind
ServiceNow Employee

A Playbook that is not in the ReleaseOps scope will not execute

There is currently a bug in the business rule that fires playbooks for ReleaseOps in which it does not properly account for scope.  

 

Here's how to fix it

  1. Select the scope ReleaseOps with the globe in the header.
  2. Go to System Definition > Business Rules
  3. Find the Playbooks: "Run Release Playbook on Preparing" and "Run Assessment Playbook when Ready"
  4. Change the script: Find the "triggerPlaybook" line near the end and replace it: 
    // Find the following line near the end:
    // Run Assessment Playbook when Ready (approximately line 46)
    // Run Release Playbook on Preparing (approximately line 20)
    /* sn_playbook.PlaybookExperience.triggerPlaybook(grPlaybook.name, current); */
    // And REPLACE it with:
    
    const scopeName = grPlaybook.sys_scope.scope;
    // Don't include scope name if calling to another ReleaseOps playbook
    const playbookName = (scopeName == 'sn_releaseops' ? '' : scopeName + '.') + grPlaybook.name;
    sn_playbook.PlaybookExperience.triggerPlaybook(playbookName, current);
3 Comments
Daniel Draes
ServiceNow Employee

I would deviate from the instructions Jon, the 'deactivate and copy' rule is outdated.  When possible we recommend a fix in place. This way customers get notified with a skipped records once the issue is fixed in baseline.

Jon G Lind
ServiceNow Employee

Thanks Daniel.  I removed the clone technique.

Mark Nguyen
Tera Guru

Hi @Jon G Lind and @Daniel Draes 

 

I am on Zurich and using ReleaseOps version 1.2.3. I have duplicated the OOB playbooks under my custom application and configured the playbooks for a 4 instance pipeline per your document. 

 

I just came across this blog and have not yet attempted my first deployment. Is this fix still applicable?

Thank you.