public class BpmnComponentFeature extends jadex.bridge.component.impl.AbstractComponentFeature implements IBpmnComponentFeature, IInternalBpmnComponentFeature
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,IActivityHandler> |
activityhandlers
The activity handlers.
|
static java.util.Map<java.lang.String,IActivityHandler> |
DEFAULT_ACTIVITY_HANDLERS
The activity execution handlers (activity type -> handler).
|
static java.util.Map<java.lang.String,IStepHandler> |
DEFAULT_STEP_HANDLERS
The step execution handlers (activity type -> handler).
|
static jadex.bridge.component.IComponentFeatureFactory |
FACTORY
The factory.
|
protected int |
idcnt
The thread id counter.
|
protected java.util.List<java.lang.Object> |
messages
The messages waitqueue.
|
protected jadex.rules.eca.RuleSystem |
rulesystem
The rule system.
|
protected java.util.Map<java.lang.String,IStepHandler> |
stephandlers
The step handlers.
|
protected java.util.List<jadex.bridge.IConnection> |
streams
The streams waitqueue.
|
protected ProcessThread |
topthread
The top level process thread.
|
cinfo, component, guesser
TYPE_ACTIVITY, TYPE_THREAD
Constructor and Description |
---|
BpmnComponentFeature(jadex.bridge.IInternalAccess component,
jadex.bridge.component.ComponentCreationInfo cinfo)
Factory method constructor for instance level.
|
Modifier and Type | Method and Description |
---|---|
protected void |
construct(java.util.Map<java.lang.String,IActivityHandler> activityhandlers,
java.util.Map<java.lang.String,IStepHandler> stephandlers)
Init method holds constructor code for both implementations.
|
jadex.bridge.service.types.monitoring.IMonitoringEvent |
createActivityEvent(java.lang.String type,
ProcessThread thread,
jadex.bpmn.model.MActivity activity)
Create an activity event (start, end).
|
ProcessThreadInfo |
createProcessThreadInfo(ProcessThread thread)
Create a new process thread info for logging / debug tools.
|
jadex.bridge.service.types.monitoring.IMonitoringEvent |
createThreadEvent(java.lang.String type,
ProcessThread thread)
Create a thread event (creation, modification, termination).
|
IActivityHandler |
getActivityHandler(jadex.bpmn.model.MActivity activity)
Get the activity handler for an activity.
|
java.lang.Object |
getContextVariable(java.lang.String name)
Get the value of the given context variable.
|
java.util.List<java.lang.Object> |
getMessages()
Get the messages.
|
protected jadex.bpmn.model.MBpmnModel |
getModel() |
java.util.List<jadex.bridge.IConnection> |
getStreams()
Get the streams.
|
ProcessThread |
getTopLevelThread()
Get the top level thread (is not executed and just acts as top level thread container).
|
jadex.commons.IValueFetcher |
getValueFetcher()
The feature can inject parameters for expression evaluation
by providing an optional value fetcher.
|
boolean |
hasContextVariable(java.lang.String name)
Test if the given context variable is declared.
|
jadex.commons.future.IFuture<java.lang.Void> |
init()
Initialize the feature.
|
protected void |
initContextVariables()
Init context variables.
|
protected boolean |
isCurrentActivity(jadex.bpmn.model.MActivity activity,
ProcessThread thread)
Test if the notification is relevant for the current thread.
|
boolean |
isFinished()
Check, if the process has terminated.
|
boolean |
isFinished(java.lang.String pool,
java.lang.String lane)
Check, if the process has terminated.
|
boolean |
isReady()
Check if the process is ready, i.e.
|
boolean |
isReady(java.lang.String pool,
java.lang.String lane)
Check if the process is ready, i.e.
|
void |
notify(jadex.bpmn.model.MActivity activity,
ProcessThread thread,
java.lang.Object event)
Method that should be called, when an activity is finished and the following activity should be scheduled.
|
void |
setContextVariable(java.lang.String name,
java.lang.Object value)
Set the value of the given context variable.
|
void |
setContextVariable(java.lang.String name,
java.lang.Object key,
java.lang.Object value)
Set the value of the given context variable.
|
void |
step(jadex.bpmn.model.MActivity activity,
jadex.bridge.IInternalAccess instance,
ProcessThread thread,
java.lang.Object event)
Make a process step, i.e.
|
public static final jadex.bridge.component.IComponentFeatureFactory FACTORY
public static final java.util.Map<java.lang.String,IActivityHandler> DEFAULT_ACTIVITY_HANDLERS
public static final java.util.Map<java.lang.String,IStepHandler> DEFAULT_STEP_HANDLERS
protected jadex.rules.eca.RuleSystem rulesystem
protected java.util.Map<java.lang.String,IActivityHandler> activityhandlers
protected java.util.Map<java.lang.String,IStepHandler> stephandlers
protected ProcessThread topthread
protected java.util.List<java.lang.Object> messages
protected java.util.List<jadex.bridge.IConnection> streams
protected int idcnt
public BpmnComponentFeature(jadex.bridge.IInternalAccess component, jadex.bridge.component.ComponentCreationInfo cinfo)
public jadex.commons.future.IFuture<java.lang.Void> init()
init
in interface jadex.bridge.component.IComponentFeature
init
in class jadex.bridge.component.impl.AbstractComponentFeature
protected void construct(java.util.Map<java.lang.String,IActivityHandler> activityhandlers, java.util.Map<java.lang.String,IStepHandler> stephandlers)
protected void initContextVariables()
public boolean hasContextVariable(java.lang.String name)
hasContextVariable
in interface IInternalBpmnComponentFeature
name
- The variable name.public java.lang.Object getContextVariable(java.lang.String name)
getContextVariable
in interface IInternalBpmnComponentFeature
name
- The variable name.public void setContextVariable(java.lang.String name, java.lang.Object value)
setContextVariable
in interface IInternalBpmnComponentFeature
name
- The variable name.value
- The variable value.public void setContextVariable(java.lang.String name, java.lang.Object key, java.lang.Object value)
setContextVariable
in interface IInternalBpmnComponentFeature
name
- The variable name.value
- The variable value.public jadex.bridge.service.types.monitoring.IMonitoringEvent createThreadEvent(java.lang.String type, ProcessThread thread)
createThreadEvent
in interface IInternalBpmnComponentFeature
public jadex.bridge.service.types.monitoring.IMonitoringEvent createActivityEvent(java.lang.String type, ProcessThread thread, jadex.bpmn.model.MActivity activity)
createActivityEvent
in interface IInternalBpmnComponentFeature
public ProcessThreadInfo createProcessThreadInfo(ProcessThread thread)
public IActivityHandler getActivityHandler(jadex.bpmn.model.MActivity activity)
getActivityHandler
in interface IInternalBpmnComponentFeature
actvity
- The activity.public ProcessThread getTopLevelThread()
getTopLevelThread
in interface IInternalBpmnComponentFeature
public void step(jadex.bpmn.model.MActivity activity, jadex.bridge.IInternalAccess instance, ProcessThread thread, java.lang.Object event)
step
in interface IInternalBpmnComponentFeature
activity
- The activity to execute.instance
- The process instance.thread
- The process thread.public void notify(jadex.bpmn.model.MActivity activity, ProcessThread thread, java.lang.Object event)
notify
in interface IInternalBpmnComponentFeature
activity
- The timing event activity.instance
- The process instance.thread
- The process thread.event
- The event that has occurred, if any.protected boolean isCurrentActivity(jadex.bpmn.model.MActivity activity, ProcessThread thread)
public boolean isReady()
isReady
in interface IInternalBpmnComponentFeature
pool
- The pool to be executed or null for any.lane
- The lane to be executed or null for any. Nested lanes may be addressed by dot-notation, e.g. 'OuterLane.InnerLane'.public boolean isReady(java.lang.String pool, java.lang.String lane)
isReady
in interface IInternalBpmnComponentFeature
pool
- The pool to be executed or null for any.lane
- The lane to be executed or null for any. Nested lanes may be addressed by dot-notation, e.g. 'OuterLane.InnerLane'.public boolean isFinished()
isFinished
in interface IInternalBpmnComponentFeature
pool
- The pool to be executed or null for any.lane
- The lane to be executed or null for any. Nested lanes may be addressed by dot-notation, e.g. 'OuterLane.InnerLane'.public boolean isFinished(java.lang.String pool, java.lang.String lane)
isFinished
in interface IInternalBpmnComponentFeature
pool
- The pool to be executed or null for any.lane
- The lane to be executed or null for any. Nested lanes may be addressed by dot-notation, e.g. 'OuterLane.InnerLane'.public java.util.List<java.lang.Object> getMessages()
getMessages
in interface IInternalBpmnComponentFeature
public java.util.List<jadex.bridge.IConnection> getStreams()
getStreams
in interface IInternalBpmnComponentFeature
protected jadex.bpmn.model.MBpmnModel getModel()
public jadex.commons.IValueFetcher getValueFetcher()
getValueFetcher
in interface jadex.bridge.component.IComponentFeature
getValueFetcher
in class jadex.bridge.component.impl.AbstractComponentFeature