use of org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.events.ActionInsertFactFieldsDefinedEvent in project drools-wb by kiegroup.
the class ActionInsertFactFieldsPage method isComplete.
@Override
public void isComplete(final Callback<Boolean> callback) {
// Do all Patterns have unique bindings?
final boolean arePatternBindingsUnique = getValidator().arePatternBindingsUnique();
// Signal duplicates to other pages
final DuplicatePatternsEvent event = new DuplicatePatternsEvent(arePatternBindingsUnique);
duplicatePatternsEvent.fire(event);
// Are all Actions defined?
boolean areActionInsertFieldsDefined = true;
for (List<ActionInsertFactCol52> actions : patternToActionsMap.values()) {
for (ActionInsertFactCol52 a : actions) {
if (!getValidator().isActionValid(a)) {
areActionInsertFieldsDefined = false;
break;
}
}
}
// Signal Action Insert Fact Fields to other pages
final ActionInsertFactFieldsDefinedEvent eventFactFields = new ActionInsertFactFieldsDefinedEvent(areActionInsertFieldsDefined);
actionInsertFactFieldsDefinedEvent.fire(eventFactFields);
callback.callback(arePatternBindingsUnique && areActionInsertFieldsDefined);
}
Aggregations