Package org.drools.workbench.models.datamodel.imports

Examples of org.drools.workbench.models.datamodel.imports.Import


        KieSession ksession = getKieSession("test_rules2.drl");

        ScenarioRunner run = new ScenarioRunner(ksession);

        Scenario scenario = new Scenario();
        scenario.getImports().addImport(new Import("org.drools.workbench.models.testscenarios.backend.Cheese"));
        scenario.getImports().addImport(new Import("org.drools.workbench.models.testscenarios.backend.Cheesery"));

        run.run(scenario);

    }
View Full Code Here


                "    keke.clear(  );\n" +
                "end\n";

        final RuleModel m = new RuleModel();
        m.setPackageName( "org.mortgages" );
        m.getImports().addImport( new Import( "org.mortgages.LoanApplication" ) );
        m.name = "my rule";

        FactPattern factPattern = new FactPattern();
        factPattern.setFactType( "LoanApplication" );
        factPattern.setBoundName( "a" );
View Full Code Here

        }
    }

    private ProjectImports createProjectImports() {
        ProjectImports imports = new ProjectImports();
        imports.getImports().addImport( new Import( "java.lang.Number" ) );
        return imports;
    }
View Full Code Here

    @Test
    public void testPackageNameAndImports() throws Exception {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setPackageName( "org.drools.guvnor.models.guided.dtable.backend" );
        dt.getImports().addImport( new Import( "java.lang.String" ) );

        dt.setTableName( "michael" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "f1" );
View Full Code Here

    public void testIndexGuidedRuleTemplateAttributes() throws IOException, InterruptedException {
        //Add test files
        final Path path = basePath.resolve( "template1.template" );
        final TemplateModel model = GuidedRuleTemplateFactory.makeModelWithAttributes( "org.drools.workbench.screens.guided.template.server.indexing",
                                                                                       new ArrayList<Import>() {{
                                                                                           add( new Import( "org.drools.workbench.screens.guided.template.server.indexing.classes.Applicant" ) );
                                                                                           add( new Import( "org.drools.workbench.screens.guided.template.server.indexing.classes.Mortgage" ) );
                                                                                       }},
                                                                                       "template1" );
        final String xml = RuleTemplateModelXMLPersistenceImpl.getInstance().marshal( model );
        ioService().write( path,
                           xml );
View Full Code Here

    public void testIndexGuidedRuleTemplateConditions() throws IOException, InterruptedException {
        //Add test files
        final Path path = basePath.resolve( "template1.template" );
        final TemplateModel model = GuidedRuleTemplateFactory.makeModelWithConditions( "org.drools.workbench.screens.guided.template.server.indexing",
                                                                                       new ArrayList<Import>() {{
                                                                                           add( new Import( "org.drools.workbench.screens.guided.template.server.indexing.classes.Applicant" ) );
                                                                                           add( new Import( "org.drools.workbench.screens.guided.template.server.indexing.classes.Mortgage" ) );
                                                                                       }},
                                                                                       "template1" );
        final String xml = RuleTemplateModelXMLPersistenceImpl.getInstance().marshal( model );
        ioService().write( path,
                           xml );
View Full Code Here

    public void testIndexGuidedRuleTemplateActions() throws IOException, InterruptedException {
        //Add test files
        final Path path = basePath.resolve( "template1.template" );
        final TemplateModel model = GuidedRuleTemplateFactory.makeModelWithActions( "org.drools.workbench.screens.guided.template.server.indexing",
                                                                                    new ArrayList<Import>() {{
                                                                                        add( new Import( "org.drools.workbench.screens.guided.template.server.indexing.classes.Applicant" ) );
                                                                                        add( new Import( "org.drools.workbench.screens.guided.template.server.indexing.classes.Mortgage" ) );
                                                                                    }},
                                                                                    "template1" );
        final String xml = RuleTemplateModelXMLPersistenceImpl.getInstance().marshal( model );
        ioService().write( path,
                           xml );
View Full Code Here

        //Add test files
        final Path path1 = basePath.resolve( "scorecard1.scgd" );
        final ScoreCardModel model1 = GuidedScoreCardFactory.makeScoreCardWithCharacteristics( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing",
                                                                                               new ArrayList<Import>() {{
                                                                                                   add( new Import( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing.classes.Applicant" ) );
                                                                                                   add( new Import( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing.classes.Mortgage" ) );
                                                                                               }},
                                                                                               "scorecard1" );
        final String xml1 = GuidedScoreCardXMLPersistence.getInstance().marshal( model1 );
        ioService().write( path1,
                           xml1 );
        final Path path2 = basePath.resolve( "scorecard2.scgd" );
        final ScoreCardModel model2 = GuidedScoreCardFactory.makeScoreCardWithoutCharacteristics( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing",
                                                                                                  new ArrayList<Import>() {{
                                                                                                      add( new Import( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing.classes.Applicant" ) );
                                                                                                      add( new Import( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing.classes.Mortgage" ) );
                                                                                                  }},
                                                                                                  "scorecard2" );
        final String xml2 = GuidedScoreCardXMLPersistence.getInstance().marshal( model2 );
        ioService().write( path2,
                           xml2 );
View Full Code Here

    public void testIndexGuidedScoreCard() throws IOException, InterruptedException {
        //Add test files
        final Path path1 = basePath.resolve( "scorecard1.scgd" );
        final ScoreCardModel model1 = GuidedScoreCardFactory.makeScoreCardWithCharacteristics( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing",
                                                                                               new ArrayList<Import>() {{
                                                                                                   add( new Import( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing.classes.Applicant" ) );
                                                                                                   add( new Import( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing.classes.Mortgage" ) );
                                                                                               }},
                                                                                               "scorecard1" );
        final String xml1 = GuidedScoreCardXMLPersistence.getInstance().marshal( model1 );
        ioService().write( path1,
                           xml1 );
        final Path path2 = basePath.resolve( "scorecard2.scgd" );
        final ScoreCardModel model2 = GuidedScoreCardFactory.makeScoreCardWithoutCharacteristics( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing",
                                                                                                  new ArrayList<Import>() {{
                                                                                                      add( new Import( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing.classes.Applicant" ) );
                                                                                                      add( new Import( "org.drools.workbench.screens.guided.scorecard.backend.server.indexing.classes.Mortgage" ) );
                                                                                                  }},
                                                                                                  "scorecard2" );
        final String xml2 = GuidedScoreCardXMLPersistence.getInstance().marshal( model2 );
        ioService().write( path2,
                           xml2 );
View Full Code Here

        //Add test files
        final Path path = basePath.resolve( "template1.template" );
        final TemplateModel model = GuidedRuleTemplateFactory.makeModelWithActions( "org.drools.workbench.screens.guided.template.server.indexing",
                                                                                    new ArrayList<Import>() {{
                                                                                        add( new Import( "org.drools.workbench.screens.guided.template.server.indexing.classes.Applicant" ) );
                                                                                        add( new Import( "org.drools.workbench.screens.guided.template.server.indexing.classes.Mortgage" ) );
                                                                                    }},
                                                                                    "template1" );
        final String xml = RuleTemplateModelXMLPersistenceImpl.getInstance().marshal( model );
        ioService().write( path,
                           xml );
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.imports.Import

Copyright © 2018 www.massapicom. 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.