Add a workflow
Workflow is a technology preview feature and is disabled by default.
- Swarm workflows can be created by any Swarm user.
- Shared Swarm workflows can be viewed by any Swarm user.
- Shared Swarm workflows can be applied to a project or project branch by any Swarm user that is authorized to edit the project.
To add a workflow:
-
On the Swarm Workflows page, click the + Add Workflow button.
The Add Workflow page is displayed:
- Enter a name for the workflow.
- Optional: provide a description for the workflow.
-
You are automatically added as the owner of the workflow.
Optional: add more owners if required. This field auto-suggests groups, and users within Helix Server as you type (up to a combined limit of 20 entries).
Important- A workflow must have at least one owner.
- If you remove yourself as an owner, you cannot edit this workflow configuration later unless you have super user rights.
-
Optional: if you want other Swarm users to be able to use this workflow, select the Shared with others checkbox.
TipLeave the checkbox unselected until you have proved that the workflow rules work as expected. This keeps the workflow private and stops other Swarm users using the workflow until you are happy with it. Once you are happy with the workflow, select the checkbox to share the workflow with other users.
-
Rules:
On commit without a review:
This rule is applied when a changelist without an associated review is submitted from outside of Swarm.
Select one of the following options:
- Allow: the changelist is not checked, the changelist is submitted without a review.
- Create a review: the changelist is submitted and a review is created automatically for the changelist.
- Reject: the changelist submit is rejected.
TipThe selected rule is also applied when a changelist is submitted with
#review
in the description. For more information about creating a review by including a keyword in the changelist description, see Create a review.On commit with a review: This rule is applied when:
- A Swarm review is committed.
- A changelist with an associated review is submitted from outside of Swarm.
Select one of the following options:
- Allow: the changelist review state is not checked. The changelist is committed even if its associated review is not approved.
- Reject unless approved: the changelist is only submitted if its associated review is approved and the content of the changelist is identical to the content of the approved review.
TipThe selected rule is also applied when a changelist is submitted with
#review-nnnnn
,#replace-nnnnn
, or#append-nnnnn
in the description (nnnnn
= review ID). For more information about adding a changelist to a review by including a keyword in the changelist description, see Add a changelist to a review.On update of a review in an end state:
Used to stop review content being changed for reviews that are in specific states. By default, the protected end states are Archived, Rejected, and Approve:Commit. The end states are set by the Swarm administrator, see end_states.
This rule is applied when a changelist is added to a review.
Select one of the following options
- Allow: the review is not checked. The changelist is added to the review no matter what the review state is. This is the default setting.
- Reject: if the review is in one of the states specified in the
end_state
configurable:- The Add Change button is disabled for the review.
- The changelist is rejected if it is added outside of Swarm using
#review-nnnnn
,#replace-nnnnn
, or#append-nnnnn
in the description (nnnnn
= review ID).
Count votes up from:
By default, all of the up votes on a review are counted for the Minimum up votes value set on the project/branch the review is associated with. Limit the up votes that are counted to just the members of the project the review is associated with by using this rule.
This rule is applied when a user votes on a review.
Select one of the following options:
- Anyone: votes are counted for all reviewers on a review. This is the default setting.
- Members: only the up votes of members of the project the review is associated with are counted for the Minimum up votes set on projects/branches.
TipFor instructions on how to set Minimum up votes for projects and branches, see Project minimum up votes and Branch minimum up votes.
Automatically approve reviews:
By default, reviews must be manually approved. Enable automatic approval of reviews with this rule.
This rule is applied when a user votes on a review, a required reviewer is added to a review, or a required reviewer is made an optional reviewer on a review.
Select one of the following options:
- Never: reviews are not automatically approved. This is the default setting.
- Based on vote count: reviews are automatically approved if:
- There are no down votes on the review.
- There are no moderators on the review. If a review has moderators it cannot be automatically approved.
- All of the Required reviewers on the review have voted up.
- The Minimum up votes on the review has been satisfied for each of the projects and branches the review spans.
ImportantModerators prevent the automatic approval of reviews. For more information about moderators, see Moderators.
TipAfter a review has been automatically approved it needs to be manually committed.
-
Click Save.
NoteThe Save button is disabled if any required fields are empty.