Customizing DevOps flows
Summarize
Summary of Customizing DevOps flows
ServiceNow enables you to customize or recreate DevOps Change Request approval flows—including Manual Approval, Minimal Automation Approval, and Advanced Automation Approval—according to your business requirements. These flows can be cloned from the base system and modified using Flow Designer or scripts to tailor the change management process to your needs.
Show less
Customizing DevOps Flows
To customize a flow, clone it from the Base system DevOps flows or Flow Designer, rename it, assign it to the DevOps Data Model application, and then edit it in Flow Designer. You can test the flow before activation to ensure it runs without errors.
Flow-Specific Customization Details
- DevOps Change Request Manual Approval flow: After a change request is approved, canceled, or rejected, update the step execution state by calling the Update state of step execution based on change approval Workflow Studio action. This can be invoked via a flow or script. This update triggers the Change Control Callback flow to notify orchestration tools of the decision.
- DevOps Change Request Minimal Automation Approval flow: Upon approval, the change state transitions to implementation. Call the DevOps - Update Step Execution and Change Request States action (via flow or script) to update the step execution record and trigger the Change Control Callback flow.
- DevOps Change Request Advanced Automation Approval flow: Similar to minimal automation, update the step execution record by calling the Update step execution record action after approval, using a flow or script. This also triggers the Change Control Callback flow.
Using Scripts to Call Workflow Studio Actions
You can invoke Workflow Studio actions programmatically using the ServiceNow Flow API with the following pattern:
snfd.FlowAPI.executeAction('actionname', inputs);
Replace 'actionname' with the appropriate action ID for each flow type.
Practical Benefits for ServiceNow Customers
- Customize DevOps approval flows to align with your organization's change management policies.
- Ensure automated updates to step executions and change request states facilitate accurate orchestration and integration.
- Maintain flexibility by using either Flow Designer or scripts to implement changes.
- Leverage testing capabilities within Flow Designer to validate customizations before deployment.
Customize or recreate the DevOps Change Request Manual Approval, DevOps Change Request Minimal Automation Approval, and DevOps Change Request Advanced Automation Approval flows based on your requirements using a flow or a script.
You can clone the DevOps flows and then customize them according to your requirements. To clone a flow, navigate to the flow you want to clone from the Base system DevOps flows sections or from the Flow Designer landing page (). On the top-right corner of the Flow page, select . In the Create a copy of this flow dialog box, enter the new name for the flow, and select DevOps Data Model as the application. Select the Copy button to create the new flow. The new flow will open in Flow Designer. Make any changes to customize it to your business requirements. You can run the flow to make sure it has no errors by selecting the Test button on the top-right corner of the screen before activating the flow. Activate the flow when it's ready by selecting the Activate button.
Customize the DevOps Change Request Manual Approval flow
In the DevOps Change Request Manual Approval flow, the state of step execution is changed based on the change approval. However, you can customize or recreate this flow based on your requirements.
After the change request state is moved to approved, canceled, or rejected (either manually or by using a change policy), call the Update state of step execution based on change approval Workflow Studio action to update the State field of the step execution record.
- Calling the Workflow Studio action using a flow
-
Calling the Update state of step execution based on change approval Workflow Studio action is required to update the state of the step execution record according to the approval field in the change request record.
This action serves as a trigger for the Change Control Callback flow, which is used to notify the change decision to the orchestration tool.
- Calling the Workflow Studio action using a script
-
Method to call the Workflow Studio action from a script:
sn_fd.FlowAPI.executeAction('sn_devops.update_state_of_step_execution_based_on_change_approval’, inputs);
Customize the DevOps Change Request Minimal Automation Approval flow
In the DevOps Change Request Minimal Automation Approval flow, the change is approved and the state of the change moves from the new to the implementation state. After the change request state is moved to approved, call the DevOps - Update Step Execution and Change Request States Flow Designer action to update the State field of the step execution record.
- Calling the Workflow Studio action using a flow
-
Calling the DevOps - Update Step Execution and Change Request States Workflow Studio action is required to update the state of the step execution record.
This action serves as a trigger for the Change Control Callback flow, which is used to notify the change decision to the orchestration tool.
- Calling the Workflow Studio action using a script
-
Method to call the Workflow Studio action from a script:
sn_fd.FlowAPI.executeAction('sn_devops.devOps-_update_step_execution_and_change_request’, inputs);
Customize the DevOps Change Request Advanced Automation Approval flow
In the DevOps Change Request Advanced Automation Approval flow, the change is approved and the state of the change moves from the new to the implementation state. After the change request state is moved to approved, call the Update step execution record action to update the State field of the step execution record.
- Calling the Workflow Studio action using a flow
-
Calling the Update step execution record Workflow Studio action is required to update the state of the step execution record according to the approval field in the change request record.
This action serves as a trigger for the Change Control Callback flow, which is used to notify the change decision to the orchestration tool.
- Calling the Workflow Studio action using a script
-
Method to call the Workflow Studio action from a script:
sn_fd.FlowAPI.executeAction('sn_devops.update_step_execution_record’, inputs);