Interface WorkflowMapper

    • Method Detail

      • promoteMap

        ForwardMapResponse promoteMap​(Trackable original,
                                      Trackable target,
                                      WorkflowPromoteRequest request)
        Transfer state (via ChangeDetail between an original item and a target item. If the target is null (as is the case with OperationType.CREATE original items), a clone of the original is created whose target level status is set to the targetSandboxId, targetLevel and targetStage defined in the PromotionRequest param.
        Parameters:
        original - The item containing the changes to transfer
        target - The item receiving the changes. Can be null, in which case a clone of the original is made
        request - Contains the target state information used to inform the target state
        Returns:
        A response object containing information about the result of the promotion operation.
      • deployMap

        ForwardMapResponse deployMap​(Trackable original,
                                     Trackable target,
                                     WorkflowDeployRequest request,
                                     String propagationId)
        Transfer state (via ChangeDetail between an original item and the target production state. If the target is null (as is the case with OperationType.CREATE original items), a clone of the original is created whose target level status is set to TrackingLevel.PRODUCTION.
        Parameters:
        original - The item containing the changes to transfer
        target - The production item receiving the changes. Can be null, in which case a clone of the original is made
        request - Contains the target state information used to inform the target state
        propagationId - Demarcates one or more specific ChangeDetail instances created during the deploy as viable for propagation.
        Returns:
        A response object containing information about the result of the deployment operation.
      • rejectMap

        RejectMapResponse rejectMap​(Trackable promotedState,
                                    Trackable target,
                                    WorkflowRejectRequest request)
        Transfer state (via ChangeDetail between a promoted sandbox state item to a new user state item. This occurs when a promoted sandbox state item contains one or more change details related to a promotion that has been rejected, thus sending those specific changes backward. If the promoted state sandbox item contains changes from multiple promotions, then the changes for the rejected promotion are removed and the entity state is updated to reflect. Finally, those changes matching the rejected promotion are applied to a new user sandbox state entity for the change author's review.
        Parameters:
        promotedState - The current sandbox state of an entity that contains changes from one or more promotions
        target - The user-level item receiving the changes. Can be null, in which case a clone of the original is made
        request - The specific promotion rejection request
        Returns:
        A pair containing the promoted state and the user state. The promoted state may be null if it was entirely rejected.
      • rebaseMap

        Trackable rebaseMap​(Trackable original,
                            Trackable target,
                            WorkflowRebaseRequest request)
        Update an original item with ChangeDetail state from a target that is missing in the original. Then, re-apply unpromoted changes from the original on top (possibly squashing the effect of one or more of the inherited changes from target). This is generally useful for bringing a user state up-to-date with changes in a target state. The missing changes were presumably introduced by another process (usually promotes from another user).
        Parameters:
        original - The less advanced item that is missing changes
        target - The more advanced item that contains changes not already in the original
        request - The specific rebase request
        Returns:
        The new state for the original with the changes applied. This state still needs to be persisted in order to overwrite the current original datastore state.
      • revertMap

        Trackable revertMap​(Trackable original,
                            WorkflowRevertRequest request)
        Update an original TrackingLevel.USER level record to represent a reverted state. This usually involves setting archive values to represent the item is no longer active.
        Parameters:
        original - The item that is being deactivated
        request - The specific revert request
        Returns:
        The resulting state of the archived instance