use of org.drools.impact.analysis.model.right.ConsequenceAction in project drools by kiegroup.
the class ModelToGraphConverter method parseGraphAnalysis.
private void parseGraphAnalysis(AnalysisModel model, GraphAnalysis graphAnalysis) {
for (Package pkg : model.getPackages()) {
String pkgName = pkg.getName();
List<Rule> rules = pkg.getRules();
for (Rule rule : rules) {
String ruleName = rule.getName();
RightHandSide rhs = rule.getRhs();
List<ConsequenceAction> actions = rhs.getActions();
for (ConsequenceAction action : actions) {
switch(action.getType()) {
case INSERT:
processInsert(graphAnalysis, pkgName, ruleName, (InsertAction) action);
break;
case DELETE:
processDelete(graphAnalysis, pkgName, ruleName, action);
break;
case MODIFY:
processModify(graphAnalysis, pkgName, ruleName, (ModifyAction) action);
break;
}
}
}
}
}
Aggregations