class ProcessHandler {

    public void updateProcess(String userId, EntityDetail originalProcessEntity, Process updatedProcess) throws InvalidParameterException,
                                                                                                                UserNotAuthorizedException,
                                                                                                                PropertyServerException {

        final String methodName = "updateProcess";

        initializeAssetZoneMembership(updatedProcess);
        validateProcessParameters(userId, updatedProcess.getQualifiedName(), methodName);

        String processGUID = originalProcessEntity.getGUID();
        ProcessConverter processConverter = new ProcessConverter(originalProcessEntity, null, repositoryHelper, methodName);
        Process originalProcess = processConverter.getProcessBean();

        validateZoneMembership(userId, originalProcess, updatedProcess, processConverter.getAssetAuditHeader());

        ProcessPropertiesBuilder updatedProcessBuilder = new ProcessPropertiesBuilder(updatedProcess.getQualifiedName(), updatedProcess.getName(),
                updatedProcess.getDisplayName(), updatedProcess.getDescription(), updatedProcess.getOwner(), updatedProcess.getOwnerType(),
                updatedProcess.getZoneMembership(), updatedProcess.getLatestChange(), updatedProcess.getFormula(), null, null, repositoryHelper,
                serverName, serviceName);

        assetHandler.reclassifyAsset(userId, originalProcess, updatedProcess, updatedProcessBuilder.getZoneMembershipProperties(methodName),
                updatedProcessBuilder.getOwnerProperties(methodName), null, methodName);

        EntityDetail updatedProcessEntity = dataEngineCommonHandler.buildEntityDetail(processGUID,
                updatedProcessBuilder.getInstanceProperties(methodName));
        EntityDetailDifferences entityDetailDifferences = repositoryHelper.getEntityDetailDifferences(originalProcessEntity, updatedProcessEntity,
                true);
        if (!entityDetailDifferences.hasInstancePropertiesDifferences()) {
            return;
        }

        dataEngineCommonHandler.updateEntity(userId, processGUID, updatedProcessBuilder.getInstanceProperties(methodName),
                ProcessPropertiesMapper.PROCESS_TYPE_NAME);
    }

    public  ProcessHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler,
                          RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, AssetHandler assetHandler,
                          DataEngineCommonHandler dataEngineCommonHandler, List<String> defaultZones, List<String> supportedZones);

}