Examples of ActionGlobalCollectionAdd


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

                                setStatements.put( variable, setters );
                            }
                            setters.add( line );
                        } else if ( methodName.equals( "add" ) && expandedDRLInfo.hasGlobal( variable ) ) {
                            String factName = line.substring( argStart + 1, line.lastIndexOf( ')' ) ).trim();
                            ActionGlobalCollectionAdd actionGlobalCollectionAdd = new ActionGlobalCollectionAdd();
                            actionGlobalCollectionAdd.setGlobalName( variable );
                            actionGlobalCollectionAdd.setFactName( factName );
                            m.addRhsItem( actionGlobalCollectionAdd );
                        } else {
                            ActionCallMethod acm = new ActionCallMethod();
                            acm.setMethodName( methodName );
                            acm.setVariable( variable );
View Full Code Here

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

        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        ActionGlobalCollectionAdd add = new ActionGlobalCollectionAdd();
        add.setGlobalName( "results" );
        add.setFactName( "f" );
        m.addRhsItem( add );
        m.name = "my rule";

        checkMarshallUnmarshall( expected, m );
    }
View Full Code Here

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

        //RHS
        assertEquals( 1,
                      m.rhs.length );
        assertTrue( m.rhs[ 0 ] instanceof ActionGlobalCollectionAdd );

        final ActionGlobalCollectionAdd a = (ActionGlobalCollectionAdd) m.rhs[ 0 ];
        assertEquals( "list",
                      a.getGlobalName() );
        assertEquals( "$a",
                      a.getFactName() );
    }
View Full Code Here

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

        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        ActionGlobalCollectionAdd ag = new ActionGlobalCollectionAdd();
        ag.setFactName( "x" );
        ag.setGlobalName( "g" );
        m.addRhsItem( ag );
        m.name = "my rule";
        final String xml = p.marshal( m );
        System.out.println( xml );
        assertTrue( xml.indexOf( "Person" ) > -1 );
View Full Code Here

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

            this.readOnly = !modeller.getSuggestionCompletions().containsFactType(modeller.getModel().getLHSBindingType(action.factName));
        } else {
            this.readOnly = readOnly;
        }

        ActionGlobalCollectionAdd gca = (ActionGlobalCollectionAdd) action;
        SimplePanel sp = new SimplePanel();
        sp.setStyleName("model-builderInner-Background"); //NON-NLS
        sp.add(new SmallLabel(" " + constants.AddXToListY(gca.factName, gca.globalName)));

        if (this.readOnly) {
View Full Code Here

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

                                 "GLOBCOL" + glob + var );
                cmds.put( "GLOBCOL" + glob + var,
                          new Command() {

                              public void execute() {
                                  ActionGlobalCollectionAdd gca = new ActionGlobalCollectionAdd();
                                  gca.globalName = glob;
                                  gca.factName = var;
                                  model.addRhsItem( gca,
                                                    Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
                                  hide();
View Full Code Here

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

        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        ActionGlobalCollectionAdd add = new ActionGlobalCollectionAdd();
        add.globalName = "results";
        add.factName = "f";
        m.addRhsItem( add );
        m.name = "my rule";
View Full Code Here

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

        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        ActionGlobalCollectionAdd ag = new ActionGlobalCollectionAdd();
        ag.factName = "x";
        ag.globalName = "g";
        m.addRhsItem( ag );
        m.name = "my rule";
        final String xml = p.marshal( m );
View Full Code Here

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

            this.readOnly = !modeller.getSuggestionCompletions().containsFactType(modeller.getModel().getLHSBindingType(action.factName));
        } else {
            this.readOnly = readOnly;
        }

        ActionGlobalCollectionAdd gca = (ActionGlobalCollectionAdd) action;
        SimplePanel sp = new SimplePanel();
        sp.setStyleName("model-builderInner-Background"); //NON-NLS
        Constants constants = ((Constants) GWT.create(Constants.class));
        sp.add(new SmallLabel(" " + constants.AddXToListY(gca.factName, gca.globalName)));
View Full Code Here

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

            this.readOnly = !modeller.getSuggestionCompletions().containsFactType(modeller.getModel().getBoundFact(action.factName).factType);
        } else {
            this.readOnly = readOnly;
        }

        ActionGlobalCollectionAdd gca = (ActionGlobalCollectionAdd) action;
        SimplePanel sp = new SimplePanel();
        sp.setStyleName("model-builderInner-Background"); //NON-NLS
        sp.add(new SmallLabel(" " + Format.format(constants.AddXToListY(), gca.factName, gca.globalName)));

        if (this.readOnly) {
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.