Package org.drools.command.runtime.process

Examples of org.drools.command.runtime.process.StartProcessCommand


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

    public Command newStartProcess(String processId) {
        StartProcessCommand startProcess = new StartProcessCommand();
        startProcess.setProcessId(processId);
        return startProcess;
    }
View Full Code Here


        return startProcess;
    }

    public Command newStartProcess(String processId,
            Map<String, Object> parameters) {
        StartProcessCommand startProcess = new StartProcessCommand();
        startProcess.setProcessId(processId);
        startProcess.setParameters((HashMap<String, Object>) parameters);
        return startProcess;
    }
View Full Code Here

  }

  public void marshal(Object object,
                      HierarchicalStreamWriter writer,
                      MarshallingContext context) {
      StartProcessCommand cmd = (StartProcessCommand) object;
      writer.addAttribute( "processId",
                           cmd.getProcessId() );
      writer.addAttribute( "out-identifier",
              cmd.getOutIdentifier() );

      for ( Entry<String, Object> entry : cmd.getParameters().entrySet() ) {
          writer.startNode( "parameter" );
          writer.addAttribute( "identifier",
                               entry.getKey() );
          writeItem( entry.getValue(),
                     context,
View Full Code Here

          reader.moveUp();
          params.put( identifier,
                      value );
          reader.moveUp();
      }
      StartProcessCommand cmd = new StartProcessCommand();
      cmd.setProcessId( processId );
      cmd.setParameters( params );
      cmd.setOutIdentifier( outIdentifier );

      return cmd;
  }
View Full Code Here

        addCommand(new SetVariableCommandFromLastReturn(null, name));
        return this;
    }

    public StatefulKnowledgeSessionSimFluent startProcess(String identifier, Map<String, Object> params) {
        addCommand(new StartProcessCommand(identifier, params));
        return this;
    }
View Full Code Here

        addCommand(new StartProcessCommand(identifier, params));
        return this;
    }

    public StatefulKnowledgeSessionSimFluent startProcess(String identifier) {
        addCommand(new StartProcessCommand(identifier));
        return this;
    }
View Full Code Here

        }
        return this;
    }

    public FluentBatchExecution startProcess(String identifier, Map<String, Object> params) {
        lastAddedCommand = new StartProcessCommand(identifier, params);
        addCommand(lastAddedCommand);
        return this;
    }
View Full Code Here

        addCommand(lastAddedCommand);
        return this;
    }

    public FluentBatchExecution startProcess(String identifier) {
        lastAddedCommand = new StartProcessCommand(identifier);
        addCommand(lastAddedCommand);
        return this;
    }
View Full Code Here

/**
* Class for transforming a StartProcess command.
*/
class StartProcessTransformer extends CommandTransformer {
  public GenericCommand<?> transform( CommandTranslator ct, Object o, Unmarshaller unmarshaller ) {
    StartProcessCommand sp = (StartProcessCommand)o;
    for (Map.Entry<String, Object> entry: sp.getParameters().entrySet()) {
      Object obj = entry.getValue();
      if (obj instanceof Element) {
        entry.setValue(ct.makeObject((Element) obj, unmarshaller));
      }
    }
View Full Code Here

                             null );
    }

    public ProcessInstance startProcess(String processId,
                                        Map<String, Object> parameters) {
        StartProcessCommand command = new StartProcessCommand();
        command.setProcessId( processId );
        command.setParameters( (HashMap<String, Object>) parameters );
        return commandService.execute( command );
    }
View Full Code Here

TOP

Related Classes of org.drools.command.runtime.process.StartProcessCommand

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.