Package org.drools.command.runtime.rule

Examples of org.drools.command.runtime.rule.FireAllRulesCommand


        }

        public void marshal(Object object,
                            HierarchicalStreamWriter writer,
                            MarshallingContext context) {
            FireAllRulesCommand cmd = (FireAllRulesCommand) object;

            if ( cmd.getMax() != -1 ) {
                writer.startNode( "max" );
                writer.setValue( Integer.toString( cmd.getMax() ) );
                writer.endNode();
            }
           
            if ( cmd.getOutIdentifier() != null ) {
                writer.startNode( "out-identifier" );
                writer.setValue( cmd.getOutIdentifier() );
                writer.endNode();
            }
        }
View Full Code Here


                    throw new IllegalArgumentException( "fire-all-rules does not support the child element name=''" + reader.getNodeName() + "' value=" + reader.getValue() + "'" );
                }
                reader.moveUp();
            }

            FireAllRulesCommand cmd = null;

            if ( max != null ) {
                cmd = new FireAllRulesCommand( Integer.parseInt( max ) );
            } else {
                cmd = new FireAllRulesCommand();
            }
            if ( outIdentifier != null ) {
                cmd.setOutIdentifier(outIdentifier);
            }
            return cmd;
        }
View Full Code Here

  }

  public void marshal(Object object,
                      HierarchicalStreamWriter writer,
                      MarshallingContext context) {
      FireAllRulesCommand cmd = (FireAllRulesCommand) object;

      if ( cmd.getMax() != -1 ) {
          writer.addAttribute( "max",
                               Integer.toString( cmd.getMax() ) );
      }
     
      if ( cmd.getOutIdentifier() != null) {
          writer.addAttribute( "out-identifier",
                              cmd.getOutIdentifier());
      }
  }
View Full Code Here

  public Object unmarshal(HierarchicalStreamReader reader,
                          UnmarshallingContext context) {
      String max = reader.getAttribute( "max" );
      String outIdentifier = reader.getAttribute( "out-identifier" );

      FireAllRulesCommand cmd = null;

      if ( max != null ) {
          cmd = new FireAllRulesCommand( Integer.parseInt( max ) );
      } else {
          cmd = new FireAllRulesCommand();
      }
     
      if ( outIdentifier != null ) {
          cmd.setOutIdentifier( outIdentifier );
      }
     
      return cmd;
  }
View Full Code Here

import org.drools.command.runtime.rule.ModifyCommand.SetterImpl;

@XmlRegistry
public class ObjectFactory {
    public FireAllRulesCommand createFireAllRulesCommand() {
        return new FireAllRulesCommand();
    }
View Full Code Here

        cmd.setOutIdentifier(outIdentifier);
        return cmd;
    }

    public Command newFireAllRules() {
        return new FireAllRulesCommand();
    }
View Full Code Here

    public Command newFireAllRules() {
        return new FireAllRulesCommand();
    }

    public Command newFireAllRules(int max) {
        return new FireAllRulesCommand(max);
    }
View Full Code Here

    public Command newFireAllRules(int max) {
        return new FireAllRulesCommand(max);
    }

        public Command newFireAllRules(String outidentifier) {
        return new FireAllRulesCommand(outidentifier);
    }
View Full Code Here

    }

    public int fireAllRules(AgendaFilter agendaFilter) {
        String kresultsId = "kresults_" + this.gsd.getId();
        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new KnowledgeContextResolveFromContextCommand( new FireAllRulesCommand( agendaFilter ),
                                                                                                                       null,
                                                                                                                       null,
                                                                                                                       this.instanceId,
                                                                                                                       kresultsId )} ) );
View Full Code Here

   
    public int fireAllRules(AgendaFilter agendaFilter,
                            int max) {
        String kresultsId = "kresults_" + this.gsd.getId();
        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new KnowledgeContextResolveFromContextCommand( new FireAllRulesCommand( agendaFilter, max ),
                                                                                                                       null,
                                                                                                                       null,
                                                                                                                       this.instanceId,
                                                                                                                       kresultsId )} ) );
View Full Code Here

TOP

Related Classes of org.drools.command.runtime.rule.FireAllRulesCommand

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.