Class ReviewStepDefinition
You get an instance from
api.newReviewStep() in a Creation Workflow
logic and add it to the workflow with CreationWorkflowDefinition.withSteps(CreationWorkflowStepDefinition...),
together with the other steps. A review step defines:
- who reviews and in which order: the review sub-steps set by
withReviewByUserGroupWithSubSteps(ReviewByUserGroups)(required) - which line items each user group sees: the line item filters, set either on the review step by
withLineItemFilters(Map)or on the first sub-steps
This class inherits the methods of CreationWorkflowStepDefinition. The assignees, watchers, and notification
setting of a review step are processed in the same way as for any other step; the reviewers are defined by the
review sub-steps.
Example:
if (api.isSyntaxCheck()) return
def reviewStep = api.newReviewStep()
.withLabel("Review")
.withLineItemFilters([
"BusinessUnitPrinting" : Filter.like("inputs.BusinessUnit.value", "Printing"),
"BusinessUnitResidential": Filter.like("inputs.BusinessUnit.value", "Residential and Small Business")
])
.withReviewByUserGroupWithSubSteps(
api.newReviewByUserGroups()
.withParallelSubSteps(
api.newReviewSubStep()
.withUserGroup("SupplyCoordinator")
.withLabel("Supply Coordinator"),
api.newReviewSubStep()
.withUserGroup("PricingAdvisor")
.withLabel("Pricing Advisor")
)
)
return api.newCreationWorkflow()
.withSteps(
reviewStep,
api.newCreationWorkflowStep()
.withLabel("Final Approval")
)
- Since:
- 14.0 - Caribou Lou
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the line item filters defined on the review step level.Retrieves the review sub-step configuration of this review step.Sets the label of the review step.withLineItemFilters(Map<String, Filter> lineItemFilters) Defines line items groups for this review step using filters.withReviewByUserGroupWithSubSteps(ReviewByUserGroups reviewByUserGroups) Defines the sub-steps in which the line items are reviewed by user groups, and whether these sub-steps run in sequence or in parallel.Methods inherited from class CreationWorkflowStepDefinition
getLabel, getShouldSendNotification, getUserAssignee, getUserAssignees, getUserGroupAssignee, getUserGroupAssignees, getUserGroupWatchers, getUserWatchers, withShouldSendNotification, withUserAssignee, withUserAssignees, withUserGroupAssignee, withUserGroupAssignees, withUserGroupWatchers, withUserWatchers
-
Constructor Details
-
ReviewStepDefinition
public ReviewStepDefinition()
-
-
Method Details
-
withLabel
Sets the label of the review step. Behaves likeCreationWorkflowStepDefinition.withLabel(String), but returns the review step, so you can continue with the review step methods in the same chain.Example:
def reviewStep = api.newReviewStep() .withLabel("Review")- Overrides:
withLabelin classCreationWorkflowStepDefinition- Parameters:
label- The label as a string.- Returns:
- The same
ReviewStepDefinitionobject, for chaining. - Since:
- 14.0 - Caribou Lou
- See Also:
-
withReviewByUserGroupWithSubSteps
public ReviewStepDefinition withReviewByUserGroupWithSubSteps(ReviewByUserGroups reviewByUserGroups) Defines the sub-steps in which the line items are reviewed by user groups, and whether these sub-steps run in sequence or in parallel.This setting is required: a review step without sub-steps fails validation when the Creation Workflow runs. Create the argument with
api.newReviewByUserGroups(). Calling this method again replaces the previous value.Example:
def reviewStep = api.newReviewStep() .withLabel("Review") .withReviewByUserGroupWithSubSteps( api.newReviewByUserGroups() .withSequentialSubSteps( api.newReviewSubStep() .withUserGroup("SupplyCoordinator") .withLabel("Supply Coordinator"), api.newReviewSubStep() .withUserGroup("PricingAdvisor") .withLabel("Pricing Advisor") ) )- Parameters:
reviewByUserGroups- the review configuration- Returns:
- The same
ReviewStepDefinitionobject, for chaining. - Since:
- 14.0 - Caribou Lou
- See Also:
-
getLineItemFilters
Retrieves the line item filters defined on the review step level.Example:
def filters = reviewStep.getLineItemFilters() // [BusinessUnitPrinting: ..., ...]- Returns:
- A map of user group unique names to their line item filters, or
nullifwithLineItemFilters(Map)was not called. - Since:
- 14.0 - Caribou Lou
- See Also:
-
withLineItemFilters
Defines line items groups for this review step using filters. The line item groups are mapped to user groups. Each line item should be included in at most one line item group.Each key must be the unique name of an existing user group; otherwise the Creation Workflow execution fails. The line item groups decide which line items each user group sees for review, while the review sub-steps decide who reviews them and in which order, so use different user groups for the two.
Define the filters either here, for the whole review step, or on the review sub-steps, not in both places. If you do not define them here, the sub-steps that start the review must define their own filters: each parallel sub-step, and the first sub-step of each sequence (or, if that first sub-step is a parallel group, each of its branches). The later sub-steps of a sequence must not define any filters; they use the filters of the first one.
Example:
def reviewStep = api.newReviewStep() .withLabel("Review") .withLineItemFilters([ "BusinessUnitPrinting" : Filter.like("inputs.BusinessUnit.value", "Printing"), "BusinessUnitResidential": Filter.like("inputs.BusinessUnit.value", "Residential and Small Business") ])- Parameters:
lineItemFilters- a map of user group unique names to their corresponding line item filters- Returns:
- The same
ReviewStepDefinitionobject, for chaining. - Since:
- 14.0 - Caribou Lou
- See Also:
-
getReviewByUserGroupWithSubSteps
Retrieves the review sub-step configuration of this review step.Example:
def subSteps = reviewStep.getReviewByUserGroupWithSubSteps()- Returns:
- The
ReviewByUserGroupsobject set bywithReviewByUserGroupWithSubSteps(ReviewByUserGroups), ornullif it was not set. - Since:
- 14.0 - Caribou Lou
- See Also:
-