Interface ReviewUserGroupSubStep

All Superinterfaces:
IsParallelSubStep, IsSequentialSubStep

public interface ReviewUserGroupSubStep extends IsParallelSubStep, IsSequentialSubStep
A sub step in the Creation Workflow where line items are sent for review by a particular user group.

You get an instance from api.newReviewSubStep() and configure it with the with... methods. Every sub-step must have a user group set by withUserGroup(String).

A sub-step implements both IsParallelSubStep and IsSequentialSubStep, so you can use it anywhere: in ReviewByUserGroups.withParallelSubSteps(IsParallelSubStep...), in ReviewByUserGroups.withSequentialSubSteps(IsSequentialSubStep...), or inside a sequence or a parallel group.

Example:


 def threshold = 0.2

 api.newReviewByUserGroups()
     .withParallelSubSteps(
         api.newReviewSubStep()
             .withUserGroup("supply_coordinator")
             .withLabel("Supply Coordinator"),
         api.newReviewSequentialSubSteps(
             api.newReviewSubStep()
                 .withUserGroup("pricing_advisor")
                 .withLabel("Pricing Advisor"),
             api.newReviewSubStep()
                 .withUserGroup("channel_analyst")
                 .withLabel("Channel Analyst")
                 .withLineItemCondition(Filter.greaterThan("inputs.Margin.value", threshold))
         )
     )
 
Since:
14.0 - Caribou Lou
See Also:
  • Method Details

    • withUserGroup

      ReviewUserGroupSubStep withUserGroup(String userGroupName)
      Defines the user group that will review the line items in given line item group.

      This setting is required: a sub-step without a user group fails validation when the Creation Workflow runs. The user group must exist; otherwise the Creation Workflow execution fails.

      Example:

      
       api.newReviewSubStep()
           .withUserGroup("PricingAdvisor")
       
      Parameters:
      userGroupName - the unique name of the review user group
      Returns:
      The same ReviewUserGroupSubStep object, for chaining.
      Since:
      14.0 - Caribou Lou
      See Also:
    • withLabel

      ReviewUserGroupSubStep withLabel(String label)
      Defines the label of this sub step.

      If no label is set, the unique name of the user group set by withUserGroup(String) is shown instead.

      Example:

      
       api.newReviewSubStep()
           .withUserGroup("PricingAdvisor")
           .withLabel("Pricing Advisor")
       
      Parameters:
      label - the label of the sub step, the label is shown in the Summary section
      Returns:
      The same ReviewUserGroupSubStep object, for chaining.
      Since:
      14.0 - Caribou Lou
      See Also:
    • withLineItemFilters

      ReviewUserGroupSubStep withLineItemFilters(Map<String,Filter> lineItemFilters)
      Defines line item groups for this review sub step using filters. It is possible to specify a line item group either on the step level or on the sub step level (but only on the first sub step in a given sequence of sub steps).

      Use either this method or ReviewStepDefinition.withLineItemFilters(Map), not both. Without step-level filters, each parallel sub-step and the first sub-step of each sequence must define its own filters. Each key must be the unique name of an existing user group.

      Example:

      
       api.newReviewSubStep()
           .withUserGroup("supply_coordinator")
           .withLabel("Supply Coordinator")
           .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, each sub step behind this will inherit the same line item filters
      Returns:
      The same ReviewUserGroupSubStep object, for chaining.
      Since:
      15.0 - Southside
      See Also:
    • withLineItemCondition

      ReviewUserGroupSubStep withLineItemCondition(Filter condition)
      Defines condition for a line item which must be matched if this sub step should be applied on a particular line item. It means user will review only line items matching this condition. If no line item in the line item group matches this condition, then this sub step will be skipped.

      Line items that match the condition get the To Do status for this sub-step; the other line items are Accepted by default. The condition is evaluated against the current line item data when the sub-step is about to become active: for a sub-step that starts the review, when the Creation Workflow moves to the review step; for a later sub-step, when the previous sub-step finishes with Review Done and no line item was rejected. It is not evaluated when a rejection returns the review to a previous sub-step. A skipped sub-step is not shown in the Status Overview panel.

      Example:

      
       def threshold = 0.2
      
       api.newReviewSubStep()
           .withUserGroup("channel_analyst")
           .withLabel("Channel Analyst")
           .withLineItemCondition(Filter.greaterThan("inputs.Margin.value", threshold))
       
      Parameters:
      condition - the filter for line item if a line item should be reviewed in this sub step or not
      Returns:
      The same ReviewUserGroupSubStep object, for chaining.
      Since:
      15.0 - Southside
      See Also:
    • withWaitingForAllPreviousReviews

      ReviewUserGroupSubStep withWaitingForAllPreviousReviews()
      Marks current sub step as a waiting. The sub step is active as soon as all reviews from all previous line item groups are done.

      Without this setting, a sub-step becomes active for each line item group separately, as soon as the previous sub-step finishes the review of that group. A waiting sub-step becomes active only when the previous sub-step has finished the review of all line item groups. This is useful, for example, for a managerial review that makes sense only after all first-level reviews are complete.

      The first sub-step of a sequence, or a sub-step used directly as a parallel sub-step, cannot be marked as waiting; such a definition fails validation. You can combine this setting with withLineItemCondition(Filter).

      Example:

      
       api.newReviewSequentialSubSteps(
           api.newReviewSubStep()
               .withUserGroup("pricing_advisor")
               .withLabel("Pricing Advisor"),
           api.newReviewSubStep()
               .withUserGroup("pricing_manager")
               .withLabel("Manager Review")
               .withWaitingForAllPreviousReviews()
       )
       
      Returns:
      The same ReviewUserGroupSubStep object, for chaining.
      Since:
      16.0 - Black Cat
      See Also:
    • withCalculateOnReviewDone

      ReviewUserGroupSubStep withCalculateOnReviewDone()
      Marks current sub step to trigger calculation when the review is done.

      When a reviewer clicks Review Done in this sub-step, the document is recalculated before the review is finished, so line item changes are applied and the reviewers see up-to-date inputs and outputs. Validation rules in the header logic or line item logic can block finishing the review if the data is not valid.

      Example:

      
       api.newReviewSubStep()
           .withUserGroup("pricing_advisor")
           .withLabel("Pricing Advisor")
           .withCalculateOnReviewDone()
       
      Returns:
      The same ReviewUserGroupSubStep object, for chaining.
      Since:
      16.0 - Black Cat
      See Also: