Search in sources :

Example 1 with ActionSetFieldsDefinedEvent

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

the class ActionSetFieldsPage method isComplete.

@Override
public void isComplete(final Callback<Boolean> callback) {
    // Have all Actions been defined?
    boolean areActionSetFieldsDefined = true;
    for (List<ActionSetFieldCol52> actions : patternToActionsMap.values()) {
        for (ActionSetFieldCol52 a : actions) {
            if (!getValidator().isActionValid(a)) {
                areActionSetFieldsDefined = false;
                break;
            }
        }
    }
    // Signal Action Set Fields definitions to other pages
    final ActionSetFieldsDefinedEvent event = new ActionSetFieldsDefinedEvent(areActionSetFieldsDefined);
    actionSetFieldsDefinedEvent.fire(event);
    callback.callback(areActionSetFieldsDefined);
}
Also used : ActionSetFieldsDefinedEvent(org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.events.ActionSetFieldsDefinedEvent) ActionSetFieldCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)

Aggregations

ActionSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)1 ActionSetFieldsDefinedEvent (org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.events.ActionSetFieldsDefinedEvent)1