Search in sources :

Example 1 with DefaultDSLMapping

use of org.drools.drl.parser.lang.dsl.DefaultDSLMapping in project drools by kiegroup.

the class DSLMappingEntryTest method makeExpander.

private DefaultExpander makeExpander(DSLMappingEntry... entries) {
    DefaultExpander expander = new DefaultExpander();
    DefaultDSLMapping mapping = new DefaultDSLMapping();
    for (DSLMappingEntry entry : entries) {
        mapping.addEntry(entry);
    }
    List<String> options = new ArrayList<String>();
    options.add("result");
    options.add("when");
    options.add("steps");
    mapping.setOptions(options);
    expander.addDSLMapping(mapping);
    return expander;
}
Also used : DefaultDSLMapping(org.drools.drl.parser.lang.dsl.DefaultDSLMapping) ArrayList(java.util.ArrayList) DSLMappingEntry(org.drools.drl.parser.lang.dsl.DSLMappingEntry) DefaultExpander(org.drools.drl.parser.lang.dsl.DefaultExpander)

Aggregations

ArrayList (java.util.ArrayList)1 DSLMappingEntry (org.drools.drl.parser.lang.dsl.DSLMappingEntry)1 DefaultDSLMapping (org.drools.drl.parser.lang.dsl.DefaultDSLMapping)1 DefaultExpander (org.drools.drl.parser.lang.dsl.DefaultExpander)1