org.jbpm.process
Class StatefulProcessSession

java.lang.Object
  extended by org.jbpm.process.StatefulProcessSession
All Implemented Interfaces:
org.drools.common.InternalKnowledgeRuntime, KnowledgeRuntimeEventManager, ProcessEventManager, WorkingMemoryEventManager, CommandExecutor, KnowledgeRuntime, ProcessRuntime, StatefulProcessSession, StatefulRuleSession, WorkingMemory, WorkingMemoryEntryPoint, StatefulKnowledgeSession

public class StatefulProcessSession
extends Object
implements StatefulKnowledgeSession, org.drools.common.InternalKnowledgeRuntime


Field Summary
protected  Queue<org.drools.common.WorkingMemoryAction> actionQueue
           
 
Constructor Summary
StatefulProcessSession(KnowledgeBase kbase, KnowledgeSessionConfiguration sessionConfiguration, Environment environment)
           
 
Method Summary
 void abortProcessInstance(long processInstanceId)
           
 void addEventListener(AgendaEventListener listener)
           
 void addEventListener(ProcessEventListener listener)
           
 void addEventListener(WorkingMemoryEventListener listener)
           
 ProcessInstance createProcessInstance(String processId, Map<String,Object> parameters)
           
 void dispose()
           
 void endOperation()
           
<T> T
execute(Command<T> command)
           
 void executeQueuedActions()
           
 int fireAllRules()
           
 int fireAllRules(AgendaFilter agendaFilter)
           
 int fireAllRules(AgendaFilter agendaFilter, int i)
           
 int fireAllRules(int max)
           
 void fireUntilHalt()
           
 void fireUntilHalt(AgendaFilter agendaFilter)
           
 Queue<org.drools.common.WorkingMemoryAction> getActionQueue()
           
 Agenda getAgenda()
           
 Collection<AgendaEventListener> getAgendaEventListeners()
           
 Calendars getCalendars()
           
 Map<String,Channel> getChannels()
           
 String getEntryPointId()
           
 Environment getEnvironment()
           
 long getFactCount()
           
 FactHandle getFactHandle(Object object)
           
<T extends FactHandle>
Collection<T>
getFactHandles()
           
<T extends FactHandle>
Collection<T>
getFactHandles(ObjectFilter filter)
           
 Object getGlobal(String identifier)
           
 Globals getGlobals()
           
 int getId()
           
 KnowledgeBase getKnowledgeBase()
           
 long getLastIdleTimestamp()
           
 Object getObject(FactHandle factHandle)
           
 Collection<Object> getObjects()
           
 Collection<Object> getObjects(ObjectFilter filter)
           
 Collection<ProcessEventListener> getProcessEventListeners()
           
 ProcessInstance getProcessInstance(long processInstanceId)
           
 Collection<ProcessInstance> getProcessInstances()
           
 InternalProcessRuntime getProcessRuntime()
           
 QueryResults getQueryResults(String query, Object... arguments)
           
 SessionClock getSessionClock()
           
 KnowledgeSessionConfiguration getSessionConfiguration()
           
 TimerService getTimerService()
           
 WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String name)
           
 Collection<? extends WorkingMemoryEntryPoint> getWorkingMemoryEntryPoints()
           
 Collection<WorkingMemoryEventListener> getWorkingMemoryEventListeners()
           
 WorkItemManager getWorkItemManager()
           
 void halt()
           
 FactHandle insert(Object object)
           
 LiveQuery openLiveQuery(String query, Object[] arguments, ViewChangedEventListener listener)
           
 void queueWorkingMemoryAction(org.drools.common.WorkingMemoryAction action)
           
 void registerChannel(String name, Channel channel)
           
 void registerExitPoint(String name, ExitPoint exitPoint)
           
 void removeEventListener(AgendaEventListener listener)
           
 void removeEventListener(ProcessEventListener listener)
           
 void removeEventListener(WorkingMemoryEventListener listener)
           
 void retract(FactHandle handle)
           
 void setEndOperationListener(org.drools.common.EndOperationListener listener)
           
 void setGlobal(String identifier, Object object)
           
 void setId(int id)
           
 void signalEvent(String type, Object event)
           
 void signalEvent(String type, Object event, long processInstanceId)
           
 void startOperation()
           
 ProcessInstance startProcess(String processId)
           
 ProcessInstance startProcess(String processId, Map<String,Object> parameters)
           
 ProcessInstance startProcessInstance(long processInstanceId)
           
 void unregisterChannel(String name)
           
 void unregisterExitPoint(String name)
           
 void update(FactHandle handle, Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actionQueue

protected Queue<org.drools.common.WorkingMemoryAction> actionQueue
Constructor Detail

StatefulProcessSession

public StatefulProcessSession(KnowledgeBase kbase,
                              KnowledgeSessionConfiguration sessionConfiguration,
                              Environment environment)
Method Detail

abortProcessInstance

public void abortProcessInstance(long processInstanceId)
Specified by:
abortProcessInstance in interface ProcessRuntime

getProcessInstance

public ProcessInstance getProcessInstance(long processInstanceId)
Specified by:
getProcessInstance in interface ProcessRuntime

getProcessInstances

public Collection<ProcessInstance> getProcessInstances()
Specified by:
getProcessInstances in interface ProcessRuntime

signalEvent

public void signalEvent(String type,
                        Object event)
Specified by:
signalEvent in interface ProcessRuntime

signalEvent

public void signalEvent(String type,
                        Object event,
                        long processInstanceId)
Specified by:
signalEvent in interface ProcessRuntime

startProcess

public ProcessInstance startProcess(String processId)
Specified by:
startProcess in interface ProcessRuntime

startProcess

public ProcessInstance startProcess(String processId,
                                    Map<String,Object> parameters)
Specified by:
startProcess in interface ProcessRuntime

createProcessInstance

public ProcessInstance createProcessInstance(String processId,
                                             Map<String,Object> parameters)
Specified by:
createProcessInstance in interface ProcessRuntime

startProcessInstance

public ProcessInstance startProcessInstance(long processInstanceId)
Specified by:
startProcessInstance in interface ProcessRuntime

addEventListener

public void addEventListener(ProcessEventListener listener)
Specified by:
addEventListener in interface ProcessEventManager

getProcessEventListeners

public Collection<ProcessEventListener> getProcessEventListeners()
Specified by:
getProcessEventListeners in interface ProcessEventManager

removeEventListener

public void removeEventListener(ProcessEventListener listener)
Specified by:
removeEventListener in interface ProcessEventManager

getKnowledgeBase

public KnowledgeBase getKnowledgeBase()
Specified by:
getKnowledgeBase in interface KnowledgeRuntime

getWorkItemManager

public WorkItemManager getWorkItemManager()
Specified by:
getWorkItemManager in interface ProcessRuntime

getEnvironment

public Environment getEnvironment()
Specified by:
getEnvironment in interface KnowledgeRuntime

getProcessRuntime

public InternalProcessRuntime getProcessRuntime()
Specified by:
getProcessRuntime in interface org.drools.common.InternalKnowledgeRuntime

getSessionConfiguration

public KnowledgeSessionConfiguration getSessionConfiguration()
Specified by:
getSessionConfiguration in interface KnowledgeRuntime

getTimerService

public TimerService getTimerService()
Specified by:
getTimerService in interface org.drools.common.InternalKnowledgeRuntime

startOperation

public void startOperation()
Specified by:
startOperation in interface org.drools.common.InternalKnowledgeRuntime

endOperation

public void endOperation()
Specified by:
endOperation in interface org.drools.common.InternalKnowledgeRuntime

executeQueuedActions

public void executeQueuedActions()
Specified by:
executeQueuedActions in interface org.drools.common.InternalKnowledgeRuntime

getActionQueue

public Queue<org.drools.common.WorkingMemoryAction> getActionQueue()
Specified by:
getActionQueue in interface org.drools.common.InternalKnowledgeRuntime

queueWorkingMemoryAction

public void queueWorkingMemoryAction(org.drools.common.WorkingMemoryAction action)
Specified by:
queueWorkingMemoryAction in interface org.drools.common.InternalKnowledgeRuntime

dispose

public void dispose()
Specified by:
dispose in interface StatefulKnowledgeSession

setId

public void setId(int id)
Specified by:
setId in interface org.drools.common.InternalKnowledgeRuntime

getId

public int getId()
Specified by:
getId in interface StatefulKnowledgeSession

setEndOperationListener

public void setEndOperationListener(org.drools.common.EndOperationListener listener)
Specified by:
setEndOperationListener in interface org.drools.common.InternalKnowledgeRuntime

fireAllRules

public int fireAllRules()
Specified by:
fireAllRules in interface StatefulRuleSession

fireAllRules

public int fireAllRules(int max)
Specified by:
fireAllRules in interface StatefulRuleSession

fireAllRules

public int fireAllRules(AgendaFilter agendaFilter)
Specified by:
fireAllRules in interface StatefulRuleSession

fireAllRules

public int fireAllRules(AgendaFilter agendaFilter,
                        int i)
Specified by:
fireAllRules in interface StatefulRuleSession

fireUntilHalt

public void fireUntilHalt()
Specified by:
fireUntilHalt in interface StatefulRuleSession

fireUntilHalt

public void fireUntilHalt(AgendaFilter agendaFilter)
Specified by:
fireUntilHalt in interface StatefulRuleSession

execute

public <T> T execute(Command<T> command)
Specified by:
execute in interface CommandExecutor

getCalendars

public Calendars getCalendars()
Specified by:
getCalendars in interface KnowledgeRuntime

getChannels

public Map<String,Channel> getChannels()
Specified by:
getChannels in interface KnowledgeRuntime

getGlobal

public Object getGlobal(String identifier)
Specified by:
getGlobal in interface KnowledgeRuntime

getGlobals

public Globals getGlobals()
Specified by:
getGlobals in interface KnowledgeRuntime

getSessionClock

public SessionClock getSessionClock()
Specified by:
getSessionClock in interface KnowledgeRuntime

registerChannel

public void registerChannel(String name,
                            Channel channel)
Specified by:
registerChannel in interface KnowledgeRuntime

registerExitPoint

public void registerExitPoint(String name,
                              ExitPoint exitPoint)
Specified by:
registerExitPoint in interface KnowledgeRuntime

setGlobal

public void setGlobal(String identifier,
                      Object object)
Specified by:
setGlobal in interface KnowledgeRuntime

unregisterChannel

public void unregisterChannel(String name)
Specified by:
unregisterChannel in interface KnowledgeRuntime

unregisterExitPoint

public void unregisterExitPoint(String name)
Specified by:
unregisterExitPoint in interface KnowledgeRuntime

getAgenda

public Agenda getAgenda()
Specified by:
getAgenda in interface WorkingMemory

getQueryResults

public QueryResults getQueryResults(String query,
                                    Object... arguments)
Specified by:
getQueryResults in interface WorkingMemory

getWorkingMemoryEntryPoint

public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String name)
Specified by:
getWorkingMemoryEntryPoint in interface WorkingMemory

