Customizing DevOps flows
Summarize
Summary of Customizing DevOps flows
This content guides ServiceNow customers on how to customize or recreate the DevOps Change Request approval flows—Manual Approval, Minimal Automation Approval, and Advanced Automation Approval—to align with specific business requirements. Customization involves cloning existing flows from the base system and then modifying them using Flow Designer or scripts.
Show less
Customizing DevOps Flows
To customize a flow, you first clone it via Flow Designer by copying the desired base flow and assigning it to the DevOps Data Model application. After cloning, you can modify the flow, test it to ensure error-free execution, and then activate it when ready.
Key Customization Details per Flow Type
- DevOps Change Request Manual Approval flow:
- Updates the step execution state based on the change approval status (approved, canceled, or rejected).
- Uses the Workflow Studio action Update state of step execution based on change approval to update the step execution record state.
- Can trigger this action either via a flow or by calling it from a script using
snfd.FlowAPI.executeAction('sndevops.updatestateofstepexecutionbasedonchangeapproval', inputs);. - This action triggers the Change Control Callback flow, notifying orchestration tools of the change decision.
- DevOps Change Request Minimal Automation Approval flow:
- Moves the change state from New to Implementation upon approval.
- Calls the Workflow Studio action DevOps - Update Step Execution and Change Request States to update step execution state.
- Supports invocation via flow or script with
snfd.FlowAPI.executeAction('sndevops.devOps-updatestepexecutionandchangerequest', inputs);. - This action also triggers the Change Control Callback flow for orchestration notification.
- DevOps Change Request Advanced Automation Approval flow:
- Also moves the change from New to Implementation state after approval.
- Uses the Workflow Studio action Update step execution record to update the step execution state.
- Can be called from a flow or script using
snfd.FlowAPI.executeAction('sndevops.updatestepexecutionrecord', inputs);. - This action triggers the Change Control Callback flow to notify orchestration tools about the change decision.
Practical Benefits
By customizing these flows, ServiceNow customers can tailor the DevOps change approval process to their organizational needs, automate state transitions, and ensure timely communication with orchestration tools. Using either Flow Designer or scripts provides flexibility in managing change request approvals and integrating with existing automation pipelines.
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);