Class ProcessEngineAgent
- java.lang.Object
- 
- jadex.platform.service.processengine.ProcessEngineAgent
 
- 
- All Implemented Interfaces:
- IInternalProcessEngineService,- IProcessEngineService
 
 public class ProcessEngineAgent extends java.lang.Object implements IProcessEngineService, IInternalProcessEngineService Agent that implements the bpmn monitoring starter interface.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classProcessEngineAgent.EventInfostatic classProcessEngineAgent.ProcessInfoProcess info struct.
 - 
Field SummaryFields Modifier and Type Field Description protected IInternalAccessagentThe agent.protected java.util.Set<Future<java.lang.Void>>creatingThe set of currently creating process instances.protected EventMappereventmapperThe event mapper.protected java.util.Map<IComponentIdentifier,ProcessEngineAgent.ProcessInfo>processesThe managed process instances.protected java.util.Map<Tuple2<java.lang.String,IResourceIdentifier>,java.util.List<java.lang.Runnable>>remcomsThe remove commands.protected java.util.Map<java.lang.String,java.util.Set<java.lang.Object>>waitqueueThe event waitqueue.protected java.util.Map<java.lang.String,java.util.Set<Tuple2<java.lang.String,IResourceIdentifier>>>waitqueuetypesThe event types to be put in waitqueue.
 - 
Constructor SummaryConstructors Constructor Description ProcessEngineAgent()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ISubscriptionIntermediateFuture<ProcessEngineEvent>addBpmnModel(java.lang.String model, IResourceIdentifier urid)Add a bpmn model that is monitored for start events.protected Tuple2<IFuture<java.lang.Void>,ISubscriptionIntermediateFuture<CMSStatusEvent>>addCronJob(CronJob<CMSStatusEvent> cj, Tuple2<java.lang.String,IResourceIdentifier> key)Add a cron job to the cron service.IFuture<java.lang.String>addEventMatcher(java.lang.String[] events, UnparsedExpression uexp, java.lang.String[] imports, java.util.Map<java.lang.String,java.lang.Object> vals, boolean remove, IResultCommand<IFuture<java.lang.Void>,java.lang.Object> cmd)Register an event description to be notified, when the event happens.protected voidaddRemoveCommand(java.lang.Runnable com, Tuple2<java.lang.String,IResourceIdentifier> key)protected static CronCreateCommandcreateCronCreateCommand(IResourceIdentifier rid, java.lang.String model, java.lang.String mactid)Create a new cron create component command.protected IFuture<java.lang.Void>createProcessInstance(java.lang.Object event, EventMapper.ModelDetails det)protected IFuture<java.lang.Void>defer()protected voiddispatchFromWaitqueue(java.lang.String type, boolean add)Dispatch events from the waitqueue.protected voiddispatchToWaitqueue(java.lang.Object event, java.lang.String type)protected voidextractDomainEventTypes(MActivity mevent, Tuple2<java.lang.String,IResourceIdentifier> model, java.util.Set<java.lang.String> evs)IIntermediateFuture<Tuple2<java.lang.String,IResourceIdentifier>>getBpmnModels()Get the currently monitored processes.IFuture<java.lang.Void>init()Init method.protected IFuture<java.lang.Void>internalProcessEvent(java.lang.Object event, java.lang.String atype, boolean add)Process an event and get the consequence events.IFuture<java.lang.Void>processEvent(java.lang.Object event, java.lang.String type)Process an event and get the consequence events.IFuture<java.lang.Void>removeBpmnModel(java.lang.String model, IResourceIdentifier rid)Remove a bpmn model.IFuture<java.lang.Void>removeEventMatcher(java.lang.String id)Register an event description to be notified, when the event happens.
 
- 
- 
- 
Field Detail- 
agentprotected IInternalAccess agent The agent.
 - 
remcomsprotected java.util.Map<Tuple2<java.lang.String,IResourceIdentifier>,java.util.List<java.lang.Runnable>> remcoms The remove commands.
 - 
processesprotected java.util.Map<IComponentIdentifier,ProcessEngineAgent.ProcessInfo> processes The managed process instances.
 - 
eventmapperprotected EventMapper eventmapper The event mapper.
 - 
