public <AH extends AssignmentHolderType> void computeEnabledActions(@Nullable PolicyRuleEvaluationContext<AH> rctx, PrismObject<AH> object, ExpressionFactory expressionFactory, PrismContext prismContext, Task task, OperationResult result) throws ExpressionEvaluationException, ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException { LOGGER.trace("$$$$COmpute enabled actions"); List<PolicyActionType> allActions = PolicyRuleTypeUtil.getAllActions(policyRuleType.getPolicyActions()); LOGGER.trace("Actions defined for policy rule: {}", allActions); for (PolicyActionType action : allActions) { if (action.getCondition() != null) { ExpressionVariables variables = createExpressionVariables(rctx, object); if (!LensUtil.evaluateBoolean(action.getCondition(), variables, "condition in action " + action.getName() + " (" + action.getClass().getSimpleName() + ")", expressionFactory, prismContext, task, result)) { LOGGER.trace("Skipping action {} ({}) because the condition evaluated to false", action.getName(), action.getClass().getSimpleName()); continue; } else { LOGGER.trace("Accepting action {} ({}) because the condition evaluated to true", action.getName(), action.getClass().getSimpleName()); } } LOGGER.trace("Adding action {} into the enabled action list.", action); enabledActions.add(action); } } }