Examples of ActionRetractFact


Examples of org.drools.brms.client.modeldriven.brl.ActionRetractFact

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

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

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

Examples of org.drools.guvnor.client.modeldriven.brl.ActionRetractFact

        } else if (c instanceof ActionRetractFactCol) {
          ActionRetractFactCol rf = (ActionRetractFactCol)c;
          LabelledAction a = find(actions, rf.boundName);
          if (a == null) {
            a = new LabelledAction();
            a.action = new ActionRetractFact(rf.boundName);
            a.boundName = rf.boundName;
            actions.add(a);
          }
        } else if (c instanceof ActionSetFieldCol) {
          ActionSetFieldCol sf = (ActionSetFieldCol)c;
View Full Code Here

Examples of org.drools.guvnor.client.modeldriven.brl.ActionRetractFact

    assertEquals("actionsetfield2", a1.fieldValues[1].value);
    assertEquals(SuggestionCompletionEngine.TYPE_NUMERIC, a1.fieldValues[1].type);


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

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

Examples of org.drools.guvnor.models.commons.shared.rule.ActionRetractFact

    private void doAction( List<LabelledAction> actions,
                           ActionRetractFactCol52 rf,
                           String cell ) {
        LabelledAction a = new LabelledAction();
        a.action = new ActionRetractFact( cell );
        a.boundName = cell;
        actions.add( a );
    }
View Full Code Here

Examples of org.drools.guvnor.models.commons.shared.rule.ActionRetractFact

                        final ActionSetField action = (ActionSetField) a;
                        if ( action.getVariable().equals( binding ) ) {
                            return true;
                        }
                    } else if ( a instanceof ActionRetractFact ) {
                        final ActionRetractFact action = (ActionRetractFact) a;
                        if ( action.getVariableName().equals( binding ) ) {
                            return true;
                        }
                    }
                }
            }
View Full Code Here

Examples of org.drools.guvnor.models.commons.shared.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.kie.internal.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.ide.common.client.modeldriven.brl.ActionRetractFact

    @Test
    public void testActionRetractFact() {
        RuleModel model = new RuleModel();

        model.rhs = new IAction[1];
        ActionRetractFact arf = new ActionRetractFact();
        arf.variableName = "$arf";
        model.rhs[0] = arf;

        RuleModelCloneVisitor cloneVisitor = new RuleModelCloneVisitor();
        RuleModel clone = cloneVisitor.visitRuleModel( model );

        assertEquals( 1,
                      clone.rhs.length );

        assertNotSame( model.rhs[0],
                       clone.rhs[0] );
        assertNotNull( clone.rhs[0] );
        assertTrue( clone.rhs[0] instanceof ActionRetractFact );
        ActionRetractFact arfClone = (ActionRetractFact) clone.rhs[0];
        assertEquals( "$arf",
                      arfClone.variableName );
    }
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ActionRetractFact

                      a1.fieldValues[1].value );
        assertEquals( SuggestionCompletionEngine.TYPE_NUMERIC,
                      a1.fieldValues[1].type );

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

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

Examples of org.drools.ide.common.client.modeldriven.brl.ActionRetractFact

                               position );
    }

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

Examples of org.drools.ide.common.client.modeldriven.brl.ActionRetractFact

                        final ActionSetField action = (ActionSetField) a;
                        if ( action.variable.equals( binding ) ) {
                            return true;
                        }
                    } else if ( a instanceof ActionRetractFact ) {
                        final ActionRetractFact action = (ActionRetractFact) a;
                        if ( action.variableName.equals( binding ) ) {
                            return true;
                        }
                    }
                }
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.