Examples of Activation


Examples of org.drools.spi.Activation

        /* Test single activation for a single logical assertions */
        agenda.addToAgenda( tuple1,
                            context1,
                            rule1 );
        ModuleImpl main = (ModuleImpl) agenda.getFocus();
        Activation activation1 = (Activation) main.getActivationQueue().get();

        String logicalString = new String ( "logical" );
        FactHandle logicalHandle = workingMemory.assertObject( logicalString,
                                                               false,
                                                               true,
View Full Code Here

Examples of org.drools.spi.Activation

        /* Test single activation for a single logical assertions */
        agenda.addToAgenda( tuple1,
                            context1,
                            rule1 );
        ModuleImpl main = (ModuleImpl) agenda.getFocus();
        Activation activation1 = (Activation) main.getActivationQueue().get();

        String logicalString1 = new String( "logical" );
        FactHandle logicalHandle1 = workingMemory.assertObject( logicalString1,
                                                                false,
                                                                true,
View Full Code Here

Examples of org.drools.spi.Activation

        /* Test that a STATED assertion overrides a logical assertion */
        agenda.addToAgenda( tuple1,
                            context1,
                            rule1 );
        ModuleImpl main = (ModuleImpl) agenda.getFocus();
        Activation activation1 = (Activation) main.getActivationQueue().get();

        String logicalString1 = new String( "logical" );
        FactHandle logicalHandle1 = workingMemory.assertObject( logicalString1,
                                                               false,
                                                               true,
View Full Code Here

Examples of org.drools.spi.Activation

        PropagationContext context =  new PropagationContextImpl( PropagationContext.ASSERTION,
                                                              null,
                                                              null );
       
        Activation activation1 = new AgendaItem( tuple1,
                                                 context,
                                                 rule1 );
           
        /* Assert the logical "logical" fact */
        String logicalString1 = new String ( "logical" );
        FactHandle logicalHandle1 = workingMemory.assertObject( logicalString1,
                                                                false,
                                                                true,
                                                                rule1,
                                                                activation1 );
       
        /* create the second activation to justify the "logical" fact */
        final Rule rule2 = new Rule( "test-rule2" );
        rule2.setConsequence( consequence );         
       
        FactHandleImpl handle2 = new FactHandleImpl( 2 );
        ReteTuple tuple2 = new ReteTuple( 0,
                                          handle2,
                                          workingMemory );

        Activation activation2 = new AgendaItem( tuple2,
                                                 context,
                                                 rule2 );

       
        /* Assert the logical "logical" fact */
 
View Full Code Here

Examples of org.drools.spi.Activation

        ModuleImpl main = (ModuleImpl) agenda.getFocus();
        Activation[] activations = ( Activation[] ) main.getActivationQueue().toArray( new Activation[] {} );              
       
        /* Create the first justifieable relationship */
        String logicalString1 = new String ( "logical" );
        Activation activation1 = activations[0];
        FactHandle logicalHandle1 = workingMemory.assertObject( logicalString1,
                                                               false,
                                                               true,
                                                               activation1.getRule(),
                                                               activation1 );
       
        /* Create the second justifieable relationship */
        String logicalString2 = new String ( "logical" );
        Activation activation2 = activations[1];       
        FactHandle logicalHandle2 = workingMemory.assertObject( logicalString2,
                                                               false,
                                                               true,
                                                               activation2.getRule(),
                                                               activation2 );
       
        /* "logical" should only appear once */
        assertLength( 1,
                      workingMemory.getJustified().values() );
        /* but has two justifications */
        assertLength( 2,
                      workingMemory.getJustifiers().values() )
       
        /* Now lets cancel the first activation */
        agenda.removeFromAgenda( ( (ReteTuple) activation2.getTuple() ).getKey(),
                                 context2,
                                 activation2.getRule() );
       
        /* because this logical fact has two relationships it shouldn't retract yet */
        assertLength( 0,
                      sink.getRetracted() );       
       
View Full Code Here

Examples of org.eclipse.iam.pom.Activation

     * @generated
     */
    @Override
    public String getText( Object object )
    {
        Activation activation = (Activation) object;
        return getString( "_UI_Activation_type" ) + " " + activation.isActiveByDefault();
    }
View Full Code Here

Examples of org.jboss.as.osgi.parser.OSGiSubsystemState.Activation

    }

    @Override
    public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
        synchronized (this) {
            Activation policy = subsystemState.getActivationPolicy();
            streamWriter.writeAttribute(Attribute.ACTIVATION.getLocalName(), policy.name().toLowerCase());

            Map<String, Object> properties = subsystemState.getProperties();
            if (properties.isEmpty() == false) {
                streamWriter.writeStartElement(Element.PROPERTIES.getLocalName());
                for (Map.Entry<String, Object> entry : properties.entrySet()) {
View Full Code Here

Examples of org.jboss.as.osgi.parser.SubsystemState.Activation

            builder.addProvidedService(Services.FRAMEWORK_MODULE_PROVIDER);
            builder.addProvidedService(Services.MODULE_LOADER_PROVIDER);
            builder.addProvidedService(Services.SYSTEM_SERVICES_PROVIDER);

            // Create the {@link Framework} services
            Activation activation = injectedSubsystemState.getValue().getActivationPolicy();
            Mode initialMode = (activation == Activation.EAGER ? Mode.ACTIVE : Mode.ON_DEMAND);
            builder.createFrameworkServices(initialMode, true);
        } catch (Throwable t) {
            throw new StartException(MESSAGES.failedToCreateFrameworkServices(), t);
        }
View Full Code Here

Examples of org.jboss.jca.common.api.metadata.resourceadapter.Activation


    public static ServiceBuilder process(final ConnectorXmlDescriptor connectorXmlDescriptor, final IronJacamarXmlDescriptor ironJacamarXmlDescriptor, final ClassLoader classLoader, final ServiceTarget serviceTarget, final Map<ResourceRoot, Index> annotationIndexes, final ServiceName duServiceName, final ServiceVerificationHandler verificationHandler) throws DeploymentUnitProcessingException {

        Connector cmd = connectorXmlDescriptor != null ? connectorXmlDescriptor.getConnector() : null;
        final Activation activation = ironJacamarXmlDescriptor != null ? ironJacamarXmlDescriptor.getIronJacamar() : null;

        try {
            // Annotation merging
            Annotations annotator = new Annotations();
View Full Code Here

Examples of org.jboss.jca.core.spi.rar.Activation

            }
            if (requiredMessageListener == null) {
                throw MESSAGES.unknownMessageListenerType(messageListenerInterface.getName(), resourceAdapterName);
            }
            // found the message listener, now finally create the activation spec
            final Activation activation = requiredMessageListener.getActivation();
            // filter out the activation config properties, specified on the MDB, which aren't accepted by the resource
            // adaptor
            final Properties validActivationConfigProps = this.filterUnknownActivationConfigProperties(resourceAdapterName, activation, activationConfigProperties);
            // now set the activation config properties on the ActivationSpec
            final ActivationSpec activationSpec = activation.createInstance();
            PropertyEditors.mapJavaBeanProperties(activationSpec, validActivationConfigProps);

            return activationSpec;

        } catch (IllegalAccessException e) {
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.