Package org.drools.guvnor.client.rpc

Examples of org.drools.guvnor.client.rpc.ScenarioRunResult


                    classLoader,
                    workingMemory
            ).run(scenario);

            return new SingleScenarioResult(
                    new ScenarioRunResult(scenario),
                    logger.buildReport());
        } catch (ClassNotFoundException e) {
            log.error("Unable to load a required class.",
                    e);
            throw new DetailedSerializationException("Unable to load a required class.",
View Full Code Here


                    //by GWT. Hence we need to convert the errors into a List that can be serialised by GWT
                    List<BuilderResultLine> errors = new ArrayList<BuilderResultLine>();
                    for(BuilderResultLine line : err.getErrs()) {
                        errors.add( line );
                    }
                    result.result = new ScenarioRunResult( errors,
                                                           null );
                } else {
                    throw err;
                }
            } else {
View Full Code Here

            new ScenarioRunner( scenario,
                    classTypeResolver,
                    workingMemory );
            SingleScenarioResult singleScenarioresult = new SingleScenarioResult();
            singleScenarioresult.auditLog = logger.buildReport();
            singleScenarioresult.result = new ScenarioRunResult( null,
                    scenario );
            return singleScenarioresult;
        } catch (ClassNotFoundException e) {
            log.error( "Unable to load a required class.",
                    e );
View Full Code Here

                                                                           LoadingPopup.close();
                                                                           layout.clear();
                                                                           layout.add( actions );
                                                                           layout.add( results );
                                                                           actions.setVisible( true );
                                                                           ScenarioRunResult result = data.result;
                                                                           if ( result.getErrors() != null ) {
                                                                               showErrors( result.getErrors() );
                                                                           } else {
                                                                               showResults( parent,
                                                                                            data );
                                                                           }
                                                                       }
View Full Code Here

        cheese.type = "Cheese";
        cheese.fieldData.add( new FieldData( "price",
                                             "42" ) );
        sc.globals.add( cheese );

        ScenarioRunResult res = impl.runScenario( pkg.getName(),
                                                  sc ).result;
        assertEquals( null,
                      res.errors );
        assertNotNull( res.scenario );
        assertTrue( vf.wasSuccessful() );
View Full Code Here

        String[] logEntry = res_.auditLog.get( 0 );
        assertNotNull( logEntry[0],
                       logEntry[1] );

        ScenarioRunResult res = res_.result;
        assertEquals( null,
                      res.errors );
        assertNotNull( res.scenario );
        assertTrue( vf.wasSuccessful() );
        assertTrue( vr.wasSuccessful() );
View Full Code Here

        vf.fieldValues.add( new VerifyField( "cost",
                                             "42",
                                             "==" ) );
        sc.fixtures.add( vf );

        ScenarioRunResult res = impl.runScenario( pkg.getName(),
                                                  sc ).result;
        assertEquals( null,
                      res.errors );
        assertNotNull( res.scenario );
        assertTrue( vf.wasSuccessful() );
View Full Code Here

        VerifyRuleFired vr = new VerifyRuleFired( "MyGoodRule",
                                                  1,
                                                  null );
        sc.fixtures.add( vr );

        ScenarioRunResult res = null;
        try {
            res = impl.runScenario( pkg.getName(),
                                    sc ).result;
        } catch ( ClassFormatError e ) {
            fail( "Probably failed when loading a source file instead of class file. " + e );
View Full Code Here

        String[] logEntry = res_.auditLog.get( 0 );
        assertNotNull( logEntry[0],
                       logEntry[1] );

        ScenarioRunResult res = res_.result;

        assertNull( res.getErrors() );
        assertNotNull( res.getScenario() );
        assertTrue( vf.wasSuccessful() );
        assertTrue( vr.wasSuccessful() );

    }
View Full Code Here

        vf.getFieldValues().add( new VerifyField( "cost",
                                                  "42",
                                                  "==" ) );
        sc.getFixtures().add( vf );

        ScenarioRunResult res = repositoryPackageService.runScenario( pkg.getName(),
                                                                      sc ).result;
        assertNull( res.getErrors() );
        assertNotNull( res.getScenario() );

        assertTrue( vf.wasSuccessful() );
        assertTrue( vr.wasSuccessful() );

        res = repositoryPackageService.runScenario( pkg.getName(),
                                                    sc ).result;

        assertNull( res.getErrors() );
        assertNotNull( res.getScenario() );

        assertTrue( vf.wasSuccessful() );
        assertTrue( vr.wasSuccessful() );

        RuleBaseCache.getInstance().clearCache();

        res = repositoryPackageService.runScenario( pkg.getName(),
                                                    sc ).result;
        assertNull( res.getErrors() );
        assertNotNull( res.getScenario() );
        assertTrue( vf.wasSuccessful() );
        assertTrue( vr.wasSuccessful() );

    }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.rpc.ScenarioRunResult

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.