Workflow: a step-by-step walk-through
This chapter shows an example of the workflow for a project and step-by-step instructions for creating and using a P4 Code Review workflow.
- P4 Code Review must be correctly configured by your P4 Code Review administrator to use the workflow feature, see Workflow global rules and Helix Core Server configuration for Swarm.
- Read the Workflow overview page, this will help you to understand how workflow is implemented in P4 Code Review.
- To understand the benefits of using the P4 Code Review Workflow feature, see Why should I use P4 Code Review workflow?
Step-by-step walk-through example
The workflow we will create and use for this step-by-step walk-through enforces the pre-commit review model. This means that all changelists must be reviewed and approved before they can be committed to the depot.
Basic workflow and project settings used in the step-by-step walk-through:
- Review voting requirements:
- If the review has any down votes it cannot be approved.
- All of the required reviewers must vote the review up.
- At least three project members must vote up the review, this includes the required reviewers.
- P4 Code Review automatically approves a review when all of the voting requirements are satisfied.
- Changelist submit restrictions:
- If a changelist is submitted without a review, the changelist submit is rejected.
- If a changelist is submitted without an approved review, the changelist submit is rejected.
- If a review is in any of the following states: Archived, Rejected, and Approve:Commit it cannot be updated.
In this section: