public class ProcessThread
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| protected MActivity | activityThe next activity. | 
| protected boolean | canceledIs the task canceled. | 
| protected ICancelable | cancelinfoThe wait info. | 
| protected java.util.Map<java.lang.String,java.lang.Object> | dataThe data of the current or last activity. | 
| protected java.util.Map<java.lang.String,java.lang.Object> | dataedgesThe data of the current data edges. | 
| protected MSequenceEdge | edgeThe last edge (if any). | 
| protected java.lang.Exception | exceptionThe exception that has just occurred in the process (if any). | 
| protected java.lang.String | idThe thread id. | 
| int | idcntThe id counter for sub processes. | 
| protected IInternalAccess | instanceThe Bpmn instance. | 
| protected IResultCommand<java.lang.Boolean,java.lang.Void> | loopcmdThe loop command. | 
| protected ProcessThread | parentThe parent process thread. | 
| protected SubProcessActivityHandler.SubprocessResultHandler | resulthandlerThe subprocess intermediate result received command. | 
| java.util.Map<java.lang.String,SplitInfo> | splitinfosThe split infos. | 
| protected java.util.List<ProcessThread> | subthreadsThe subthreads. | 
| protected ITask | taskThe current task. | 
| protected IFilter<java.lang.Object> | waitfilterThe wait filter. | 
| protected boolean | waitingIs the process in a waiting state. | 
| Constructor and Description | 
|---|
| ProcessThread(MActivity activity,
             ProcessThread parent,
             IInternalAccess instance)Create a new process instance. | 
