Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.kie.remote.services;
  
  import java.util.HashSet;
  import java.util.Set;
  
  import  org.drools.core.command.GetVariableCommand;
  import  org.drools.core.command.runtime.GetFactCountCommand;
  import  org.drools.core.command.runtime.GetGlobalCommand;
 import  org.drools.core.command.runtime.GetIdCommand;
 import  org.drools.core.command.runtime.SetGlobalCommand;
 import  org.drools.core.command.runtime.process.AbortProcessInstanceCommand;
 import  org.drools.core.command.runtime.process.AbortWorkItemCommand;
 import  org.drools.core.command.runtime.process.CompleteWorkItemCommand;
 import  org.drools.core.command.runtime.process.GetProcessIdsCommand;
 import  org.drools.core.command.runtime.process.GetProcessInstanceByCorrelationKeyCommand;
 import  org.drools.core.command.runtime.process.GetProcessInstanceCommand;
 import  org.drools.core.command.runtime.process.GetProcessInstancesCommand;
 import  org.drools.core.command.runtime.process.GetWorkItemCommand;
 import  org.drools.core.command.runtime.process.SetProcessInstanceVariablesCommand;
 import  org.drools.core.command.runtime.process.SignalEventCommand;
 import  org.drools.core.command.runtime.process.StartCorrelatedProcessCommand;
 import  org.drools.core.command.runtime.process.StartProcessCommand;
 import  org.drools.core.command.runtime.rule.DeleteCommand;
 import  org.drools.core.command.runtime.rule.FireAllRulesCommand;
 import  org.drools.core.command.runtime.rule.InsertObjectCommand;
 import  org.drools.core.command.runtime.rule.UpdateCommand;
 import  org.jbpm.process.audit.command.ClearHistoryLogsCommand;
 import  org.jbpm.process.audit.command.FindActiveProcessInstancesCommand;
 import  org.jbpm.process.audit.command.FindNodeInstancesCommand;
 import  org.jbpm.process.audit.command.FindProcessInstanceCommand;
 import  org.jbpm.process.audit.command.FindProcessInstancesCommand;
 import  org.jbpm.process.audit.command.FindSubProcessInstancesCommand;
 import  org.jbpm.process.audit.command.FindVariableInstancesByNameCommand;
 import  org.jbpm.process.audit.command.FindVariableInstancesCommand;
 import  org.jbpm.services.task.commands.ActivateTaskCommand;
 import  org.jbpm.services.task.commands.AddTaskCommand;
 import  org.jbpm.services.task.commands.CancelDeadlineCommand;
 import  org.jbpm.services.task.commands.ClaimNextAvailableTaskCommand;
 import  org.jbpm.services.task.commands.ClaimTaskCommand;
 import  org.jbpm.services.task.commands.CompleteTaskCommand;
 import  org.jbpm.services.task.commands.DelegateTaskCommand;
 import  org.jbpm.services.task.commands.ExecuteTaskRulesCommand;
 import  org.jbpm.services.task.commands.ExitTaskCommand;
 import  org.jbpm.services.task.commands.FailTaskCommand;
 import  org.jbpm.services.task.commands.ForwardTaskCommand;
 import  org.jbpm.services.task.commands.GetAttachmentCommand;
 import  org.jbpm.services.task.commands.GetContentCommand;
 import  org.jbpm.services.task.commands.GetTaskAssignedAsBusinessAdminCommand;
 import  org.jbpm.services.task.commands.GetTaskAssignedAsPotentialOwnerCommand;
 import  org.jbpm.services.task.commands.GetTaskByWorkItemIdCommand;
 import  org.jbpm.services.task.commands.GetTaskCommand;
 import  org.jbpm.services.task.commands.GetTaskContentCommand;
 import  org.jbpm.services.task.commands.GetTasksByProcessInstanceIdCommand;
 import  org.jbpm.services.task.commands.GetTasksByStatusByProcessInstanceIdCommand;
 import  org.jbpm.services.task.commands.GetTasksByVariousFieldsCommand;
 import  org.jbpm.services.task.commands.GetTasksOwnedCommand;
 import  org.jbpm.services.task.commands.NominateTaskCommand;
 import  org.jbpm.services.task.commands.ProcessSubTaskCommand;
 import  org.jbpm.services.task.commands.ReleaseTaskCommand;
 import  org.jbpm.services.task.commands.ResumeTaskCommand;
 import  org.jbpm.services.task.commands.SkipTaskCommand;
 import  org.jbpm.services.task.commands.StartTaskCommand;
 import  org.jbpm.services.task.commands.StopTaskCommand;
 import  org.jbpm.services.task.commands.SuspendTaskCommand;
 import  org.kie.api.command.Command;
 
 @SuppressWarnings("rawtypes")
 public class AcceptedServerCommands {
 
     private AcceptedServerCommands() { 
         // static fields only
     }
     
     private static Set<Class<? extends Command>> acceptedCommands = new HashSet<Class<? extends Command>>();
     static {
         .add(AbortWorkItemCommand.class);
         .add(CompleteWorkItemCommand.class);
         .add(GetWorkItemCommand.class);
 
         .add(AbortProcessInstanceCommand.class);
         .add(GetProcessIdsCommand.class); // non KieSession
         .add(GetProcessInstanceByCorrelationKeyCommand.class);
         .add(GetProcessInstanceCommand.class);
         .add(GetProcessInstancesCommand.class);
         .add(SetProcessInstanceVariablesCommand.class);
         .add(SignalEventCommand.class);
         .add(StartCorrelatedProcessCommand.class);
         .add(StartProcessCommand.class);
 
         .add(GetVariableCommand.class);
         
         .add(GetFactCountCommand.class);
         .add(GetGlobalCommand.class);
         .add(GetIdCommand.class);
         .add(SetGlobalCommand.class);
         
         .add(DeleteCommand.class);
         .add(FireAllRulesCommand.class);
        .add(InsertObjectCommand.class);
        .add(UpdateCommand.class);
        // Task commands
        .add(ActivateTaskCommand.class);
        .add(AddTaskCommand.class);
        .add(ClaimNextAvailableTaskCommand.class);
        .add(ClaimTaskCommand.class);
        .add(CompleteTaskCommand.class);
        .add(DelegateTaskCommand.class);
        .add(ExitTaskCommand.class);
        .add(FailTaskCommand.class);
        .add(ForwardTaskCommand.class);
        .add(GetAttachmentCommand.class);
        .add(GetContentCommand.class);
        .add(GetTaskContentCommand.class);
        .add(GetTaskAssignedAsBusinessAdminCommand.class);
        .add(GetTaskAssignedAsPotentialOwnerCommand.class);
        .add(GetTaskByWorkItemIdCommand.class);
        .add(GetTaskContentCommand.class);
        .add(GetTaskCommand.class);
        .add(GetTasksByProcessInstanceIdCommand.class);
        .add(GetTasksByStatusByProcessInstanceIdCommand.class);
        .add(GetTasksByVariousFieldsCommand.class);
        .add(GetTasksOwnedCommand.class);
        .add(NominateTaskCommand.class);
        .add(ReleaseTaskCommand.class);
        .add(ResumeTaskCommand.class);
        .add(SkipTaskCommand.class);
        .add(StartTaskCommand.class);
        .add(StopTaskCommand.class);
        .add(SuspendTaskCommand.class);
        .add(ProcessSubTaskCommand.class);
        .add(ExecuteTaskRulesCommand.class);
        .add(CancelDeadlineCommand.class);
        // audit commands
        .add(ClearHistoryLogsCommand.class);
        .add(FindActiveProcessInstancesCommand.class);
        .add(FindNodeInstancesCommand.class);
        .add(FindProcessInstanceCommand.class);
        .add(FindProcessInstancesCommand.class);
        .add(FindSubProcessInstancesCommand.class);
        .add(FindSubProcessInstancesCommand.class);
        .add(FindVariableInstancesCommand.class);
        .add(FindVariableInstancesByNameCommand.class);
        
         = Collections.unmodifiableSet();
    }
    public static boolean isAcceptedCommandClass(Class<?> commandClass) { 
        return .contains(commandClass);
    }
    
    public static Set<Class<? extends Command>> SEND_OBJECT_PARAMETER_COMMANDS = new HashSet<Class<? extends Command>>();
    static { 
        .add(CompleteWorkItemCommand.class);
        .add(SignalEventCommand.class);
        .add(StartCorrelatedProcessCommand.class);
        .add(StartProcessCommand.class);
        
        .add(SetGlobalCommand.class);
        .add(InsertObjectCommand.class);
        .add(UpdateCommand.class);
        .add(AddTaskCommand.class);
        .add(CompleteTaskCommand.class);
        .add(FailTaskCommand.class);
        
    }
New to GrepCode? Check out our FAQ X