use of com.evolveum.midpoint.xml.ns._public.common.common_3.ExpressionType in project midpoint by Evolveum.
the class GcpExpressionHelper method evaluateActivationCondition.
boolean evaluateActivationCondition(GeneralChangeProcessorScenarioType scenarioType, ModelContext context, Task taskFromModel, OperationResult result) throws SchemaException {
ExpressionType conditionExpression = scenarioType.getActivationCondition();
if (conditionExpression == null) {
return true;
}
ExpressionVariables variables = new ExpressionVariables();
variables.addVariableDefinition(new QName(SchemaConstants.NS_C, "context"), context);
boolean start;
try {
start = evaluateBooleanExpression(conditionExpression, variables, "workflow activation condition", taskFromModel, result);
} catch (ObjectNotFoundException | ExpressionEvaluationException e) {
throw new SystemException("Couldn't evaluate generalChangeProcessor activation condition", e);
}
return start;
}
Aggregations