Package jadex.bpmn.model
Class MBpmnModel
- java.lang.Object
-
- jadex.bpmn.model.MIdElement
-
- jadex.bpmn.model.MAnnotationElement
-
- jadex.bpmn.model.MBpmnModel
-
- All Implemented Interfaces:
ICacheableModel
public class MBpmnModel extends MAnnotationElement implements ICacheableModel
Java representation of a bpmn model for xml description.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,MActivity>
allactivities
The cached activities of the model.protected java.util.Map<java.lang.String,MDataEdge>
alldataedges
The data edges.protected java.util.Map<java.lang.String,MSequenceEdge>
alledges
The cached edges of the model.protected java.util.Map<java.lang.String,MMessagingEdge>
allmessagingedges
The messaging edges.protected java.util.List<MDataEdge>
argdataedges
The incoming data edges for arguments.protected java.util.List<MArtifact>
artifacts
The artifacts.protected java.util.Map<java.lang.String,MIdElement>
associationsources
The association sources.protected java.util.Map<java.lang.String,MIdElement>
associationtargets
The association targets.protected java.util.Map<java.lang.String,java.util.List<MNamedIdElement>>
configurations
The configurations (config name -> start elements).static java.lang.String
EVENT_END_CANCEL
Constant for event end cancellation.static java.lang.String
EVENT_END_COMPENSATION
Constant for event end compensation.static java.lang.String
EVENT_END_EMPTY
Constant for event end empty.static java.lang.String
EVENT_END_ERROR
Constant for event end error.static java.lang.String
EVENT_END_MESSAGE
Constant for event end message.static java.lang.String
EVENT_END_SIGNAL
Constant for event end signal.static java.lang.String
EVENT_END_TERMINATE
Constant for event end cancellation.static java.lang.String
EVENT_INTERMEDIATE_CANCEL
Constant for event intermediate cancellation.static java.lang.String
EVENT_INTERMEDIATE_COMPENSATION
Constant for event intermediate compensation.static java.lang.String
EVENT_INTERMEDIATE_EMPTY
Constant for event start empty.static java.lang.String
EVENT_INTERMEDIATE_ERROR
Constant for event intermediate error.static java.lang.String
EVENT_INTERMEDIATE_MESSAGE
Constant for event intermediate message.static java.lang.String
EVENT_INTERMEDIATE_MULTIPLE
Constant for event intermediate multiple.static java.lang.String
EVENT_INTERMEDIATE_RULE
Constant for event intermediate rule.static java.lang.String
EVENT_INTERMEDIATE_SIGNAL
Constant for event intermediate signal.static java.lang.String
EVENT_INTERMEDIATE_TIMER
Constant for event intermediate timer.static java.lang.String
EVENT_START_EMPTY
Constant for event start empty.static java.lang.String
EVENT_START_MESSAGE
Constant for event start message.static java.lang.String
EVENT_START_MULTIPLE
Constant for event start multiple.static java.lang.String
EVENT_START_RULE
Constant for event start rule.static java.lang.String
EVENT_START_SIGNAL
Constant for event start signal.static java.lang.String
EVENT_START_TIMER
Constant for event start timer.protected java.util.Map<MSubProcess,java.util.List<MActivity>>
eventsubprocessstartevents
The cached event subprocess start events of the model.static java.lang.String
GATEWAY_DATABASED_EXCLUSIVE
Constant for gateway data based exclusive.static java.lang.String
GATEWAY_DATABASED_INCLUSIVE
Constant for gateway data based exclusive.static java.lang.String
GATEWAY_PARALLEL
Constant for gateway parallel.protected boolean
keepalive
The keep alive flag that allows processes to stay after end event.protected long
lastchecked
The last check date.protected long
lastmodified
The last modified date.protected java.util.List<MMessagingEdge>
messages
The messages.protected ModelInfo
modelinfo
The model info.protected java.util.Map<MIdElement,MIdElement>
parents
Parents of activities.protected java.util.List<MPool>
pools
The pools.static java.lang.String
PROPERTY_EVENT_ERROR
Property name for error events.static java.lang.String
PROPERTY_EVENT_RULE_CONDITION
Property name for condition of rule events.static java.lang.String
PROPERTY_EVENT_RULE_EVENTTYPES
Property name for event types of rule events.protected java.util.List<MDataEdge>
resultdataedges
The outgoing data edges for results.static java.lang.String
SIGNAL_EVENT_TRIGGER
The signal event handler trigger parameter name.static java.lang.String
SUBPROCESS
Constant for sub process.static java.lang.String
TASK
Constant for task.static java.lang.String
TRIGGER
The process trigger name.protected java.util.List<MActivity>
typematchedstartevents
The cached type-matched start events of the model.protected java.util.Map<java.lang.String,MContextVariable>
variables
The context variables (name -> [class, initexpression]).protected java.util.List<MActivity>
waitingevents
The cached instance-matched events that require waiting.-
Fields inherited from class jadex.bpmn.model.MAnnotationElement
annotations
-
Fields inherited from class jadex.bpmn.model.MIdElement
id, ID_GENERATOR
-
-
Constructor Summary
Constructors Constructor Description MBpmnModel()
Create a new model.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addActivityTargets(MActivity act)
Internal add activity targets.void
addAllSubActivities(MSubProcess proc, java.util.Map<java.lang.String,MActivity> activities)
Add all subactivities.void
addArgument(IArgument argument)
Add an argument.void
addArgumentDataEdge(MDataEdge edge)
Add an incoming edge.void
addArtifact(MArtifact artifact)
Add an artifact.protected MArtifact
addArtifacts(java.util.List<MArtifact> artifacts, java.util.Map<java.lang.String,MIdElement> sources)
Add artifacts.protected boolean
addAssociations(java.lang.String assosdesc, MIdElement target, java.util.Map<java.lang.String,MIdElement> targets)
Internal add associations.void
addContextVariable(MContextVariable variable)
Add a context variable declaration.protected void
addEdges(java.util.List<MSequenceEdge> tmp, java.util.Map<java.lang.String,MSequenceEdge> edges)
Add edges to the result map.void
addImport(java.lang.String imp)
Add an import.void
addMessagingEdge(MMessagingEdge message)
Add a message edge.void
addPool(MPool pool)
Add a pool.void
addProperty(java.lang.String name, java.lang.Object value)
Add a property.void
addResult(IArgument result)
Add a result.void
addResultDataEdge(MDataEdge edge)
Add an outgoing edge.void
addStartElement(java.lang.String config, MNamedIdElement element)
Add a start element for a configurations.protected void
addSubProcesses(MSubProcess subproc, java.util.Map<java.lang.String,MIdElement> sources)
Add sub processes.void
clearCaches()
Clears the model caches if stale.Tuple2<BiHashMap<java.lang.String,java.lang.String>,java.util.List<MIdElement>>
cloneElements(java.util.Set<MIdElement> originals)
Clones a set of elements.MActivity
getActivityById(java.lang.String id)
Get an activity by id.java.util.Map<java.lang.String,MActivity>
getAllActivities()
Get all activities.java.util.Map<java.lang.String,MIdElement>
getAllAssociationSources()
Get all association sources.java.util.Map<java.lang.String,MIdElement>
getAllAssociationTargets()
Get all association targets.java.util.Map<java.lang.String,MDataEdge>
getAllDataEdges()
Get all data edges.java.util.Map<java.lang.String,MEdge>
getAllEdges()
Get all edges.protected void
getAllEdges(MActivity act, java.util.Map<java.lang.String,MSequenceEdge> edges)
Internal get all edges.java.util.Map<java.lang.String,MMessagingEdge>
getAllMessagingEdges()
Get all message edges.java.util.Map<java.lang.String,MSequenceEdge>
getAllSequenceEdges()
Get all sequence edges.java.util.List<MDataEdge>
getArgumentDataEdges()
Get the incoming data edges.java.util.List<MArtifact>
getArtifacts()
Get the artifacts.java.lang.ClassLoader
getClassLoader()
Get the classloader.protected java.lang.String[]
getConfigurations()
Get the configurations.MContextVariable
getContextVariable(java.lang.String name)
Get a declared context variable.UnparsedExpression
getContextVariableExpression(java.lang.String name, java.lang.String config)
Get the initialization expression of a declared context variable.java.util.List<MContextVariable>
getContextVariables()
Get the declared context variables.java.util.Map<MSubProcess,java.util.List<MActivity>>
getEventSubProcessStartEventMapping()
Returns a mapping from event subprocesses to their start events.java.util.List<MActivity>
getEventSubProcessStartEvents()
Returns all start events in event subprocesses.java.lang.String
getFilename()
Get the filename.long
getLastChecked()
Get the last checked date.long
getLastModified()
Get the lastmodified date.java.util.List<MMessagingEdge>
getMessagingEdges()
Get the message edges.IModelInfo
getModelInfo()
Get the model info.java.lang.String
getName()
Get the name of the model.MIdElement
getParent(MIdElement element)
Gets the parent of an element.MPool
getPool(java.lang.String name)
Get the pools.java.util.List<MPool>
getPools()
Get the pools.IResourceIdentifier
getResourceIdentifier()
Get the resource identifier.java.util.List<MDataEdge>
getResultDataEdges()
Get the outgoing data edges.java.util.List<MActivity>
getStartActivities()
Get all start activities of the model.java.util.List<MActivity>
getStartActivities(java.lang.String poolname, java.lang.String lanename)
Get all start activities of the model.static java.util.List<MActivity>
getStartActivities(java.util.List<MActivity> activities)
Get all start activities form the supplied set of activities.java.util.List<MNamedIdElement>
getStartElements(java.lang.String config)
Get the pool lane.java.util.List<MActivity>
getTypeMatchedStartEvents()
Returns all start events triggered based on type matching.java.util.List<MActivity>
getWaitingEvents()
Returns all events waiting for outside triggers.protected void
initMatchedStartEventCache()
Initializes the type and instance event trigger caches.void
initModelInfo(java.lang.ClassLoader cl)
Init the model info.boolean
isContainedInParentSet(java.util.Set<MIdElement> mmap, MIdElement idelem)
Checks if an element or one of its parents is in a set.boolean
isKeepAlive()
Get the keepalive.void
removeArgumentDataEdge(MDataEdge edge)
Remove an outgoing edge.void
removeArtifact(MArtifact artifact)
Remove an artifact.void
removeConfiguration(java.lang.String config)
Removes a pool/lane activation for a configurations.void
removeContextVariable(MContextVariable variable)
Remove a context variable declaration.void
removeContextVariable(java.lang.String name)
Remove a context variable declaration.void
removeMessagingEdge(MMessagingEdge message)
Remove a message edge.void
removePool(MPool pool)
Remove a pool.void
removeResultDataEdge(MDataEdge edge)
Remove an outgoing edge.void
removeStartElement(java.lang.String config, MNamedIdElement element)
Removes a pool/lane activation for a configurations.void
setArgumentDataEdges(java.util.List<MDataEdge> indataedges)
Set the incoming data edges.void
setClassLoader(java.lang.ClassLoader classloader)
Set the classloader.void
setContextVariableExpression(java.lang.String config, UnparsedExpression exp)
Set the initialization expression of a declared context variable.void
setFilename(java.lang.String filename)
Set the filename.void
setKeepAlive(boolean keepalive)
Set the keepalive.void
setLastChecked(long lastchecked)
Set the last checked date.void
setLastModified(long lastmodified)
Set the lastmodified date.void
setName(java.lang.String name)
Set the name of the model.void
setPackage(java.lang.String packagename)
Set the package name.void
setResourceIdentifier(IResourceIdentifier rid)
Set the resource identifier.void
setResultDataEdges(java.util.List<MDataEdge> outdataedges)
Set the outgoing data edges.java.lang.String
toString()
Get a string representation of this AGR space type.-
Methods inherited from class jadex.bpmn.model.MAnnotationElement
addAnnotation, getAnnotations
-
Methods inherited from class jadex.bpmn.model.MIdElement
equals, getId, hashCode, setId
-
-
-
-
Field Detail
-
TASK
public static final java.lang.String TASK
Constant for task.- See Also:
- Constant Field Values
-
SUBPROCESS
public static final java.lang.String SUBPROCESS
Constant for sub process.- See Also:
- Constant Field Values
-
GATEWAY_PARALLEL
public static final java.lang.String GATEWAY_PARALLEL
Constant for gateway parallel.- See Also:
- Constant Field Values
-
GATEWAY_DATABASED_EXCLUSIVE
public static final java.lang.String GATEWAY_DATABASED_EXCLUSIVE
Constant for gateway data based exclusive.- See Also:
- Constant Field Values
-
GATEWAY_DATABASED_INCLUSIVE
public static final java.lang.String GATEWAY_DATABASED_INCLUSIVE
Constant for gateway data based exclusive.- See Also:
- Constant Field Values
-
EVENT_START_EMPTY
public static final java.lang.String EVENT_START_EMPTY
Constant for event start empty.- See Also:
- Constant Field Values
-
EVENT_START_MESSAGE
public static final java.lang.String EVENT_START_MESSAGE
Constant for event start message.- See Also:
- Constant Field Values
-
EVENT_START_TIMER
public static final java.lang.String EVENT_START_TIMER
Constant for event start timer.- See Also:
- Constant Field Values
-
EVENT_START_RULE
public static final java.lang.String EVENT_START_RULE
Constant for event start rule.- See Also:
- Constant Field Values
-
EVENT_START_SIGNAL
public static final java.lang.String EVENT_START_SIGNAL
Constant for event start signal.- See Also:
- Constant Field Values
-
EVENT_START_MULTIPLE
public static final java.lang.String EVENT_START_MULTIPLE
Constant for event start multiple.- See Also:
- Constant Field Values
-
EVENT_END_EMPTY
public static final java.lang.String EVENT_END_EMPTY
Constant for event end empty.- See Also:
- Constant Field Values
-
EVENT_END_ERROR
public static final java.lang.String EVENT_END_ERROR
Constant for event end error.- See Also:
- Constant Field Values
-
EVENT_END_MESSAGE
public static final java.lang.String EVENT_END_MESSAGE
Constant for event end message.- See Also:
- Constant Field Values
-
EVENT_END_SIGNAL
public static final java.lang.String EVENT_END_SIGNAL
Constant for event end signal.- See Also:
- Constant Field Values
-
EVENT_END_COMPENSATION
public static final java.lang.String EVENT_END_COMPENSATION
Constant for event end compensation.- See Also:
- Constant Field Values
-
EVENT_END_CANCEL
public static final java.lang.String EVENT_END_CANCEL
Constant for event end cancellation.- See Also:
- Constant Field Values
-
EVENT_END_TERMINATE
public static final java.lang.String EVENT_END_TERMINATE
Constant for event end cancellation.- See Also:
- Constant Field Values
-
EVENT_INTERMEDIATE_EMPTY
public static final java.lang.String EVENT_INTERMEDIATE_EMPTY
Constant for event start empty.- See Also:
- Constant Field Values
-
EVENT_INTERMEDIATE_ERROR
public static final java.lang.String EVENT_INTERMEDIATE_ERROR
Constant for event intermediate error.- See Also:
- Constant Field Values
-
EVENT_INTERMEDIATE_RULE
public static final java.lang.String EVENT_INTERMEDIATE_RULE
Constant for event intermediate rule.- See Also:
- Constant Field Values
-
EVENT_INTERMEDIATE_SIGNAL
public static final java.lang.String EVENT_INTERMEDIATE_SIGNAL
Constant for event intermediate signal.- See Also:
- Constant Field Values
-
EVENT_INTERMEDIATE_MESSAGE
public static final java.lang.String EVENT_INTERMEDIATE_MESSAGE
Constant for event intermediate message.- See Also:
- Constant Field Values
-
EVENT_INTERMEDIATE_TIMER
public static final java.lang.String EVENT_INTERMEDIATE_TIMER
Constant for event intermediate timer.- See Also:
- Constant Field Values
-
EVENT_INTERMEDIATE_COMPENSATION
public static final java.lang.String EVENT_INTERMEDIATE_COMPENSATION
Constant for event intermediate compensation.- See Also:
- Constant Field Values
-
EVENT_INTERMEDIATE_CANCEL
public static final java.lang.String EVENT_INTERMEDIATE_CANCEL
Constant for event intermediate cancellation.- See Also:
- Constant Field Values
-
EVENT_INTERMEDIATE_MULTIPLE
public static final java.lang.String EVENT_INTERMEDIATE_MULTIPLE
Constant for event intermediate multiple.- See Also:
- Constant Field Values
-
PROPERTY_EVENT_ERROR
public static final java.lang.String PROPERTY_EVENT_ERROR
Property name for error events.- See Also:
- Constant Field Values
-
PROPERTY_EVENT_RULE_CONDITION
public static final java.lang.String PROPERTY_EVENT_RULE_CONDITION
Property name for condition of rule events.- See Also:
- Constant Field Values
-
PROPERTY_EVENT_RULE_EVENTTYPES
public static final java.lang.String PROPERTY_EVENT_RULE_EVENTTYPES
Property name for event types of rule events.- See Also:
- Constant Field Values
-
SIGNAL_EVENT_TRIGGER
public static final java.lang.String SIGNAL_EVENT_TRIGGER
The signal event handler trigger parameter name. Used to put the trigger in the signal event arguments.- See Also:
- Constant Field Values
-
TRIGGER
public static final java.lang.String TRIGGER
The process trigger name. Used to put the trigger event in the process arguments.- See Also:
- Constant Field Values
-
pools
protected java.util.List<MPool> pools
The pools.
-
artifacts
protected java.util.List<MArtifact> artifacts
The artifacts.
-
messages
protected java.util.List<MMessagingEdge> messages
The messages.
-
resultdataedges
protected java.util.List<MDataEdge> resultdataedges
The outgoing data edges for results.
-
argdataedges
protected java.util.List<MDataEdge> argdataedges
The incoming data edges for arguments.
-
alledges
protected java.util.Map<java.lang.String,MSequenceEdge> alledges
The cached edges of the model.
-
allactivities
protected java.util.Map<java.lang.String,MActivity> allactivities
The cached activities of the model.
-
eventsubprocessstartevents
protected java.util.Map<MSubProcess,java.util.List<MActivity>> eventsubprocessstartevents
The cached event subprocess start events of the model.
-
waitingevents
protected java.util.List<MActivity> waitingevents
The cached instance-matched events that require waiting.
-
typematchedstartevents
protected java.util.List<MActivity> typematchedstartevents
The cached type-matched start events of the model.
-
parents
protected java.util.Map<MIdElement,MIdElement> parents
Parents of activities.
-
associationsources
protected java.util.Map<java.lang.String,MIdElement> associationsources
The association sources.
-
associationtargets
protected java.util.Map<java.lang.String,MIdElement> associationtargets
The association targets.
-
allmessagingedges
protected java.util.Map<java.lang.String,MMessagingEdge> allmessagingedges
The messaging edges.
-
alldataedges
protected java.util.Map<java.lang.String,MDataEdge> alldataedges
The data edges.
-
variables
protected java.util.Map<java.lang.String,MContextVariable> variables
The context variables (name -> [class, initexpression]).
-
configurations
protected java.util.Map<java.lang.String,java.util.List<MNamedIdElement>> configurations
The configurations (config name -> start elements).
-
keepalive
protected boolean keepalive
The keep alive flag that allows processes to stay after end event.
-
lastmodified
protected long lastmodified
The last modified date.
-
lastchecked
protected long lastchecked
The last check date.
-
modelinfo
protected ModelInfo modelinfo
The model info.
-
-
Method Detail
-
initModelInfo
public void initModelInfo(java.lang.ClassLoader cl)
Init the model info.
-
getPools
public java.util.List<MPool> getPools()
Get the pools.- Returns:
- The pools.
-
addPool
public void addPool(MPool pool)
Add a pool.- Parameters:
pool
- The pool.
-
removePool
public void removePool(MPool pool)
Remove a pool.- Parameters:
pool
- The pool.
-
getPool
public MPool getPool(java.lang.String name)
Get the pools.- Returns:
- The pools.
-
getArtifacts
public java.util.List<MArtifact> getArtifacts()
Get the artifacts.- Returns:
- The artifacts.
-
addArtifact
public void addArtifact(MArtifact artifact)
Add an artifact.- Parameters:
artifact
- The artifact.
-
removeArtifact
public void removeArtifact(MArtifact artifact)
Remove an artifact.- Parameters:
artifact
- The artifact.
-
getMessagingEdges
public java.util.List<MMessagingEdge> getMessagingEdges()
Get the message edges.- Returns:
- The message edges.
-
addMessagingEdge
public void addMessagingEdge(MMessagingEdge message)
Add a message edge.- Parameters:
message
- The message edfe.
-
removeMessagingEdge
public void removeMessagingEdge(MMessagingEdge message)
Remove a message edge.- Parameters:
message
- The message.
-
getAllEdges
public java.util.Map<java.lang.String,MEdge> getAllEdges()
Get all edges.- Returns:
- The edges (id -> edge).
-
getAllDataEdges
public java.util.Map<java.lang.String,MDataEdge> getAllDataEdges()
Get all data edges.- Returns:
- The data edges (id -> edge).
-
getAllMessagingEdges
public java.util.Map<java.lang.String,MMessagingEdge> getAllMessagingEdges()
Get all message edges.- Returns:
- The message edges (id -> edge).
-
getAllSequenceEdges
public java.util.Map<java.lang.String,MSequenceEdge> getAllSequenceEdges()
Get all sequence edges.- Returns:
- The sequence edges (id -> edge).
-
getAllActivities
public java.util.Map<java.lang.String,MActivity> getAllActivities()
Get all activities.- Returns:
- The activities (id -> activity).
-
addAllSubActivities
public void addAllSubActivities(MSubProcess proc, java.util.Map<java.lang.String,MActivity> activities)
Add all subactivities.
-
getAllEdges
protected void getAllEdges(MActivity act, java.util.Map<java.lang.String,MSequenceEdge> edges)
Internal get all edges.- Parameters:
sub
- The subprocess.edges
- The edges (results will be added to this).
-
addEdges
protected void addEdges(java.util.List<MSequenceEdge> tmp, java.util.Map<java.lang.String,MSequenceEdge> edges)
Add edges to the result map.- Parameters:
tmp
- The list of edges.edges
- The result map (id -> edge).
-
getAllAssociationTargets
public java.util.Map<java.lang.String,MIdElement> getAllAssociationTargets()
Get all association targets.- Returns:
- A map of association targets (association id -> target).
-
addActivityTargets
protected void addActivityTargets(MActivity act)
Internal add activity targets.- Parameters:
act
- The activity.
-
addAssociations
protected boolean addAssociations(java.lang.String assosdesc, MIdElement target, java.util.Map<java.lang.String,MIdElement> targets)
Internal add associations.- Parameters:
target
- The target.targets
- The targets result map.
-
getAllAssociationSources
public java.util.Map<java.lang.String,MIdElement> getAllAssociationSources()
Get all association sources.- Returns:
- The map of association sources (association id -> source).
-
addSubProcesses
protected void addSubProcesses(MSubProcess subproc, java.util.Map<java.lang.String,MIdElement> sources)
Add sub processes.- Parameters:
subproc
- The sub process.sources
- The sources result map.
-
addResultDataEdge
public void addResultDataEdge(MDataEdge edge)
Add an outgoing edge.- Parameters:
edge
- The edge.
-
removeResultDataEdge
public void removeResultDataEdge(MDataEdge edge)
Remove an outgoing edge.- Parameters:
edge
- The edge.
-
addArgumentDataEdge
public void addArgumentDataEdge(MDataEdge edge)
Add an incoming edge.- Parameters:
edge
- The edge.
-
removeArgumentDataEdge
public void removeArgumentDataEdge(MDataEdge edge)
Remove an outgoing edge.- Parameters:
edge
- The edge.
-
getArgumentDataEdges
public java.util.List<MDataEdge> getArgumentDataEdges()
Get the incoming data edges.- Returns:
- the incoming data edges.
-
setArgumentDataEdges
public void setArgumentDataEdges(java.util.List<MDataEdge> indataedges)
Set the incoming data edges.- Parameters:
indataedges
- The incoming data edges.
-
getResultDataEdges
public java.util.List<MDataEdge> getResultDataEdges()
Get the outgoing data edges.- Returns:
- the outgoing data edges.
-
setResultDataEdges
public void setResultDataEdges(java.util.List<MDataEdge> outdataedges)
Set the outgoing data edges.- Parameters:
outdataedges
- The outgoing data edges.
-
addArtifacts
protected MArtifact addArtifacts(java.util.List<MArtifact> artifacts, java.util.Map<java.lang.String,MIdElement> sources)
Add artifacts.- Parameters:
artifacts
- The list of artifacts.sources
- The sources result map (association id -> art).
-
getName
public java.lang.String getName()
Get the name of the model.- Returns:
- The name of the model.
-
setName
public void setName(java.lang.String name)
Set the name of the model.- Parameters:
name
- The name to set.
-
getStartActivities
public java.util.List<MActivity> getStartActivities()
Get all start activities of the model.- Returns:
- A non-empty List of start activities or null, if none.
-
getStartActivities
public java.util.List<MActivity> getStartActivities(java.lang.String poolname, java.lang.String lanename)
Get all start activities of the model.- Returns:
- A non-empty List of start activities or null, if none.
-
addStartElement
public void addStartElement(java.lang.String config, MNamedIdElement element)
Add a start element for a configurations.- Parameters:
config
- The configuration name.element
- The start element name.
-
getStartElements
public java.util.List<MNamedIdElement> getStartElements(java.lang.String config)
Get the pool lane.- Parameters:
config
- The configurations.
-
removeStartElement
public void removeStartElement(java.lang.String config, MNamedIdElement element)
Removes a pool/lane activation for a configurations.- Parameters:
config
- The configuration name.
-
removeConfiguration
public void removeConfiguration(java.lang.String config)
Removes a pool/lane activation for a configurations.- Parameters:
config
- The configuration name.
-
addImport
public void addImport(java.lang.String imp)
Add an import.- Parameters:
imp
- The import statement.
-
setPackage
public void setPackage(java.lang.String packagename)
Set the package name.- Parameters:
packagename
- The package name to set.
-
toString
public java.lang.String toString()
Get a string representation of this AGR space type.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this AGR space type.
-
getStartActivities
public static java.util.List<MActivity> getStartActivities(java.util.List<MActivity> activities)
Get all start activities form the supplied set of activities. Start activities are those without incoming edges.- Returns:
- A non-empty List of start activities or null, if none.
-
addContextVariable
public void addContextVariable(MContextVariable variable)
Add a context variable declaration.- Parameters:
variable
- The variable.
-
removeContextVariable
public void removeContextVariable(java.lang.String name)
Remove a context variable declaration.- Parameters:
name
- The variable name.
-
removeContextVariable
public void removeContextVariable(MContextVariable variable)
Remove a context variable declaration.- Parameters:
variable
- The variable.
-
getContextVariables
public java.util.List<MContextVariable> getContextVariables()
Get the declared context variables.- Returns:
- A set of variable names.
-
getContextVariable
public MContextVariable getContextVariable(java.lang.String name)
Get a declared context variable.- Parameters:
name
- The variable name.- Returns:
- The variable.
-
getContextVariableExpression
public UnparsedExpression getContextVariableExpression(java.lang.String name, java.lang.String config)
Get the initialization expression of a declared context variable.- Parameters:
name
- The variable name.- Returns:
- The initialization expression (if any).
-
setContextVariableExpression
public void setContextVariableExpression(java.lang.String config, UnparsedExpression exp)
Set the initialization expression of a declared context variable.- Parameters:
name
- The variable name.
-
setFilename
public void setFilename(java.lang.String filename)
Set the filename.- Parameters:
filename
- The filename to set.
-
getLastModified
public long getLastModified()
Get the lastmodified date.- Specified by:
getLastModified
in interfaceICacheableModel
- Returns:
- The lastmodified date.
-
setLastModified
public void setLastModified(long lastmodified)
Set the lastmodified date.- Parameters:
lastmodified
- The lastmodified date to set.
-
getLastChecked
public long getLastChecked()
Get the last checked date.- Specified by:
getLastChecked
in interfaceICacheableModel
- Returns:
- The last checked date
-
setLastChecked
public void setLastChecked(long lastchecked)
Set the last checked date.- Specified by:
setLastChecked
in interfaceICacheableModel
- Parameters:
lastchecked
- The last checked date to set.
-
getConfigurations
protected java.lang.String[] getConfigurations()
Get the configurations.- Returns:
- The configuration.
-
addArgument
public void addArgument(IArgument argument)
Add an argument.- Parameters:
argument
- The argument.
-
addProperty
public void addProperty(java.lang.String name, java.lang.Object value)
Add a property.
-
addResult
public void addResult(IArgument result)
Add a result.- Parameters:
result
- The result.
-
getModelInfo
public IModelInfo getModelInfo()
Get the model info.- Returns:
- The model info.
-
isKeepAlive
public boolean isKeepAlive()
Get the keepalive.- Returns:
- the keepalive.
-
setKeepAlive
public void setKeepAlive(boolean keepalive)
Set the keepalive.- Parameters:
keepalive
- The keepalive to set.
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Get the classloader.- Returns:
- the classloader.
-
setClassLoader
public void setClassLoader(java.lang.ClassLoader classloader)
Set the classloader.- Parameters:
classloader
- The classloader to set.
-
setResourceIdentifier
public void setResourceIdentifier(IResourceIdentifier rid)
Set the resource identifier.- Parameters:
rid
- The resource identifier.
-
getResourceIdentifier
public IResourceIdentifier getResourceIdentifier()
Get the resource identifier.- Returns:
- The resource identifier.
-
getFilename
public java.lang.String getFilename()
Get the filename.- Specified by:
getFilename
in interfaceICacheableModel
- Returns:
- The filename.
-
getParent
public MIdElement getParent(MIdElement element)
Gets the parent of an element.- Parameters:
element
- The element.- Returns:
- The parent.
-
getTypeMatchedStartEvents
public java.util.List<MActivity> getTypeMatchedStartEvents()
Returns all start events triggered based on type matching.- Returns:
- Events triggered based on type matching.
-
getEventSubProcessStartEvents
public java.util.List<MActivity> getEventSubProcessStartEvents()
Returns all start events in event subprocesses.- Returns:
- Start events in event subprocesses.
-
getEventSubProcessStartEventMapping
public java.util.Map<MSubProcess,java.util.List<MActivity>> getEventSubProcessStartEventMapping()
Returns a mapping from event subprocesses to their start events.- Returns:
- The mapping
-
getWaitingEvents
public java.util.List<MActivity> getWaitingEvents()
Returns all events waiting for outside triggers.- Returns:
- Events waiting for outside triggers.
-
initMatchedStartEventCache
protected void initMatchedStartEventCache()
Initializes the type and instance event trigger caches.
-
cloneElements
public Tuple2<BiHashMap<java.lang.String,java.lang.String>,java.util.List<MIdElement>> cloneElements(java.util.Set<MIdElement> originals)
Clones a set of elements.- Parameters:
originals
- The original elements.- Returns:
- Mapping of original IDs to cloned IDs, cloned elements.
-
isContainedInParentSet
public boolean isContainedInParentSet(java.util.Set<MIdElement> mmap, MIdElement idelem)
Checks if an element or one of its parents is in a set.- Parameters:
mmap
- The set.idelem
- The element- Returns:
- True, if contained.
-
getActivityById
public MActivity getActivityById(java.lang.String id)
Get an activity by id.- Parameters:
id
- The id.- Returns:
- The activity.
-
clearCaches
public void clearCaches()
Clears the model caches if stale.
-
-