Search in sources :

Example 1 with ConditionsDefinedEvent

use of org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.events.ConditionsDefinedEvent in project drools-wb by kiegroup.

the class FactPatternConstraintsPage method isComplete.

@Override
public void isComplete(final Callback<Boolean> callback) {
    // Have all patterns conditions been defined?
    boolean areConditionsDefined = true;
    for (Pattern52 p : model.getPatterns()) {
        for (ConditionCol52 c : p.getChildColumns()) {
            if (!getValidator().isConditionValid(c)) {
                areConditionsDefined = false;
                break;
            }
        }
    }
    // Signal Condition definitions to other pages
    final ConditionsDefinedEvent event = new ConditionsDefinedEvent(areConditionsDefined);
    conditionsDefinedEvent.fire(event);
    callback.callback(areConditionsDefined);
}
Also used : ConditionCol52(org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52) Pattern52(org.drools.workbench.models.guided.dtable.shared.model.Pattern52) ConditionsDefinedEvent(org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.events.ConditionsDefinedEvent)

Aggregations

ConditionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52)1 Pattern52 (org.drools.workbench.models.guided.dtable.shared.model.Pattern52)1 ConditionsDefinedEvent (org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.events.ConditionsDefinedEvent)1