public ProgressCheckRejectionPolicy(String rejection_policy) {
        String policy = rejection_policy.toLowerCase();
        if (!policy.startsWith(NAME)) {
            throw new IllegalStateException(rejection_policy);
        }
        policy = policy.substring(NAME.length());
        if (policy.startsWith("=")) {
            String[] attributes = policy.substring(1).split(",", 0);
            for (String attribute : attributes) {
                String[] parts = attribute.split(":");
                if (parts.length != 2) {
                    throw new IllegalArgumentException("Attribute '" + attribute + "' in " + rejection_policy);
                }
                String key = parts[0].trim();
                String value = parts[1].trim();
                if (key.equals("period")) {
                    try {
                        period = Long.parseLong(value);
                    } catch (NumberFormatException e) {
                        throw new IllegalArgumentException("Cannot parse period value in " + rejection_policy, e);
                    }
                } else if (key.equals("fallback")) {
                    // in order to be able to define also different policy with attributes (use as the last attribute)
                    fallback = Util.parseRejectionPolicy(rejection_policy.substring(rejection_policy.indexOf("fallback:") + 9));
                }
            }
        }
    }