Package org.drools.workbench.models.guided.template.shared

Examples of org.drools.workbench.models.guided.template.shared.TemplateModel.addAttribute()


    public void testBasics() {
        final RuleTemplateModelPersistence p = RuleTemplateModelXMLPersistenceImpl.getInstance();
        final TemplateModel m = new TemplateModel();
        m.addLhsItem( new FactPattern( "Person" ) );
        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        ActionGlobalCollectionAdd ag = new ActionGlobalCollectionAdd();
        ag.setFactName( "x" );
View Full Code Here


    }

    private TemplateModel getComplexModel() {
        final TemplateModel m = new TemplateModel();

        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        final FactPattern pat = new FactPattern( "Person" );
        pat.setBoundName( "p1" );
        final SingleFieldConstraint con = new SingleFieldConstraint();
View Full Code Here

        final TemplateModel model = new TemplateModel();
        model.getImports().getImports().addAll( imports );
        model.setPackageName( packageName );
        model.name = name;

        model.addAttribute( new RuleAttribute( "ruleflow-group",
                                               "myRuleFlowGroup" ) );
        return model;
    }

    public static TemplateModel makeModelWithConditions( final String packageName,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.