getWorkingMemoryEntryPoints

public Collection<? extends WorkingMemoryEntryPoint> getWorkingMemoryEntryPoints()
Specified by:
getWorkingMemoryEntryPoints in interface WorkingMemory

halt

public void halt()
Specified by:
halt in interface WorkingMemory

openLiveQuery

public LiveQuery openLiveQuery(String query,
                               Object[] arguments,
                               ViewChangedEventListener listener)
Specified by:
openLiveQuery in interface WorkingMemory

getEntryPointId

public String getEntryPointId()
Specified by:
getEntryPointId in interface WorkingMemoryEntryPoint

getFactCount

public long getFactCount()
Specified by:
getFactCount in interface WorkingMemoryEntryPoint

getFactHandle

public FactHandle getFactHandle(Object object)
Specified by:
getFactHandle in interface WorkingMemoryEntryPoint

getFactHandles

public <T extends FactHandle> Collection<T> getFactHandles()
Specified by:
getFactHandles in interface WorkingMemoryEntryPoint

getFactHandles

public <T extends FactHandle> Collection<T> getFactHandles(ObjectFilter filter)
Specified by:
getFactHandles in interface WorkingMemoryEntryPoint

getObject

public Object getObject(FactHandle factHandle)
Specified by:
getObject in interface WorkingMemoryEntryPoint

getObjects

public Collection<Object> getObjects()
Specified by:
getObjects in interface WorkingMemoryEntryPoint

getObjects

public Collection<Object> getObjects(ObjectFilter filter)
Specified by:
getObjects in interface WorkingMemoryEntryPoint

insert

public FactHandle insert(Object object)
Specified by:
insert in interface WorkingMemoryEntryPoint

retract

public void retract(FactHandle handle)
Specified by:
retract in interface WorkingMemoryEntryPoint

update

public void update(FactHandle handle,
                   Object object)
Specified by:
update in interface WorkingMemoryEntryPoint

addEventListener

public void addEventListener(WorkingMemoryEventListener listener)
Specified by:
addEventListener in interface WorkingMemoryEventManager

addEventListener

public void addEventListener(AgendaEventListener listener)
Specified by:
addEventListener in interface WorkingMemoryEventManager

getAgendaEventListeners

public Collection<AgendaEventListener> getAgendaEventListeners()
Specified by:
getAgendaEventListeners in interface WorkingMemoryEventManager

getWorkingMemoryEventListeners

public Collection<WorkingMemoryEventListener> getWorkingMemoryEventListeners()
Specified by:
getWorkingMemoryEventListeners in interface WorkingMemoryEventManager

removeEventListener

public void removeEventListener(WorkingMemoryEventListener listener)
Specified by:
removeEventListener in interface WorkingMemoryEventManager

removeEventListener

public void removeEventListener(AgendaEventListener listener)
Specified by:
removeEventListener in interface WorkingMemoryEventManager

getLastIdleTimestamp

public long getLastIdleTimestamp()
Specified by:
getLastIdleTimestamp in interface org.drools.common.InternalKnowledgeRuntime


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