Package org.drools.repository

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


        func.updateContent( "function void foo() { System.out.println(version 2); }" );
        func.checkin( "func version 2" );

        //Package version 2    
        pkg.checkout();
        pkg.checkin( "package version 2" );

        //calling updateDependency creates package version 3
        pkg.updateDependency( "func?version=1" );
        pkg.checkin( "package version 3" );
View Full Code Here


        pkg.checkout();
        pkg.checkin( "package version 2" );

        //calling updateDependency creates package version 3
        pkg.updateDependency( "func?version=1" );
        pkg.checkin( "package version 3" );

        func.updateContent( "function void foo() { System.out.println(version 2); }" );
        func.checkin( "func version 3" );

        //Package version 4    
View Full Code Here

        func.updateContent( "function void foo() { System.out.println(version 2); }" );
        func.checkin( "func version 3" );

        //Package version 4    
        pkg.checkout();
        pkg.checkin( "package version 4" );

        //Verify the latest version
        ModuleItem item = rulesRepository.loadModule( "testDependencyHistoryPackage" );
        assertEquals( "package version 4",
                      item.getCheckinComment() );
View Full Code Here

        ModuleItem item = rulesRepository.loadModule( "testCreateArchivedPackage" );
        TableDataResult td = repositoryAssetService.loadArchivedAssets( 0,
                                                                        1000 );

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

        TableDataResult td2 = repositoryAssetService.loadArchivedAssets( 0,
                                                                         1000 );
        assertEquals( td2.data.length,
                      td.data.length );
View Full Code Here

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

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

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

        assertEquals( originalAchivedAssetsTotal,
                      td.total );
        repositoryAssetService.archiveAsset( uuid4 );
        ModuleItem packageItem = rulesRepository.loadModule( packageName );
        packageItem.archiveItem( true );
        packageItem.checkin( "" );

        TableDataResult td2 = repositoryAssetService.loadArchivedAssets( 0,
                                                                         1000 );
        assertTrue( td2.data.length == td.data.length + 1 );
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

        assertTrue(drl.indexOf("genre2") == -1);
        assertTrue(drl.indexOf("genre3") > -1);

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

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

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.