Customizing DevOps flows
Summarize
Summary of Customizing DevOps flows
ServiceNow enables you to customize or recreate the DevOps Change Request approval flows—Manual Approval, Minimal Automation Approval, and Advanced Automation Approval—to meet your specific business needs. These flows manage the state transitions of change requests and step executions, and you can tailor them using Flow Designer or scripts by cloning and modifying the base flows.
Show less
Customizing Flows
- Cloning Flows: Start by cloning existing DevOps flows from the Base system or Flow Designer. Use the "Copy flow" option, assign a new name, and select the DevOps Data Model application. Customize and test the cloned flow before activation.
- Manual Approval Flow: This flow updates the state of step executions based on change request approvals (approved, canceled, or rejected). After state changes, call the Workflow Studio action Update state of step execution based on change approval either via flow or script to update step execution states and trigger the Change Control Callback for orchestration notifications.
- Minimal Automation Approval Flow: Upon approval, the change moves from "new" to "implementation" state. Call the Workflow Studio action DevOps - Update Step Execution and Change Request States to update step execution records and trigger orchestration notifications, using either a flow or a script.
- Advanced Automation Approval Flow: Similar to minimal automation, the change state transitions from "new" to "implementation" upon approval. Use the Update step execution record Workflow Studio action via flow or script to update step execution states and notify orchestration tools.
Using Scripts to Call Workflow Studio Actions
For all flows, you can invoke the required Workflow Studio actions programmatically using the FlowAPI method:
snfd.FlowAPI.executeAction('actionname', inputs);
Replace actionname with the appropriate action identifier for each flow, enabling seamless integration into custom scripts.
Benefits for ServiceNow Customers
By customizing these DevOps flows, you can align change request approvals and step execution updates with your organizational processes, ensuring accurate state management and timely orchestration notifications. This flexibility supports improved automation and control over your DevOps change lifecycle.
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);