Search in sources :

Example 1 with DefaultDSLMapping

use of org.drools.compiler.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.compiler.lang.dsl.DefaultDSLMapping) ArrayList(java.util.ArrayList) DSLMappingEntry(org.drools.compiler.lang.dsl.DSLMappingEntry) DefaultExpander(org.drools.compiler.lang.dsl.DefaultExpander)

Aggregations

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