Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.2.0.CR3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.kie.services.impl
Class ProcessServiceImpl

    java.lang.Object
      org.jbpm.kie.services.impl.ProcessServiceImpl

All Implemented Interfaces:
  VariablesAware, ProcessService

Direct Known Subclasses:
  ProcessServiceCDIImpl, ProcessServiceEJBImpl

    public class ProcessServiceImpl

extends Object
implements ProcessService, VariablesAware

Constructor Summary
`ProcessServiceImpl()`

Method Summary
`void` | `abortProcessInstance(Long processInstanceId)` Aborts the specified process
`void` | `abortProcessInstances(List<Long> processInstanceIds)` Aborts all specified processes
`void` | `abortWorkItem(Long id)` Abort the specified workItem
`protected Collection<String>` | `collectActiveSignals(Collection<NodeInstance> activeNodes)`
`void` | `completeWorkItem(Long id, Map<String,Object> results)` Completes the specified WorkItem with the given results
`protected void` | `disposeRuntimeEngine(RuntimeManager manager, RuntimeEngine engine)`
`
`<T> T`
` | `execute(String deploymentId, Command<T> command)` Executes provided command on the underlying command executor (usually KieSession)
`
`<T> T`
` | `execute(String deploymentId, Context<?> context, Command<T> command)` Executes provided command on the underlying command executor (usually KieSession)
`Collection<String>` | `getAvailableSignals(Long processInstanceId)` Returns all signals available in current state of given process instance
`ProcessInstance` | `getProcessInstance(Long processInstanceId)` Returns process instance information.
`Object` | `getProcessInstanceVariable(Long processInstanceId, String variableName)` Gets a process instance's variable.
`Map<String,Object>` | `getProcessInstanceVariables(Long processInstanceId)` Gets a process instance's variable values.
`WorkItem` | `getWorkItem(Long id)` Returns the specified workItem
`List<WorkItem>` | `getWorkItemByProcessInstance(Long processInstanceId)` Returns active work items by process instance id.
`
`<T> T`
` | `process(T variables, ClassLoader cl)` Generic processing method that might be simply returning same instance of variables if no processing is required.
`void` | `setDataService(RuntimeDataService dataService)`
`void` | `setDeploymentService(DeploymentService deploymentService)`
`void` | `setProcessVariable(Long processInstanceId, String variableId, Object value)` Sets a process variable.
`void` | `setProcessVariables(Long processInstanceId, Map<String,Object> variables)` Sets process variables.
`void` | `signalProcessInstance(Long processInstanceId, String signalName, Object event)` Signal an event to a single process instance
`void` | `signalProcessInstances(List<Long> processInstanceIds, String signalName, Object event)` Signal an event to given list of process instances
`Long` | `startProcess(String deploymentId, String processId)` Starts a process with no variables
`Long` | `startProcess(String deploymentId, String processId, Map<String,Object> params)` Starts a process with no variables

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ProcessServiceImpl

    public ProcessServiceImpl()

Method Detail

### setDeploymentService

    public void setDeploymentService(DeploymentService deploymentService)

### setDataService

    public void setDataService(RuntimeDataService dataService)

### startProcess

    public Long startProcess(String deploymentId,
                             String processId)

  Description copied from interface: `ProcessService`
  Starts a process with no variables

  Specified by:
    `startProcess` in interface `ProcessService`
  Parameters:
    `deploymentId` - deployment information for the process's kjar
    `processId` - The process's identifier
  Returns:
    process instance identifier

### startProcess

    public Long startProcess(String deploymentId,
                             String processId,
                             Map<String,Object> params)

  Description copied from interface: `ProcessService`
  Starts a process with no variables

  Specified by:
    `startProcess` in interface `ProcessService`
  Parameters:
    `deploymentId` - deployment information for the process's kjar
    `processId` - The process's identifier
    `params` - process variables
  Returns:
    process instance identifier

### abortProcessInstance

    public void abortProcessInstance(Long processInstanceId)

  Description copied from interface: `ProcessService`
  Aborts the specified process

  Specified by:
    `abortProcessInstance` in interface `ProcessService`
  Parameters:
    `processInstanceId` - process instance's unique identifier

### abortProcessInstances

    public void abortProcessInstances(List<Long> processInstanceIds)

  Description copied from interface: `ProcessService`
  Aborts all specified processes

  Specified by:
    `abortProcessInstances` in interface `ProcessService`
  Parameters:
    `processInstanceIds` - list of process instance unique identifiers

### signalProcessInstance

    public void signalProcessInstance(Long processInstanceId,
                                      String signalName,
                                      Object event)

  Description copied from interface: `ProcessService`
  Signal an event to a single process instance

  Specified by:
    `signalProcessInstance` in interface `ProcessService`
  Parameters:
    `processInstanceId` - the process instance's unique identifier
    `signalName` - the signal's id in the process
    `event` - the event object to be passed in with the event

### signalProcessInstances

    public void signalProcessInstances(List<Long> processInstanceIds,
                                       String signalName,
                                       Object event)

  Description copied from interface: `ProcessService`
  Signal an event to given list of process instances

  Specified by:
    `signalProcessInstances` in interface `ProcessService`
  Parameters:
    `processInstanceIds` - list of process instance unique identifiers
    `signalName` - the signal's id in the process
    `event` - the event object to be passed in with the event

### getProcessInstance

    public ProcessInstance getProcessInstance(Long processInstanceId)

  Description copied from interface: `ProcessService`
  Returns process instance information. Will return null if no active process with that id is found

  Specified by:
    `getProcessInstance` in interface `ProcessService`
  Parameters:
    `processInstanceId` - The process instance's unique identifier
  Returns:
    Process instance information

### setProcessVariable

    public void setProcessVariable(Long processInstanceId,
                                   String variableId,
                                   Object value)

  Description copied from interface: `ProcessService`
  Sets a process variable.

  Specified by:
    `setProcessVariable` in interface `ProcessService`
  Parameters:
    `processInstanceId` - The process instance's unique identifier.

### setProcessVariables

    public void setProcessVariables(Long processInstanceId,
                                    Map<String,Object> variables)

  Description copied from interface: `ProcessService`
  Sets process variables.

  Specified by:
    `setProcessVariables` in interface `ProcessService`
  Parameters:
    `processInstanceId` - The process instance's unique identifier.
    `variables` - map of process variables (key - variable name, value - variable value)

### getProcessInstanceVariable

    public Object getProcessInstanceVariable(Long processInstanceId,
                                             String variableName)

  Description copied from interface: `ProcessService`
  Gets a process instance's variable.

  Specified by:
    `getProcessInstanceVariable` in interface `ProcessService`
  Parameters:
    `processInstanceId` - the process instance's unique identifier.
    `variableName` - the variable name to get from the process.

### getProcessInstanceVariables

    public Map<String,Object> getProcessInstanceVariables(Long processInstanceId)

  Description copied from interface: `ProcessService`
  Gets a process instance's variable values.

  Specified by:
    `getProcessInstanceVariables` in interface `ProcessService`
  Parameters:
    `processInstanceId` - The process instance's unique identifier.

### getAvailableSignals

    public Collection<String> getAvailableSignals(Long processInstanceId)

  Description copied from interface: `ProcessService`
  Returns all signals available in current state of given process instance

  Specified by:
    `getAvailableSignals` in interface `ProcessService`
  Parameters:
    `processInstanceId` - process instance id
  Returns:
    list of available signals or empty list if no signals are available

### completeWorkItem

    public void completeWorkItem(Long id,
                                 Map<String,Object> results)

  Description copied from interface: `ProcessService`
  Completes the specified WorkItem with the given results

  Specified by:
    `completeWorkItem` in interface `ProcessService`
  Parameters:
    `id` - workItem id
    `results` - results of the workItem

### abortWorkItem

    public void abortWorkItem(Long id)

  Description copied from interface: `ProcessService`
  Abort the specified workItem

  Specified by:
    `abortWorkItem` in interface `ProcessService`
  Parameters:
    `id` - workItem id

### getWorkItem

    public WorkItem getWorkItem(Long id)

  Description copied from interface: `ProcessService`
  Returns the specified workItem

  Specified by:
    `getWorkItem` in interface `ProcessService`
  Parameters:
    `id` - workItem id
  Returns:
    The specified workItem

### getWorkItemByProcessInstance

    public List<WorkItem> getWorkItemByProcessInstance(Long processInstanceId)

  Description copied from interface: `ProcessService`
  Returns active work items by process instance id.

  Specified by:
    `getWorkItemByProcessInstance` in interface `ProcessService`
  Parameters:
    `processInstanceId` - process instance id
  Returns:
    The list of active workItems for the process instance

### execute

    public <T> T execute(String deploymentId,
                         Command<T> command)

  Description copied from interface: `ProcessService`
  Executes provided command on the underlying command executor (usually KieSession)

  Specified by:
    `execute` in interface `ProcessService`
  Parameters:
    `deploymentId` - deployment information for the process's kjar
    `command` - actual command for execution
  Returns:
    results of command execution

### execute

    public <T> T execute(String deploymentId,
                         Context<?> context,
                         Command<T> command)

  Description copied from interface: `ProcessService`
  Executes provided command on the underlying command executor (usually KieSession)

  Specified by:
    `execute` in interface `ProcessService`
  Parameters:
    `deploymentId` - deployment information for the process's kjar
    `context` - context implementation to be used to get runtime engine
    `command` - actual command for execution
  Returns:
    results of command execution

### collectActiveSignals

    protected Collection<String> collectActiveSignals(Collection<NodeInstance> activeNodes)

### process

    public <T> T process(T variables,
                         ClassLoader cl)

  Description copied from interface: `VariablesAware`
  Generic processing method that might be simply returning same instance of variables if no processing is required.

  Specified by:
    `process` in interface `VariablesAware`
  Parameters:
    `variables` - object that holds varialble(s)
    `cl` - classloader that shall be used to operate on the variables e.g. project class loader
  Returns:

### disposeRuntimeEngine

    protected void disposeRuntimeEngine(RuntimeManager manager,
                                        RuntimeEngine engine)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.2.0.CR3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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