Package javax.rules.admin

Examples of javax.rules.admin.RuleExecutionSet


                                                                    RuleServiceProviderImpl.class );

            ruleServiceProvider = RuleServiceProviderManager.getRuleServiceProvider( "http://drools.org/" );

            LocalRuleExecutionSetProvider ruleSetProvider = ruleServiceProvider.getRuleAdministrator().getLocalRuleExecutionSetProvider( null );
            final RuleExecutionSet ruleExecutionSet = ruleSetProvider.createRuleExecutionSet( StatelessRuleSessionTest.class.getResourceAsStream( this.bindUri_xml ),
                                                                                              map );
            assertNotNull( ruleExecutionSet );
        } catch ( RemoteException e ) {
            fail();
        } catch ( ConfigurationException e ) {
View Full Code Here


            ruleServiceProvider = RuleServiceProviderManager.getRuleServiceProvider( "http://drools.org/" );

            LocalRuleExecutionSetProvider ruleSetProvider = ruleServiceProvider.getRuleAdministrator().getLocalRuleExecutionSetProvider( null );
            final Reader ruleReader = new InputStreamReader( StatelessRuleSessionTest.class.getResourceAsStream( this.bindUri_xml ) );
            final RuleExecutionSet ruleExecutionSet = ruleSetProvider.createRuleExecutionSet( ruleReader,
                                                                                              map );
            assertNotNull( ruleExecutionSet );

        } catch ( RemoteException e ) {
            fail();
View Full Code Here

            // ignore exception
        }

        // read rules and register with administrator
        final Reader ruleReader = new InputStreamReader( RuleRuntimeTest.class.getResourceAsStream( this.RULES_RESOURCE ) );
        final RuleExecutionSet ruleSet = this.ruleSetProvider.createRuleExecutionSet( ruleReader,
                                                                                      null );
        this.ruleAdministrator.registerRuleExecutionSet( this.RULES_RESOURCE,
                                                         ruleSet,
                                                         null );
View Full Code Here

            // ignore exception
        }

        // read rules and register with administrator
        final Reader ruleReader = new InputStreamReader( RuleRuntimeTest.class.getResourceAsStream( this.RULES_RESOURCE ) );
        final RuleExecutionSet ruleSet = this.ruleSetProvider.createRuleExecutionSet( ruleReader,
                                                                                      null );
        this.ruleAdministrator.registerRuleExecutionSet( this.RULES_RESOURCE,
                                                         ruleSet,
                                                         null );
View Full Code Here

        assertNotNull( "cannot obtain RuleRuntime",
                       ruleRuntime );

        // read rules and register with administrator
        final Reader ruleReader = new InputStreamReader( RuleRuntimeTest.class.getResourceAsStream( this.RULES_RESOURCE ) );
        final RuleExecutionSet ruleSet = this.ruleSetProvider.createRuleExecutionSet( ruleReader,
                                                                                      null );
        this.ruleAdministrator.registerRuleExecutionSet( this.RULES_RESOURCE,
                                                         ruleSet,
                                                         null );
View Full Code Here

        RuleServiceProvider ruleServiceProvider = RuleServiceProviderManager.getRuleServiceProvider( ExampleRuleEngineFacade.RULE_SERVICE_PROVIDER );
        RuleAdministrator ruleAdministrator = ruleServiceProvider.getRuleAdministrator();
        LocalRuleExecutionSetProvider ruleSetProvider = ruleAdministrator.getLocalRuleExecutionSetProvider( null );

        try {
            RuleExecutionSet ruleExecutionSet = ruleSetProvider.createRuleExecutionSet( SpreadsheetIntegrationExampleTest.class.getResourceAsStream( "IntegrationExampleTest.xls" ),
                                                                                        properties );
        } catch (Exception e) {
            // fail should not throw an Excetpion
        }
    }
View Full Code Here

        RuleServiceProvider ruleServiceProvider = RuleServiceProviderManager.getRuleServiceProvider( ExampleRuleEngineFacade.RULE_SERVICE_PROVIDER );
        RuleAdministrator ruleAdministrator = ruleServiceProvider.getRuleAdministrator();
        LocalRuleExecutionSetProvider ruleSetProvider = ruleAdministrator.getLocalRuleExecutionSetProvider( null );

        RuleExecutionSet ruleExecutionSet = ruleSetProvider.createRuleExecutionSet( SpreadsheetIntegrationExampleTest.class.getResourceAsStream( "IntegrationExampleTest.xls" ),
                                                                                    properties );

        ruleAdministrator.registerRuleExecutionSet( "IntegrationExampleTest.xls",
                                                    ruleExecutionSet,
                                                    properties );
View Full Code Here

    /**
     * Test createRuleExecutionSet from Serializable.
     */
    @Test
    public void testCreateFromSerializable() throws Exception {
        final RuleExecutionSet ruleExecutionSet = this.ruleSetProvider.createRuleExecutionSet( this.pkg,
                                                                                               null );
        assertEquals( "rule set name",
                      "SistersRules",
                      ruleExecutionSet.getName() );
        assertEquals( "number of rules",
                      1,
                      ruleExecutionSet.getRules().size() );
    }
View Full Code Here

     * Test createRuleExecutionSet from URI.
     */
    @Test
    public void testCreateFromURI() throws Exception {
        final String rulesUri = RuleEngineTestBase.class.getResource( this.bindUri ).toExternalForm();
        final RuleExecutionSet testRuleSet = this.ruleSetProvider.createRuleExecutionSet( rulesUri,
                                                                                          null );
        assertEquals( "rule set name",
                      "SistersRules",
                      testRuleSet.getName() );
        assertEquals( "number of rules",
                      1,
                      testRuleSet.getRules().size() );
    }
View Full Code Here

    }

    @Test
    public void testIncompatibleSerializableCreation() throws Exception {
        try {
            final RuleExecutionSet testRuleSet = this.ruleSetProvider.createRuleExecutionSet( new ArrayList(),
                                                                                              null );
            fail( "Should have thrown an IllegalArgumentException. ArrayList " + "objects are not valid AST representations. " + testRuleSet );
        } catch ( final IllegalArgumentException e ) {
            /*
             * this is supposed to happen if you pass in a serializable object
View Full Code Here

TOP

Related Classes of javax.rules.admin.RuleExecutionSet

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.