public interface ProcessRuntime
ProcessRuntime
is a super-interface for all KieSession
s.KieSession
Modifier and Type | Method and Description |
---|---|
void |
abortProcessInstance(long processInstanceId)
Aborts the process instance with the given id.
|
ProcessInstance |
createProcessInstance(String processId,
Map<String,Object> parameters)
Creates a new process instance (but does not yet start it).
|
ProcessInstance |
getProcessInstance(long processInstanceId)
Returns the process instance with the given id.
|
ProcessInstance |
getProcessInstance(long processInstanceId,
boolean readonly)
Returns the process instance with the given id.
|
Collection<ProcessInstance> |
getProcessInstances()
Returns a collection of currently active process instances.
|
WorkItemManager |
getWorkItemManager()
Returns the
WorkItemManager related to this session. |
void |
signalEvent(String type,
Object event)
Signals the engine that an event has occurred.
|
void |
signalEvent(String type,
Object event,
long processInstanceId)
Signals the process instance that an event has occurred.
|
ProcessInstance |
startProcess(String processId)
Start a new process instance.
|
ProcessInstance |
startProcess(String processId,
Map<String,Object> parameters)
Start a new process instance.
|
ProcessInstance |
startProcessFromNodeIds(String processId,
Map<String,Object> params,
String... nodeId)
Starts a new process instances starting from the nodes given
|
ProcessInstance |
startProcessInstance(long processInstanceId)
Starts the given process instance (which was created by using createProcesInstance
but not yet started).
|
ProcessInstance startProcess(String processId)
processId
- The id of the process that should be startedProcessInstance
that represents the instance of the process that was startedProcessInstance startProcess(String processId, Map<String,Object> parameters)
processId
- the id of the process that should be startedparameters
- the process variables that should be set when starting the process instanceProcessInstance
that represents the instance of the process that was startedProcessInstance startProcessFromNodeIds(String processId, Map<String,Object> params, String... nodeId)
processId
- the id of the process that should be startedparams
- the process variables that should be set when starting the process instancenodeIds
- the node id list that should be triggeredProcessInstance
that represents the instance of the process that was startedProcessInstance createProcessInstance(String processId, Map<String,Object> parameters)
processId
- the id of the process that should be startedparameters
- the process variables that should be set when creating the process instanceProcessInstance
that represents the instance of the process that was created (but not yet started)ProcessInstance startProcessInstance(long processInstanceId)
processInstanceId
- the id of the process instance that needs to be startedProcessInstance
that represents the instance of the process that was startedvoid signalEvent(String type, Object event)
type
- the type of eventevent
- the data associated with this eventvoid signalEvent(String type, Object event, long processInstanceId)
type
- the type of eventevent
- the data associated with this eventprocessInstanceId
- the id of the process instance that should be signaledCollection<ProcessInstance> getProcessInstances()
ProcessInstance getProcessInstance(long processInstanceId)
null
.processInstanceId
- the id of the process instancenull
if it cannot be foundProcessInstance getProcessInstance(long processInstanceId, boolean readonly)
null
.processInstanceId
- the id of the process instancereadonly
- if this is true and when using persistence, this process instance
will not be tracked and updated by the enginenull
if it cannot be foundvoid abortProcessInstance(long processInstanceId)
IllegalArgumentException
.processInstanceId
- the id of the process instanceWorkItemManager getWorkItemManager()
WorkItemManager
related to this session. This can be used to
register new WorkItemHandler
s or to complete (or abort) WorkItem
s.WorkItemManager
related to this sessionCopyright © 2001–2020 JBoss by Red Hat. All rights reserved.