public class ProcessThread extends Object implements jadex.bpmn.model.task.ITaskContext
Modifier and Type | Field and Description |
---|---|
int |
idcnt
The id counter for sub processes.
|
Map<String,SplitInfo> |
splitinfos
The split infos.
|
Constructor and Description |
---|
ProcessThread(jadex.bpmn.model.MActivity activity,
ProcessThread parent,
BpmnInterpreter instance)
Create a new process instance.
|
ProcessThread(String id,
jadex.bpmn.model.MActivity activity,
ProcessThread parent,
BpmnInterpreter instance)
Create a new process instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addExternalThread(ProcessThread thread)
Add an external thread to this context.
|
void |
addSplitInfo(SplitInfo spi)
Add a split info.
|
void |
addThread(ProcessThread thread)
Add a thread to this context.
|
boolean |
belongsTo(String pool,
String lane)
Test if the thread belongs to the given pool and/or lane.
|
void |
copy(ProcessThread ret)
Create a copy of this thread (e.g.
|
ProcessThread |
createCopy()
Create a copy of this thread (e.g.
|
jadex.bpmn.model.MActivity |
getActivity()
Get the activity.
|
Set<String> |
getAllParameterNames()
Get the name of all parameters.
|
Set<ProcessThread> |
getAllThreads()
Get all threads of the context and all subcontexts.
|
jadex.bpmn.model.MBpmnModel |
getBpmnModel()
Get the model.
|
Map<String,Object> |
getData()
Get the data.
|
Map<String,Object> |
getDataEdges()
Get the data edges.
|
Exception |
getException()
Get the exception (if any).
|
ProcessThread |
getExecutableThread(String pool,
String lane)
Get an executable thread in the context or its sub contexts.
|
String |
getId()
Get the id.
|
BpmnInterpreter |
getInstance()
Get the instance.
|
jadex.bpmn.model.MSequenceEdge |
getLastEdge()
Get the last edge (if any).
|
IResultCommand<Boolean,Void> |
getLoopCommand()
Get the loopcmd.
|
jadex.bpmn.model.MActivity |
getModelElement()
Get the model element.
|
String[] |
getParameterNames()
Get the name of all parameters.
|
Map<String,Object> |
getParameters()
Get the parameters.
|
Object |
getParameterValue(String name)
Get the value of a parameter.
|
ProcessThread |
getParent()
Get the parent.
|
Object |
getPropertyValue(String name)
Get the value of a property.
|
Object |
getPropertyValue(String name,
jadex.bpmn.model.MActivity activity)
Hack: method is necessary because thread.activity is not always
the activity to execute in case of multiple event.
|
SplitInfo |
getSplitInfo(String id)
Get a specific split info, if available.
|
Collection<SplitInfo> |
getSplitInfos()
Get the split infos.
|
List<ProcessThread> |
getSubthreads()
Get the subthreads.
|
jadex.bpmn.model.task.ITask |
getTask()
Gets the current task.
|
IFilter<Object> |
getWaitFilter()
Get the wait filter.
|
ICancelable |
getWaitInfo()
Get the waitinfo.
|
boolean |
hasOwnParameterValue(String name)
Test if a parameter has been set on activity.
|
boolean |
hasParameterValue(String name)
Test if a parameter has been set on activity.
|
boolean |
hasPropertyValue(String name)
Test, if a property is declared.
|
boolean |
hasSubthreads()
Test if thread has subthreads.
|
boolean |
isCanceled()
Is the current task canceled?
|
boolean |
isFinished(String pool,
String lane)
The context is finished, when there are no (more) threads to execute.
|
boolean |
isWaiting()
Is the process in a waiting state (i.e.
|
void |
notifyFinished()
Method that can be used to determine (override) that the thread is finished.
|
void |
removeParameterValue(String name)
Remove the value of a parameter.
|
void |
removeSplitInfo(SplitInfo spi)
Remove the split info.
|
void |
removeSubcontext()
Remove a sub context but keep the corresponding thread.
|
void |
removeThread(ProcessThread thread)
Remove a thread from this context.
|
void |
setActivity(jadex.bpmn.model.MActivity activity)
Set the next activity.
|
void |
setCanceled(boolean canceled)
Set the canceled state.
|
void |
setDataEdgeValue(String name,
Object value)
Set the value of a parameter.
|
void |
setException(Exception exception)
Set the exception.
|
void |
setLastEdge(jadex.bpmn.model.MSequenceEdge edge)
Set the last edge.
|
void |
setLoopCommand(IResultCommand<Boolean,Void> loopcmd)
Set the loopcmd.
|
void |
setNonWaiting()
Set to non waiting.
|
void |
setOrCreateParameterValue(String name,
Object value)
Set or create a parameter value directly in this thread.
|
void |
setOrCreateParameterValue(String name,
Object key,
Object value)
Set or create a parameter value directly in this thread.
|
void |
setParameterValue(String name,
Object value)
Set the value of a parameter.
|
void |
setParameterValue(String name,
Object key,
Object value)
Set the value of a parameter.
|
void |
setParent(ProcessThread parent)
Set the parent.
|
void |
setTask(jadex.bpmn.model.task.ITask task)
Sets the current task.
|
void |
setWaitFilter(IFilter<Object> waitfilter)
Set the wait filter.
|
void |
setWaitInfo(ICancelable cancelinfo)
Set the process waiting info.
|
void |
setWaiting(boolean waiting)
Set the waiting state.
|
String |
toString()
Create a string representation of this process thread.
|
void |
updateParametersAfterStep(jadex.bpmn.model.MActivity activity,
BpmnInterpreter instance)
Remove in parameters after step.
|
public ProcessThread(jadex.bpmn.model.MActivity activity, ProcessThread parent, BpmnInterpreter instance)
activity
- The current activity.public ProcessThread(String id, jadex.bpmn.model.MActivity activity, ProcessThread parent, BpmnInterpreter instance)
activity
- The current activity.public jadex.bpmn.model.MBpmnModel getBpmnModel()
getBpmnModel
in interface jadex.bpmn.model.task.ITaskContext
public String getId()
public jadex.bpmn.model.MActivity getActivity()
getActivity
in interface jadex.bpmn.model.task.ITaskContext
public void setActivity(jadex.bpmn.model.MActivity activity)
public boolean isCanceled()
public void setCanceled(boolean canceled)
canceled
- True, if canceled.public jadex.bpmn.model.task.ITask getTask()
public void setTask(jadex.bpmn.model.task.ITask task)
task
- The current task.public jadex.bpmn.model.MSequenceEdge getLastEdge()
public void setLastEdge(jadex.bpmn.model.MSequenceEdge edge)
edge
- The edge.public boolean isWaiting()
public void setWaiting(boolean waiting)
public void setNonWaiting()
public void setWaitInfo(ICancelable cancelinfo)
waiting
- The waiting info.public ICancelable getWaitInfo()
public void setWaitFilter(IFilter<Object> waitfilter)
waitfilter
- The waitfilter to set.public ProcessThread createCopy()
public void copy(ProcessThread ret)
public boolean hasOwnParameterValue(String name)
name
- The parameter name.public boolean hasParameterValue(String name)
hasParameterValue
in interface jadex.bpmn.model.task.ITaskContext
name
- The parameter name.public jadex.bpmn.model.MActivity getModelElement()
getModelElement
in interface jadex.bpmn.model.task.ITaskContext
public Object getParameterValue(String name)
getParameterValue
in interface jadex.bpmn.model.task.ITaskContext
name
- The parameter name.public Map<String,Object> getParameters()
public void setDataEdgeValue(String name, Object value)
name
- The parameter name.value
- The parameter value.public void setParameterValue(String name, Object value)
setParameterValue
in interface jadex.bpmn.model.task.ITaskContext
name
- The parameter name.value
- The parameter value.public void setParameterValue(String name, Object key, Object value)
setParameterValue
in interface jadex.bpmn.model.task.ITaskContext
name
- The parameter name.value
- The parameter value.public void setOrCreateParameterValue(String name, Object value)
setOrCreateParameterValue
in interface jadex.bpmn.model.task.ITaskContext
public void setOrCreateParameterValue(String name, Object key, Object value)
setOrCreateParameterValue
in interface jadex.bpmn.model.task.ITaskContext
public void removeParameterValue(String name)
name
- The parameter name.public String[] getParameterNames()
public Set<String> getAllParameterNames()
public Object getPropertyValue(String name)
getPropertyValue
in interface jadex.bpmn.model.task.ITaskContext
name
- The property name.public Object getPropertyValue(String name, jadex.bpmn.model.MActivity activity)
name
- The property name.public boolean hasPropertyValue(String name)
name
- The property name.public Exception getException()
public void setException(Exception exception)
exception
- The exception.public BpmnInterpreter getInstance()
public boolean belongsTo(String pool, String lane)
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 void updateParametersAfterStep(jadex.bpmn.model.MActivity activity, BpmnInterpreter instance)
instance
- The calling BPMN instance.public Collection<SplitInfo> getSplitInfos()
public void addSplitInfo(SplitInfo spi)
public void removeSplitInfo(SplitInfo spi)
public void removeSubcontext()
context
- The sub context to be removed.public void removeThread(ProcessThread thread)
thread
- The thread to be removed.public void addThread(ProcessThread thread)
thread
- The thread to be added.public void addExternalThread(ProcessThread thread)
thread
- The thread to be added.public Set<ProcessThread> getAllThreads()
public ProcessThread getParent()
public void setParent(ProcessThread parent)
parent
- The parent to set.public List<ProcessThread> getSubthreads()
public boolean hasSubthreads()
public boolean isFinished(String pool, String lane)
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 ProcessThread getExecutableThread(String pool, String lane)
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 IResultCommand<Boolean,Void> getLoopCommand()
public void setLoopCommand(IResultCommand<Boolean,Void> loopcmd)
loopcmd
- The loopcmd to set.public void notifyFinished()
Copyright © 2015. All Rights Reserved.