waitqueueprotected java.util.Map<java.lang.String,java.util.Set<java.lang.Object>> waitqueue The event waitqueue.
 - 
waitqueuetypesprotected java.util.Map<java.lang.String,java.util.Set<Tuple2<java.lang.String,IResourceIdentifier>>> waitqueuetypes The event types to be put in waitqueue.
 - 
creatingprotected java.util.Set<Future<java.lang.Void>> creating The set of currently creating process instances.
 
- 
 - 
Method Detail- 
initpublic IFuture<java.lang.Void> init() Init method.
 - 
addBpmnModelpublic ISubscriptionIntermediateFuture<ProcessEngineEvent> addBpmnModel(java.lang.String model, IResourceIdentifier urid) Add a bpmn model that is monitored for start events.- Specified by:
- addBpmnModelin interface- IProcessEngineService
- Parameters:
- model- The bpmn model
- rid- The resource identifier (null for all platform jar resources).
 
 - 
extractDomainEventTypesprotected void extractDomainEventTypes(MActivity mevent, Tuple2<java.lang.String,IResourceIdentifier> model, java.util.Set<java.lang.String> evs) 
 - 
removeBpmnModelpublic IFuture<java.lang.Void> removeBpmnModel(java.lang.String model, IResourceIdentifier rid) Remove a bpmn model.- Specified by:
- removeBpmnModelin interface- IProcessEngineService
- Parameters:
- model- The bpmn model
- rid- The resource identifier (null for all platform jar resources).
 
 - 
getBpmnModelspublic IIntermediateFuture<Tuple2<java.lang.String,IResourceIdentifier>> getBpmnModels() Get the currently monitored processes.- Specified by:
- getBpmnModelsin interface- IProcessEngineService
- Returns:
- The currently observed bpmn models.
 
 - 
processEventpublic IFuture<java.lang.Void> processEvent(java.lang.Object event, java.lang.String type) Process an event and get the consequence events.- Specified by:
- processEventin interface- IProcessEngineService
 
 - 
internalProcessEventprotected IFuture<java.lang.Void> internalProcessEvent(java.lang.Object event, java.lang.String atype, boolean add) Process an event and get the consequence events. Called internally when event should not be added to waitqueue.
 - 
createProcessInstanceprotected IFuture<java.lang.Void> createProcessInstance(java.lang.Object event, EventMapper.ModelDetails det) 
 - 
dispatchToWaitqueueprotected void dispatchToWaitqueue(java.lang.Object event, java.lang.String type)
 - 
dispatchFromWaitqueueprotected void dispatchFromWaitqueue(java.lang.String type, boolean add)Dispatch events from the waitqueue.- Parameters:
- type- The event type. Events of that type will be redispatched.
 
 - 
deferprotected IFuture<java.lang.Void> defer() 
 - 
addEventMatcherpublic IFuture<java.lang.String> addEventMatcher(java.lang.String[] events, UnparsedExpression uexp, java.lang.String[] imports, java.util.Map<java.lang.String,java.lang.Object> vals, boolean remove, IResultCommand<IFuture<java.lang.Void>,java.lang.Object> cmd) Register an event description to be notified, when the event happens.- Specified by:
- addEventMatcherin interface- IInternalProcessEngineService
- Returns:
- An id to be used for deregistration.
 
 - 
removeEventMatcherpublic IFuture<java.lang.Void> removeEventMatcher(java.lang.String id) Register an event description to be notified, when the event happens.- Specified by:
- removeEventMatcherin interface- IInternalProcessEngineService
 
 - 
addCronJobprotected Tuple2<IFuture<java.lang.Void>,ISubscriptionIntermediateFuture<CMSStatusEvent>> addCronJob(CronJob<CMSStatusEvent> cj, Tuple2<java.lang.String,IResourceIdentifier> key) Add a cron job to the cron service. Also adds a remove command that is triggered when someone calls removeBPMN.
 - 
addRemoveCommandprotected void addRemoveCommand(java.lang.Runnable com, Tuple2<java.lang.String,IResourceIdentifier> key)
 - 
createCronCreateCommandprotected static CronCreateCommand createCronCreateCommand(IResourceIdentifier rid, java.lang.String model, java.lang.String mactid) Create a new cron create component command.
 
- 
 
-