Interface Reviewable

All Known Subinterfaces:
ContractHelper, QuoteHelper, QuotePersistedHelper

public interface Reviewable
Implemented by helpers of document types that support a review workflow (e.g. quotes, contracts).
  • Method Details

    • isInReview

      boolean isInReview()
      Checks if the user who triggered the calculation can do the review of the line items.

      Example:

      
       def helper = processor.getHelper()
       if (helper.isInReview()) {
           // Execute review-specific validation or calculations
       }
       
      Returns:
      true if the clid is in a review workflow step and there is an active review sub step for the current user
    • getReviewSubStep

      LineItemHelper.ReviewSubStep getReviewSubStep()
      Gets the current review sub-step information.

      Example:

      
       def helper = processor.getHelper()
       if (helper.isInReview()) {
           def label = helper.getReviewSubStep().label
           def userGroupName = helper.getReviewSubStep().userGroupName
       }
       
      Returns:
      the review sub-step, or null if the user is not in review
    • getItemsForReview

      List<LineItemHelper.LineItem> getItemsForReview()
      Gets a list of line items that are assigned to the current user for review.

      This method returns the line items that are part of the current user's review scope. Only line items that have an active review assignment for the current user's review user group are included.

      Example:

      
       def helper = processor.getHelper()
       if (helper.isInReview()) {
           def itemsForReview = helper.getItemsForReview()
           for (item in itemsForReview) {
               // Process each line item assigned for review
               api.logInfo("Reviewing item", item.lineId)
           }
       }
       
      Returns:
      the line items assigned to the current user for review, or an empty list if not in review or no items are assigned