Examples of ActionRetractFact


Examples of org.drools.workbench.models.datamodel.rule.ActionRetractFact

                action.setVariable( variable );
                m.addRhsItem( action );
                addSettersToAction( setStatements, variable, action, isJavaDialect );
            } else if ( line.startsWith( "retract" ) ) {
                String variable = unwrapParenthesis( line );
                m.addRhsItem( new ActionRetractFact( variable ) );
            } else if ( line.startsWith( "org.drools.core.process.instance.impl.WorkItemImpl wiWorkItem" ) ) {
                ActionExecuteWorkItem awi = new ActionExecuteWorkItem();
                pwd = new PortableWorkDefinition();
                pwd.setName( "WorkItem" );
                awi.setWorkDefinition( pwd );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.ActionRetractFact

                        modifiers = line.substring( modifyBlockStart + 1 ).trim();
                    }
                }
            } else if ( line.startsWith( "retract" ) || line.startsWith( "delete" ) ) {
                String variable = unwrapParenthesis( line );
                m.addRhsItem( new ActionRetractFact( variable ) );
            } else if ( line.startsWith( "org.drools.core.process.instance.impl.WorkItemImpl wiWorkItem" ) ) {
                ActionExecuteWorkItem awi = new ActionExecuteWorkItem();
                pwd = new PortableWorkDefinition();
                pwd.setName( "WorkItem" );
                awi.setWorkDefinition( pwd );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.ActionRetractFact

                              final GuidedDecisionTree model,
                              final PackageDataModelOracle dmo,
                              final List<ParserMessage> messages ) {
        final List<Node> nodes = new ArrayList<Node>();
        if ( a instanceof ActionRetractFact ) {
            final ActionRetractFact arf = (ActionRetractFact) a;
            final String binding = arf.getVariableName();
            for ( TypeNode tn : types ) {
                if ( tn.isBound() ) {
                    if ( tn.getBinding().equals( binding ) ) {
                        final ActionRetractNode arn = new ActionRetractNodeImpl( tn );
                        nodes.add( arn );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.ActionRetractFact

                        modifiers = line.substring( modifyBlockStart + 1 ).trim();
                    }
                }
            } else if ( line.startsWith( "retract" ) || line.startsWith( "delete" ) ) {
                String variable = unwrapParenthesis( line );
                m.addRhsItem( new ActionRetractFact( variable ) );
            } else if ( line.startsWith( "org.drools.core.process.instance.impl.WorkItemImpl wiWorkItem" ) ) {
                ActionExecuteWorkItem awi = new ActionExecuteWorkItem();
                pwd = new PortableWorkDefinition();
                pwd.setName( "WorkItem" );
                awi.setWorkDefinition( pwd );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.ActionRetractFact

                      a1.getFieldValues()[ 1 ].getValue() );
        assertEquals( DataType.TYPE_NUMERIC_INTEGER,
                      a1.getFieldValues()[ 1 ].getType() );

        // examine the retract
        ActionRetractFact a2 = (ActionRetractFact) rm.rhs[ 1 ];
        assertEquals( "retract",
                      a2.getVariableName() );

        // examine the insert
        ActionInsertFact a3 = (ActionInsertFact) rm.rhs[ 2 ];
        assertEquals( "Cheese",
                      a3.getFactType() );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.ActionRetractFact

                      a1.getFieldValues()[ 1 ].getValue() );
        assertEquals( DataType.TYPE_NUMERIC_INTEGER,
                      a1.getFieldValues()[ 1 ].getType() );

        // examine the retract
        ActionRetractFact a2 = (ActionRetractFact) rm.rhs[ 1 ];
        assertEquals( "retract",
                      a2.getVariableName() );

        // examine the insert
        ActionInsertFact a3 = (ActionInsertFact) rm.rhs[ 2 ];
        assertEquals( "Cheese",
                      a3.getFactType() );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.ActionRetractFact

                               position );
    }

    private void addRetract( String var,
                             int position ) {
        this.model.addRhsItem( new ActionRetractFact( var ),
                               position );
    }
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.ActionRetractFact

                               position );
    }

    private void addRetract( String var,
                             int position ) {
        this.model.addRhsItem( new ActionRetractFact( var ),
                               position );
    }
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.ActionRetractFact

        set.addFieldValue( new ActionFieldValue( "status",
                                                 "rejected",
                                                 DataType.TYPE_STRING ) );
        m.addRhsItem( set );

        final ActionRetractFact ret = new ActionRetractFact( "p1" );
        m.addRhsItem( ret );

        if ( useDsl ) {
            final DSLSentence sen = new DSLSentence();
            sen.setDefinition( "Send an email to {administrator}" );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.ActionRetractFact

        set.addFieldValue( new ActionFieldValue( "status",
                                                 "rejected",
                                                 DataType.TYPE_STRING ) );
        m.addRhsItem( set );

        final ActionRetractFact ret = new ActionRetractFact( "p1" );
        m.addRhsItem( ret );

        final DSLSentence sen = new DSLSentence();
        sen.setDefinition( "Send an email to {administrator}" );
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.