Package org.drools.repository

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


        assertEquals( pkgs.length,
                      repositoryPackageService.listModules().length );

        item.archiveItem( false );
        item.checkin( "" );

        arch2 = repositoryPackageService.listArchivedModules();
        assertEquals( arch2.length,
                      arch.length );
    }
View Full Code Here


                                        );
        rule3.updateFormat( AssetFormats.DRL_MODEL );
        rule3.updateContent( "declare Album1\n genre1: String \n end" );
        rule3.checkin( "version 1" );

        pkg.checkin( "version2" );

        //Package version 3
        DroolsHeader.updateDroolsHeader( "import com.billasurf.Board\n global com.billasurf.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" );   
       
        //Count all the assets
        Iterator<AssetItem> assets = pkg.getAssets();
        int assetsCount = 0;
        while (assets.hasNext()) {
View Full Code Here

        assertEquals( pkg.getName(),
                      bin.getName() );
        assertTrue( bin.isValid() );

        pkg.updateDependency( "model?version=2" );
        pkg.checkin( "Update dependency" );

        PackageAssembler asm2 = new PackageAssembler();
        asm2.init(pkg, null);
        asm2.compile();
        assertFalse( asm2.getErrors().toString(),
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

        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",
                "this is package restPackageCompilationFailure" );

        DroolsHeader.updateDroolsHeader( "import org.drools.NonExistingClass",
View Full Code Here

        AssetItem brokenRule = pkg3.addAsset( "ruleCompilationFailure",
                "" );
        brokenRule.updateFormat(AssetFormats.DRL);
        brokenRule.updateContent("rule 'compilationFailure' when NonExistingClass() then end");
        brokenRule.checkin("version 1");
        pkg3.checkin("version2");
       
        logoutAs("admin");
    }
   
    @Test @RunAsClient
View Full Code Here

        assertNotNull( packageItem.getName() );
        packageItem.updateBinaryUpToDate( true );
        assertTrue( packageItem.isBinaryUpToDate() );

        //Need to commit change to Module for it to be visible to subsequent retrieval
        packageItem.checkin( "" );

        serviceImplementation.deleteUncheckedRule( assetItem.getUUID() );

        //Subsequent retrieval
        ModuleItem reloadedPackage = rulesRepository.loadModule( packageItem.getName() );
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.