org.jbpm.integration.console
Class CommandDelegate

java.lang.Object
  extended by org.jbpm.integration.console.CommandDelegate

public class CommandDelegate
extends Object

This class encapsulates the logic for executing operations via the Drools/jBPM api and retrieving information from that api.


Method Summary
static void abortProcessInstance(String processInstanceIdString)
           
protected static Collection<org.drools.runtime.process.NodeInstance> collectActiveNodeInstances(Collection<org.drools.runtime.process.NodeInstance> activeNodes)
           
static Collection<org.drools.runtime.process.NodeInstance> getActiveNodeInstances(long processInstanceId)
           
static List<ProcessInstanceLog> getActiveProcessInstanceLogsByProcessId(String processId)
           
static org.drools.definition.process.Process getProcess(String processId)
           
static org.drools.definition.process.Process getProcessByName(String name)
           
static List<org.drools.definition.process.Process> getProcesses()
           
static ProcessInstanceLog getProcessInstanceLog(String processInstanceId)
           
static List<ProcessInstanceLog> getProcessInstanceLogsByProcessId(String processId)
           
static Map<String,Object> getProcessInstanceVariables(String processInstanceId)
          This returns the variables associated with the process instance.
static void removeProcess(String processId)
          This method is not supported by jBPM and will throw a UnsupportedOperationException.
static void setProcessInstanceVariables(String processInstanceId, Map<String,Object> variables)
          This method adds the variables provided in the map, to the (process) instance.
static void signalExecution(String executionId, String signalRef, String signal)
           
static ProcessInstanceLog startProcess(String processId, Map<String,Object> parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProcesses

public static List<org.drools.definition.process.Process> getProcesses()

getProcess

public static org.drools.definition.process.Process getProcess(String processId)

getProcessByName

public static org.drools.definition.process.Process getProcessByName(String name)

removeProcess

public static void removeProcess(String processId)
This method is not supported by jBPM and will throw a UnsupportedOperationException.

Parameters:
processId -

getProcessInstanceLog

public static ProcessInstanceLog getProcessInstanceLog(String processInstanceId)

getProcessInstanceLogsByProcessId

public static List<ProcessInstanceLog> getProcessInstanceLogsByProcessId(String processId)

getActiveProcessInstanceLogsByProcessId

public static List<ProcessInstanceLog> getActiveProcessInstanceLogsByProcessId(String processId)

startProcess

public static ProcessInstanceLog startProcess(String processId,
                                              Map<String,Object> parameters)

abortProcessInstance

public static void abortProcessInstance(String processInstanceIdString)

getProcessInstanceVariables

public static Map<String,Object> getProcessInstanceVariables(String processInstanceId)
This returns the variables associated with the process instance. This is a "read-only" function: modifying the values of the map will not have any effect on the actual variables associated with the process instance.

Parameters:
processInstanceId -
Returns:

setProcessInstanceVariables

public static void setProcessInstanceVariables(String processInstanceId,
                                               Map<String,Object> variables)
This method adds the variables provided in the map, to the (process) instance. NOTE: the variables given will be added to the existing map of variables. They will not replace the variables that are already associated with the proces instance.

Parameters:
processInstanceId - The id of the process instance.
variables - The variables to add.

signalExecution

public static void signalExecution(String executionId,
                                   String signalRef,
                                   String signal)

getActiveNodeInstances

public static Collection<org.drools.runtime.process.NodeInstance> getActiveNodeInstances(long processInstanceId)

collectActiveNodeInstances

protected static Collection<org.drools.runtime.process.NodeInstance> collectActiveNodeInstances(Collection<org.drools.runtime.process.NodeInstance> activeNodes)


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.