Workflow is a technology preview feature and is disabled by default.
This section provides information on how to enable workflow and configure the global workflow rules for Swarm.
Each global workflow rule has a mode setting, this determines how that rule is used by Swarm:
default
mode will change the workflow for projects and project branches that do not have an associated workflow. policy
mode will change the workflow for all projects and project branches. Configure the global workflow rules with the following configuration block in the SWARM_ROOT/data/config.php
file:
<?php
// this block should be a peer of 'p4'
'workflow' => array(
'enabled' => false, // Switches the workflow feature on. Workflow is a technology preview feature, it is currently unsupported and not suitable for production. Default is false
),
'workflow_rules' => array(
'on_submit' => array(
'with_review' => array(
'rule' => 'no_checking', // 'no_checking|strict'
'mode' => 'default' // 'policy|default'
),
'without_review' => array(
'rule' => 'no_checking', // 'no_checking|auto_create|reject'
'mode' => 'default' // 'policy|default'
),
),
'end_rules' => array(
'update' => array(
'rule' => 'no_checking', // 'no_checking|no_revision'
'mode' => 'default' // 'policy|default'
),
),
'counted_votes' => array(
'rule' => 'anyone', // 'anyone|members'
'mode' => 'default' // 'policy|default'
),
'auto_approve' => array(
'rule' => 'never', // 'never|votes'
'mode' => 'default' // 'policy|default'
),
),
Workflow is a technology preview feature and is disabled by default.
Technology preview features:
Technology Preview features are currently unsupported, might not be functionally complete, and are not suitable for deployment in production. Technology preview features are subject to change and may be removed before they become fully supported features.
These features are provided to the customer to solicit interest and feedback, with the goal of full support in future releases. Customers are encouraged to provide feedback and functionality suggestions for Technology Preview features before they become fully supported.
To enable the workflow feature, edit the SWARM_ROOT/data/config.php
file and set the enabled
configurable to true in the workflow
section of the codeblock:
'workflow' => array(
'enabled' => false, // Switches the workflow feature on. Workflow is a technology preview feature, it is currently unsupported and not suitable for production. Default is false
),
The default value is false
.
with_review: applied when:
The with_review
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.
without_review: applied when a changelist without an associated review is submitted from outside of Swarm.
The without_review
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.
By default, you can update the content of a review no matter what state the review is in. Reviews can be protected from content change if they are in a specified state by using the end_states configurable.
The end_states configurable sets the protected review states.
update: applied when a changelist is added to a review.
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.
counted_votes: applied when a user votes on a review.
For instructions on how to set Minimum up votes for projects and branches, see Project minimum up votes and Branch minimum up votes.
By default, reviews must be manually approved. Enable automatic approval of reviews with this rule.
auto_approve: 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.
Moderators prevent the automatic approval of reviews. For more information about moderators, see Moderators.
After a review has been automatically approved it needs to be manually committed.