Package org.drools.repository

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


                      "billasurf.jar" );

        PackageItem pkg = repo.loadPackage( "com.billasurf.manufacturing.plant" );
        DroolsHeader.updateDroolsHeader( "import com.billasurf.Board\nimport com.billasurf.Person" + "\n\nglobal com.billasurf.Person prs",
                                                  pkg );
        pkg.checkin( "added imports" );

        SuggestionCompletionEngine eng = serv.loadSuggestionCompletionEngine( "com.billasurf.manufacturing.plant" );
        assertNotNull( eng );

        //The loader could define extra imports
View Full Code Here


        repo.save();
        assertFalse( pkg.isBinaryUpToDate() );

        //Create a history package with no compiled binary stored.
        pkg.checkout();
        pkg.checkin( "version1" );
        //Verify history package binary.
        PackageItem p = repo.loadPackage( "testGetHistoryPackageBinary",
                                          2 );
        assertEquals( "version1",
                      p.getCheckinComment() );
View Full Code Here

        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
        PackageItem item = impl.getRulesRepository().loadPackage( "testDependencyHistoryPackage" );
        assertEquals( "package version 4",
                      item.getCheckinComment() );
View Full Code Here

        rule3.updateFormat( AssetFormats.DRL_MODEL );
        rule3.updateContent( "declare Album1\n genre1: String \n end" );
        rule3.addCategory("testRESTCat");
        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" );           
    }
   
    @AfterClass
    public static void tearDown() {
      restTestingBase.tearDownGuvnorTestBase();
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" );              
    }
   
    @AfterClass
    public static void tearDown() {
      restTestingBase.tearDownGuvnorTestBase();
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(pkg);
        asm2.compile();
        assertFalse(asm2.getErrors().toString(),
                asm2.hasErrors());
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.