class UnassignNetworkBB {

    public void errorEncountered(BuildingBlockExecution execution) {
        String msg;
        boolean isRollbackNeeded =
                execution.getVariable("isRollbackNeeded") != null ? execution.getVariable("isRollbackNeeded") : false;
        if (isRollbackNeeded) {
            msg = execution.getVariable("ErrorUnassignNetworkBB") + messageErrorRollback;
        } else {
            msg = execution.getVariable("ErrorUnassignNetworkBB");
        }
        exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
    }

}