| ProcessThread(MActivity activity,
             ProcessThread parent,
             IInternalAccess instance,
             boolean passive)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(java.lang.String pool,
         java.lang.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. | 
| MActivity | getActivity()Get the activity. | 
| java.util.Set<java.lang.String> | getAllParameterNames()Get the name of all parameters. | 
| java.util.Set<ProcessThread> | getAllThreads()Get all threads of the context and all subcontexts. | 
| protected IInternalBpmnComponentFeature | getBpmnFeature(IInternalAccess ia)Get the bpmn feature. | 
| MBpmnModel | getBpmnModel()Get the model. | 
| java.util.Map<java.lang.String,java.lang.Object> | getData()Get the data. | 
| java.util.Map<java.lang.String,java.lang.Object> | getDataEdges()Get the data edges. | 
| protected java.util.Map<java.lang.String,java.lang.Object> | getDataEdgeValues() | 
| java.lang.Exception | getException()Get the exception (if any). | 
| ProcessThread | getExecutableThread(java.lang.String pool,
                   java.lang.String lane)Get an executable thread in the context or its sub contexts. | 
| java.lang.String | getId()Get the id. | 
| IInternalAccess | getInstance()Get the instance. | 
| MSequenceEdge | getLastEdge()Get the last edge (if any). | 
| IResultCommand<java.lang.Boolean,java.lang.Void> | getLoopCommand()Get the loopcmd. | 
| MActivity | getModelElement()Get the model element. | 
| protected java.lang.String | getNextChildId()Get a cnt for subprocesses. | 
| java.lang.String[] | getParameterNames()Get the name of all parameters. | 
| java.util.Map<java.lang.String,java.lang.Object> | getParameters()Get the parameters. | 
| java.lang.Object | getParameterValue(java.lang.String name)Get the value of a parameter. | 
| ProcessThread | getParent()Get the parent. | 
| java.lang.Object | getPropertyValue(java.lang.String name)Get the value of a property. | 
| java.lang.Object | getPropertyValue(java.lang.String name,
                MActivity activity)Hack: method is necessary because thread.activity is not always 
  the activity to execute in case of multiple event. | 
| SplitInfo | getSplitInfo(java.lang.String id)Get a specific split info, if available. | 
| java.util.Collection<SplitInfo> | getSplitInfos()Get the split infos. | 
| java.util.List<ProcessThread> | getSubthreads()Get the subthreads. | 
| ITask | getTask()Gets the current task. | 
| ProcessThread | getThread(java.lang.String id)Get a thread per id. | 
| IFilter<java.lang.Object> | getWaitFilter()Get the wait filter. | 
| ICancelable | getWaitInfo()Get the waitinfo. | 
| boolean | hasOwnParameterValue(java.lang.String name)Test if a parameter has been set on activity. | 
| boolean | hasParameterValue(java.lang.String name)Test if a parameter has been set on activity. | 
| boolean | hasPropertyValue(java.lang.String name)Test, if a property is declared. | 
| boolean | hasSubthreads()Test if thread has subthreads. | 
| protected void | internalSetParameterValue(java.lang.String name,
                         java.lang.Object key,
                         java.lang.Object value,
                         ProcessThread start)Set the value of a parameter. | 
| boolean | isCanceled()Is the current task canceled? | 
| boolean | isFinished(java.lang.String pool,
          java.lang.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(java.lang.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. | 
| protected void | scheduleExecution()Schedule notification of this thread. | 
| void | setActivity(MActivity activity)Set the next activity. | 
| void | setCanceled(boolean canceled)Set the canceled state. | 
| void | setDataEdgeValue(java.lang.String name,
                java.lang.Object value)Set the value of a parameter. | 
| void | setException(java.lang.Exception exception)Set the exception. | 
| void | setLastEdge(MSequenceEdge edge)Set the last edge. | 
| void | setLoopCommand(IResultCommand<java.lang.Boolean,java.lang.Void> loopcmd)Set the loopcmd. | 
| void | setNonWaiting()Set to non waiting. | 
| void | setOrCreateParameterValue(java.lang.String name,
                         java.lang.Object value)Set or create a parameter value directly in this thread. | 
| void | setOrCreateParameterValue(java.lang.String name,
                         java.lang.Object key,
                         java.lang.Object value)Set or create a parameter value directly in this thread. | 
| void | setParameterValue(java.lang.String name,
                 java.lang.Object value)Set the value of a parameter. | 
| void | setParameterValue(java.lang.String name,
                 java.lang.Object key,
                 java.lang.Object value)Set the value of a parameter. | 
| void | setParent(ProcessThread parent)Set the parent. | 
| void | setTask(ITask task)Sets the current task. | 
| void | setWaitFilter(IFilter<java.lang.Object> waitfilter)Set the wait filter. | 
| void | setWaitInfo(ICancelable cancelinfo)Set the process waiting info. | 
| void | setWaiting(boolean waiting)Set the waiting state. | 
| java.lang.String | toString()Create a string representation of this process thread. | 
| void | updateParametersAfterStep(MActivity activity,
                         IInternalAccess instance)Remove in parameters after step. | 
| void | updateParametersBeforeStep(IInternalAccess instance)Update parameters based on edge inscriptions and initial values. | 
protected java.lang.String id
protected MActivity activity
protected MSequenceEdge edge
protected java.util.Map<java.lang.String,java.lang.Object> data
protected java.util.Map<java.lang.String,java.lang.Object> dataedges
protected ProcessThread parent
protected java.util.List<ProcessThread> subthreads
protected IInternalAccess instance
protected java.lang.Exception exception
protected boolean waiting
protected ICancelable cancelinfo
protected IFilter<java.lang.Object> waitfilter
protected ITask task
protected boolean canceled
public int idcnt
public java.util.Map<java.lang.String,SplitInfo> splitinfos
protected IResultCommand<java.lang.Boolean,java.lang.Void> loopcmd
protected SubProcessActivityHandler.SubprocessResultHandler resulthandler
public ProcessThread(MActivity activity,
                     ProcessThread parent,
                     IInternalAccess instance)
activity - The current activity.public ProcessThread(MActivity activity,
                     ProcessThread parent,
                     IInternalAccess instance,
                     boolean passive)
activity - The current activity.public MBpmnModel getBpmnModel()
public java.lang.String getId()
public MActivity getActivity()
public void setActivity(MActivity activity)
public boolean isCanceled()
public void setCanceled(boolean canceled)
canceled - True, if canceled.public ITask getTask()
public void setTask(ITask task)
task - The current task.public MSequenceEdge getLastEdge()
public void setLastEdge(MSequenceEdge edge)
edge - The edge.public boolean isWaiting()
public void setWaiting(boolean waiting)
public void setNonWaiting()
protected void scheduleExecution()
public void setWaitInfo(ICancelable cancelinfo)
waiting - The waiting info.public ICancelable getWaitInfo()
public IFilter<java.lang.Object> getWaitFilter()
public void setWaitFilter(IFilter<java.lang.Object> waitfilter)
waitfilter - The waitfilter to set.public ProcessThread createCopy()
public void copy(ProcessThread ret)
public boolean hasOwnParameterValue(java.lang.String name)
name - The parameter name.public boolean hasParameterValue(java.lang.String name)
name - The parameter name.public MActivity getModelElement()
public java.lang.Object getParameterValue(java.lang.String name)
name - The parameter name.public java.util.Map<java.lang.String,java.lang.Object> getParameters()
public void setDataEdgeValue(java.lang.String name,
                             java.lang.Object value)
name - The parameter name.value - The parameter value.public void setParameterValue(java.lang.String name,
                              java.lang.Object value)
name - The parameter name.value - The parameter value.public void setParameterValue(java.lang.String name,
                              java.lang.Object key,
                              java.lang.Object value)
name - The parameter name.value - The parameter value.protected void internalSetParameterValue(java.lang.String name,
                                         java.lang.Object key,
                                         java.lang.Object value,
                                         ProcessThread start)
name - The parameter name.value - The parameter value.public void setOrCreateParameterValue(java.lang.String name,
                                      java.lang.Object value)
public void setOrCreateParameterValue(java.lang.String name,
                                      java.lang.Object key,
                                      java.lang.Object value)
public void removeParameterValue(java.lang.String name)
name - The parameter name.public java.lang.String[] getParameterNames()
public java.util.Set<java.lang.String> getAllParameterNames()
public java.lang.Object getPropertyValue(java.lang.String name)
name - The property name.public java.lang.Object getPropertyValue(java.lang.String name,
                                         MActivity activity)
name - The property name.public boolean hasPropertyValue(java.lang.String name)
name - The property name.public java.lang.Exception getException()
public void setException(java.lang.Exception exception)
exception - The exception.public IInternalAccess getInstance()
public java.util.Map<java.lang.String,java.lang.Object> getDataEdges()
public java.util.Map<java.lang.String,java.lang.Object> getData()
public boolean belongsTo(java.lang.String pool,
                         java.lang.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 updateParametersBeforeStep(IInternalAccess instance)
instance - The calling BPMN instance.protected java.util.Map<java.lang.String,java.lang.Object> getDataEdgeValues()
public void updateParametersAfterStep(MActivity activity,
                                      IInternalAccess instance)
instance - The calling BPMN instance.public java.util.Collection<SplitInfo> getSplitInfos()
public SplitInfo getSplitInfo(java.lang.String id)
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 java.util.Set<ProcessThread> getAllThreads()
public ProcessThread getParent()
public void setParent(ProcessThread parent)
parent - The parent to set.public java.util.List<ProcessThread> getSubthreads()
public boolean hasSubthreads()
public boolean isFinished(java.lang.String pool,
                          java.lang.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(java.lang.String pool, java.lang.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 getThread(java.lang.String id)
id - The thread id.protected java.lang.String getNextChildId()
public IResultCommand<java.lang.Boolean,java.lang.Void> getLoopCommand()
public void setLoopCommand(IResultCommand<java.lang.Boolean,java.lang.Void> loopcmd)
loopcmd - The loopcmd to set.public void notifyFinished()
protected IInternalBpmnComponentFeature getBpmnFeature(IInternalAccess ia)
public java.lang.String toString()
toString in class java.lang.Object