Package org.drools.repository

Examples of org.drools.repository.ModuleItem.checkin()


        rule2.updateContent("when \n foo \n then \n call a func");
        rule2.checkin("version 2");
        rule3.updateContent("declare Album2\n genre2: String \n end");
        rule3.checkin("version 2");
        //impl.buildPackage(pkg.getUUID(), true);
        pkg.checkin("version3");

        //Verify the latest version
        ModuleItem item = rulesRepository.loadModule("testGetHistoryPackageSource");
        PackageAssembler asm = new PackageAssembler();
        asm.init(item, null);
View Full Code Here


        pkg.updateDependency("func?version=1");
        pkg.updateDependency("myDSL?version=1");
        pkg.updateDependency("rule1?version=1");
        pkg.updateDependency("rule2?version=1");
        pkg.updateDependency("model1?version=1");
        pkg.checkin("Update dependency");

        PackageAssembler asm = new PackageAssembler();
        asm.init(pkg, null);
        String drl = asm.getCompiledSource();
View Full Code Here

        rule3.checkin("version 1");
        rule3.updateContent("declare Album\n genre1: String \n end");
        rule3.checkin("version 2");

        rulesRepository.save();
        pkg.checkin("Version 2");
        pkg.checkout();
        pkg.checkin("Version 3");

        ModuleItem historicalPackage = rulesRepository.loadModule("testShowSourceForHistoricalPackage",
                2);
View Full Code Here

        rule3.checkin("version 2");

        rulesRepository.save();
        pkg.checkin("Version 2");
        pkg.checkout();
        pkg.checkin("Version 3");

        ModuleItem historicalPackage = rulesRepository.loadModule("testShowSourceForHistoricalPackage",
                2);

        PackageAssembler asm = new PackageAssembler();
View Full Code Here

        AssetItem rule4 = pkg.addAsset( "rule4",
                                        "" );
        rule4.updateFormat( AssetFormats.DRL );
        rule4.updateContent( "rule 'nheron' when Cheese() then end" );
        rule4.checkin( "version 1" );
        pkg.checkin( "version2" );

        //Package version 3
        DroolsHeader.updateDroolsHeader( "import org.drools.Cheese\n global org.drools.Person customer2",
                                         pkg );
        func.updateContent( "function void foo() { System.out.println(\"version 2\"); }" );
View Full Code Here

        rule2.updateContent( "when \n foo \n then \n call a func" );
        rule2.checkin( "version 2" );
        rule3.updateContent( "declare Album2\n genre2: String \n end" );
        rule3.checkin( "version 2" );
        //impl.buildPackage(pkg.getUUID(), true);
        pkg.checkin( "version3" );
       
        ModuleItem pkg2 = rulesRepository.createModule( "restPackage2",
                "this is package restPackage2" );  
        pkg2.checkout();
        repositoryPackageService.buildPackage(pkg2.getUUID(), true);       
View Full Code Here

       
        ModuleItem pkg2 = rulesRepository.createModule( "restPackage2",
                "this is package restPackage2" );  
        pkg2.checkout();
        repositoryPackageService.buildPackage(pkg2.getUUID(), true);       
        pkg2.checkin("version2");
        pkg2.checkout();
        repositoryPackageService.buildPackage(pkg2.getUUID(), true);      
        pkg2.checkin("version3");

        ModuleItem pkg3 = rulesRepository.createModule( "restPackageCompilationFailure",
View Full Code Here

        assertTrue(DroolsHeader.getDroolsHeader(pkg).indexOf("import com.billasurf.Board") > -1);
        assertTrue(DroolsHeader.getDroolsHeader(pkg).indexOf("import com.billasurf.Person") > -1);

        DroolsHeader.updateDroolsHeader("goo wee",
                pkg);
        pkg.checkin("");

        fileManagerService.attachFileToAsset(asset.getUUID(),
                this.getClass().getResourceAsStream("/billasurf.jar"),
                "billasurf.jar");
        pkg = rulesRepository.loadModule( "testAttachModelImports" );
View Full Code Here

        ModuleItem pkg = rulesRepository.createModule( "testGetBinaryPackageServlet",
                                              "" );
        DroolsHeader.updateDroolsHeader( "import java.util.List",
                                                  pkg );
        pkg.updateCompiledBinary( new ByteArrayInputStream( "foo".getBytes() ) );
        pkg.checkin( "" );

        assertTrue( before < fileManagerService.getLastModified( pkg.getName(),
                                                           "LATEST" ) );

        repositoryPackageService.createModuleSnapshot(pkg.getName(),
View Full Code Here

        ModuleItem pkg = rulesRepository.createModule( "testHeadOOME",
                                              "" );
        DroolsHeader.updateDroolsHeader( "import java.util.List",
                                                  pkg );
        pkg.updateCompiledBinary( new ByteArrayInputStream( "foo".getBytes() ) );
        pkg.checkin( "" );
        //rulesRepository.logout(); // Breaks lifecycle of test

        int iterations = 0;

        int maxIteration = 1; //pick a large number to do a stress test
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.