int metricDefinitionId = findAMetricDefinitionForResourceId(_platformId, "metric");
// Now add a condition
try {
AlertCondition alertCondition = new AlertCondition("BASELINE");
alertCondition.setOption("mean");
alertCondition.setComparator("<");
alertCondition.setThreshold(0.10); // %
alertCondition.setMeasurementDefinition(metricDefinitionId);
addConditionToDefinition(definitionId, alertCondition);
// Retrieve the definition with the added condition
AlertDefinition updatedDefinition =