code: @Indexable(type = IndexableType.REINDEX)
  	@Override
  	public CPDefinition moveCPDefinitionToTrash(
  			long userId, CPDefinition cpDefinition)
  		throws PortalException {
  
  		// Commerce product definition
  
  		if (cpDefinition.isInTrash()) {
  			throw new TrashEntryException();
  		}
  
  		int oldStatus = cpDefinition.getStatus();
  
  		if (oldStatus == WorkflowConstants.STATUS_PENDING) {
  			cpDefinition.setStatus(WorkflowConstants.STATUS_DRAFT);
  
  			cpDefinitionPersistence.update(cpDefinition);
  		}
  
  		cpDefinition = updateStatus(
  			userId, cpDefinition.getCPDefinitionId(),
  			WorkflowConstants.STATUS_IN_TRASH, new ServiceContext(),
  			new HashMap<>());
  
  		// Workflow
  
  		if (oldStatus == WorkflowConstants.STATUS_PENDING) {
  			workflowInstanceLinkLocalService.deleteWorkflowInstanceLink(
  				cpDefinition.getCompanyId(), cpDefinition.getGroupId(),
  				CPDefinition.class.getName(), cpDefinition.getCPDefinitionId());
  		}
  
  		return cpDefinition;
  	}
docs: Moves the commerce product definition to the recycle bin.
  
  @param  userId the primary key of the user moving the commerce product
  definition
  @param  cpDefinition the commerce product definition to be moved
  @return the moved commerce product definition