Package jadex.bpmn.model
Class MActivity
- Direct Known Subclasses:
MSubProcess
,MTask
Base class for all kinds of activities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
The activity type.The argument injection targets.protected jadex.common.MethodInfo
The body method cached for speed.protected jadex.common.MethodInfo
The body method cached for speed.protected jadex.common.ClassInfo
The class.protected List
<jadex.common.FieldInfo> The component injection targets.protected boolean
The flag if this activity is an event handler.The event handlers.static final String
The interface name.The incoming messages description.protected String
The incoming sequence edges description.The incoming data edges.protected List
<MMessagingEdge> The incoming message edges.protected List
<MSequenceEdge> The incoming sequence edges.static final String
Constant for the sequential result execution mode .static final String
Is service constant.protected MLane
The lane (if any).protected String
The lane description.protected boolean
The looping flag.static final String
The method name.protected static final jadex.common.MethodInfo
The outgoing data edges.The outgoing messages description.protected String
The outgoing sequence edges description.protected List
<MMessagingEdge> The outgoing message edges.protected List
<MSequenceEdge> The outgoing sequence edges.protected jadex.collection.IndexMap
<String, MParameter> The parameters (name -> MParameter).protected MPool
The pool.The properties (name -> MProperty).The result injection targets.static final String
Constant for the result param name.static final String
Constant for the result param type (needed for distinguishing collection results from single values).static final String
Constant for the return parameter name.protected boolean
The throwing flag.protected String
The type.Fields inherited from class jadex.bpmn.model.MAssociationTarget
associations, associationsdescription
Fields inherited from class jadex.bpmn.model.MNamedIdElement
description, name
Fields inherited from class jadex.bpmn.model.MAnnotationElement
annotations
Fields inherited from class jadex.bpmn.model.MIdElement
id, ID_GENERATOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEventHandler
(MActivity eventhandler) Add an event handler.void
addIncomingDataEdge
(MDataEdge edge) Add an incoming edge.void
Add an incoming message description.void
Add an incoming message edge.void
Add an incoming edge.void
addOutgoingDataEdge
(MDataEdge edge) Add an outgoing edge.void
Add an outgoing message description.void
Add an outgoing message edge.void
Add an outgoing edge.void
addParameter
(MParameter param) Add a parameter.void
addProperty
(MProperty prop) Add a property.void
addProperty
(String name, String value) Add a simple string-based property.void
addProperty
(String name, String value, boolean string) Add a simple string-based property.Get the activity type.jadex.collection.IndexMap
<String, MParameter> getAllParameters
(Map<String, Object> params, String[] imports, ClassLoader cl) Get the parameters.Get and save the body method info.jadex.common.MethodInfo
Get and save the body method info.jadex.common.MethodInfo
Get and save the cancel method info.jadex.common.ClassInfo
getClazz()
Get the class.List
<jadex.common.FieldInfo> Get and save the body method info.Get the event handlers.static List
<jadex.common.FieldInfo> getFields
(Class<?> body, Class<? extends Annotation> type) Get method with an annotation.Get the incoming data edges.Get the incoming messages description.Get the incoming message edges.Get the incoming edges.void
getIncomingSequenceEdges
(List<MSequenceEdge> inseqedges) Set the incoming edges.Get the xml incoming edges description.getLane()
Get the lane of the activity.Get the xml lane description.static jadex.common.MethodInfo
getMethod
(Class<?> body, Class<? extends Annotation> type) Get method with an annotation.Get the outgoing data edges.Get the xml outgoing messages descriptions.Get the outgoing message edges.void
getOutgoingMessagingEdges
(List<MMessagingEdge> outmsgedges) Set the outgoing message edges.Get the outgoing sequence edges.Get the xml outgoing sequence edges desription.getParameter
(String name) Get a parameter by name.jadex.collection.IndexMap
<String, MParameter> Get the parameters.getParameters
(String[] dirs) Get parameters of specific direction(s).getParsedPropertyValue
(String name) Get a property value from the model.getPool()
Get the pool of the activity.Get the properties.String[]
Returns the property names.jadex.common.UnparsedExpression
getPropertyValue
(String name) Get a property value from the model.getPropertyValueString
(String name) Get a property value string from the model.Get and save the body method info.getType()
Get the type.boolean
Test, if a property is declared and has nonull unparsed expression.boolean
hasParameter
(String name) Test if a prop exists.boolean
hasProperty
(String name) Test if a property exists.boolean
hasPropertyValue
(String name) Test, if a property is declared and has nonull unparsed expression.boolean
Test if activity is a end event.boolean
isEvent()
Test if activity is event.boolean
Get the eventhandler.boolean
Test if activity is gateway.boolean
Test if activity is an intermediate event.boolean
Test if the activity is looping.boolean
Test if activity is event.boolean
Test if activity is event.boolean
Test if activity is a start event.boolean
Test if the activity is throwing.void
removeEventHandler
(MActivity eventhandler) Remove an event handler.void
Remove an outgoing edge.void
Remove an incoming message description.void
Remove an incoming message edge.void
Remove an incoming edge.void
Remove an outgoing edge.void
Remove an outgoing message description.void
Remove an outgoing message edge.void
Remove an outgoing edge.void
removeParameter
(MParameter param) Remove a parameter.void
removeParameter
(String name) Remove a parameter.void
Remove a parameter.void
removeProperty
(MProperty prop) Remove a property.void
removeProperty
(String propname) Remove a property.void
setActivityType
(String activitytype) Set the activity type.void
setClazz
(jadex.common.ClassInfo clazz) Set the class.void
setEventHandler
(boolean eventhandler) Set the eventhandler.void
setIncomingDataEdges
(List<MDataEdge> indataedges) Set the incoming data edges.void
setIncomingMessagingEdges
(List<MMessagingEdge> inmsgedges) Set the incoming message edges.void
setIncomingSequenceEdgesDescription
(String incomingedges) Set the xml incoming edges description.void
Set the lane of the activity.void
setLaneDescription
(String lanedescription) Set the xml lane description.void
setLooping
(boolean looping) Set the looping state.void
setOutgoingDataEdges
(List<MDataEdge> outdataedges) Set the outgoing data edges.void
setOutgoingSequenceEdges
(List<MSequenceEdge> outseqedges) Set the outgoing sequence edges.void
setOutgoingSequenceEdgesDescription
(String outgoingedges) Set the xml outgoing edges desription.void
setParameter
(String name, String value, Class<?> type, boolean string, String direction) Set a parameter value: a) val==null -> remove property b) val!=null invalid input: '&'invalid input: '&' !hasProp(name) -> addProp(name, val) c) val!=null invalid input: '&'invalid input: '&' hasProp(name) -> setInitialVal(val)void
setParameters
(jadex.collection.IndexMap<String, MParameter> parameters) Sets the parameters.void
Set the pool of the activity.void
setProperties
(jadex.collection.IndexMap<String, MProperty> properties) Set the properties.void
setProperty
(String name, String value, boolean string) Set a property value: a) val==null -> remove property b) val!=null invalid input: '&'invalid input: '&' !hasProp(name) -> addProp(name, val) c) val!=null invalid input: '&'invalid input: '&' hasProp(name) -> setInitialVal(val)void
setPropertyValue
(String name, jadex.common.UnparsedExpression exp) Legacy conversion from unparsed expression.void
setPropertyValue
(String name, jadex.javaparser.IParsedExpression exp) Legacy conversion to unparsed expression.void
setThrowing
(boolean throwing) Set the throwing state.void
Set the type.toString()
Create a string representation of this activity.Methods inherited from class jadex.bpmn.model.MAssociationTarget
addAssociation, getAssociations, getAssociationsDescription, removeAssociation, setAssociationsDescription
Methods inherited from class jadex.bpmn.model.MNamedIdElement
getDescription, getName, setDescription, setName
Methods inherited from class jadex.bpmn.model.MAnnotationElement
addAnnotation, getAnnotations
Methods inherited from class jadex.bpmn.model.MIdElement
equals, getId, hashCode, setId
-
Field Details
-
MI_NOTFOUND
protected static final jadex.common.MethodInfo MI_NOTFOUND -
RETURNPARAM
Constant for the return parameter name.- See Also:
-
IFACE
The interface name.- See Also:
-
METHOD
The method name.- See Also:
-
ISSERVICE
Is service constant.- See Also:
-
ISSEQUENTIAL
Constant for the sequential result execution mode .- See Also:
-
RESULTNAME
Constant for the result param name.- See Also:
-
RESULTTYPE
Constant for the result param type (needed for distinguishing collection results from single values).- See Also:
-
lanedescription
The lane description. -
outgoingsequenceedgesdescription
The outgoing sequence edges description. -
incomingsequenceedgesdescription
The incoming sequence edges description. -
incomingmessagesdescriptions
The incoming messages description. -
outgoingmessagesdescriptions
The outgoing messages description. -
outseqedges
The outgoing sequence edges. -
inseqedges
The incoming sequence edges. -
outmsgedges
The outgoing message edges. -
inmsgedges
The incoming message edges. -
outdataedges
The outgoing data edges. -
indataedges
The incoming data edges. -
type
The type. -
activitytype
The activity type. -
looping
protected boolean loopingThe looping flag. -
throwing
protected boolean throwingThe throwing flag. -
eventhandlers
The event handlers. -
pool
The pool. -
lane
The lane (if any). -
eventhandler
protected boolean eventhandlerThe flag if this activity is an event handler. -
parameters
The parameters (name -> MParameter). -
properties
The properties (name -> MProperty). -
clazz
protected jadex.common.ClassInfo clazzThe class. -
bodymethod
protected volatile jadex.common.MethodInfo bodymethodThe body method cached for speed. -
cancelmethod
protected volatile jadex.common.MethodInfo cancelmethodThe body method cached for speed. -
componentinjections
The component injection targets. -
argumentinjections
The argument injection targets. -
resultinjections
The result injection targets.
-
-
Constructor Details
-
MActivity
public MActivity()
-
-
Method Details
-
getLaneDescription
Get the xml lane description.- Returns:
- The lane description.
-
setLaneDescription
Set the xml lane description.- Parameters:
lanedescription
- The lane description to set.
-
getOutgoingSequenceEdgesDescription
Get the xml outgoing sequence edges desription.- Returns:
- The outgoing sequence edges description.
-
setOutgoingSequenceEdgesDescription
Set the xml outgoing edges desription.- Parameters:
outgoingedges
- The outgoing edges to set.
-
getIncomingSequenceEdgesDescription
Get the xml incoming edges description.- Returns:
- The incoming edges description.
-
setIncomingSequenceEdgesDescription
Set the xml incoming edges description.- Parameters:
incomingedges
- The incoming edges to set.
-
getOutgoingMessagesDescriptions
Get the xml outgoing messages descriptions.- Returns:
- The outgoing messages descriptions.
-
addOutgoingMessageDescription
Add an outgoing message description.- Parameters:
desc
- The description.
-
removeOutgoingMessageDescription
Remove an outgoing message description.- Parameters:
desc
- The description.
-
getIncomingMessagesDescriptions
Get the incoming messages description.- Returns:
- The incoming messages descriptions.
-
addIncomingMessageDescription
Add an incoming message description.- Parameters:
desc
- The description.
-
removeIncomingMessageDescription
Remove an incoming message description.- Parameters:
desc
- The description.
-
getOutgoingSequenceEdges
Get the outgoing sequence edges.- Returns:
- The outgoing edges.
-
setOutgoingSequenceEdges
Set the outgoing sequence edges.- Parameters:
outseqedges
- The outgoing sequence edges.
-
addOutgoingSequenceEdge
Add an outgoing edge.- Parameters:
edge
- The edge.
-
removeOutgoingSequenceEdge
Remove an outgoing edge.- Parameters:
edge
- The edge.
-
getIncomingSequenceEdges
Get the incoming edges.- Returns:
- The incoming edges.
-
getIncomingSequenceEdges
Set the incoming edges.- Parameters:
inseqedges
- The incoming edges.
-
addIncomingSequenceEdge
Add an incoming edge.- Parameters:
edge
- The edge.
-
removeIncomingSequenceEdge
Remove an incoming edge.- Parameters:
edge
- The edge.
-
getOutgoingMessagingEdges
Get the outgoing message edges.- Returns:
- The outgoing message edges.
-
getOutgoingMessagingEdges
Set the outgoing message edges.- Parameters:
outmsgedges
- The outgoing message edges.
-
addOutgoingMessagingEdge
Add an outgoing message edge.- Parameters:
edge
- The edge.
-
removeOutgoingMessagingEdge
Remove an outgoing message edge.- Parameters:
edge
- The edge.
-
getIncomingMessagingEdges
Get the incoming message edges.- Returns:
- the incoming message edges.
-
setIncomingMessagingEdges
Set the incoming message edges.- Parameters:
inmsgedges
- The incoming message edges.
-
addIncomingMessagingEdge
Add an incoming message edge.- Parameters:
edge
- The edge.
-
removeIncomingMessagingEdge
Remove an incoming message edge.- Parameters:
edge
- The edge.
-
addOutgoingDataEdge
Add an outgoing edge.- Parameters:
edge
- The edge.
-
removeOutgoingDataEdge
Remove an outgoing edge.- Parameters:
edge
- The edge.
-
addIncomingDataEdge
Add an incoming edge.- Parameters:
edge
- The edge.
-
removeIncomingDataEdge
Remove an outgoing edge.- Parameters:
edge
- The edge.
-
getIncomingDataEdges
Get the incoming data edges.- Returns:
- the incoming data edges.
-
setIncomingDataEdges
Set the incoming data edges.- Parameters:
indataedges
- The incoming data edges.
-
getOutgoingDataEdges
Get the outgoing data edges.- Returns:
- the outgoing data edges.
-
setOutgoingDataEdges
Set the outgoing data edges.- Parameters:
outdataedges
- The outgoing data edges.
-
getType
Get the type.- Returns:
- The type.
-
setType
Set the type.- Parameters:
type
- The type to set.
-
getActivityType
Get the activity type.- Returns:
- The activity type.
-
setActivityType
Set the activity type.- Parameters:
activitytype
- The activity type to set.
-
isLooping
public boolean isLooping()Test if the activity is looping.- Returns:
- True, if looping.
-
setLooping
public void setLooping(boolean looping) Set the looping state.- Parameters:
looping
- The looping state to set.
-
isThrowing
public boolean isThrowing()Test if the activity is throwing.- Returns:
- True, if throwing.
-
setThrowing
public void setThrowing(boolean throwing) Set the throwing state.- Parameters:
throwing
- The throwing state to set.
-
getEventHandlers
Get the event handlers.- Returns:
- The event handlers.
-
addEventHandler
Add an event handler.- Parameters:
eventhandler
- The event handler.
-
removeEventHandler
Remove an event handler.- Parameters:
eventhandler
- The event handler.
-
getParameters
Get the parameters.- Returns:
- The parameters.
-
getParameter
Get a parameter by name. -
getAllParameters
public jadex.collection.IndexMap<String,MParameter> getAllParameters(Map<String, Object> params, String[] imports, ClassLoader cl) Get the parameters.- Returns:
- The parameters.
-
getParameters
Get parameters of specific direction(s).- Returns:
- The in parameters.
-
setParameters
Sets the parameters.- Parameters:
parameters
- The parameters.
-
hasParameter
Test if a prop exists. -
addParameter
Add a parameter.- Parameters:
param
- The parameter.
-
removeParameter
Remove a parameter.- Parameters:
param
- The parameter.
-
removeParameter
Remove a parameter.- Parameters:
param
- The parameter.
-
removeParameters
public void removeParameters()Remove a parameter.- Parameters:
param
- The parameter.
-
setPropertyValue
Legacy conversion from unparsed expression.- Parameters:
name
- Nameexp
-
-
setPropertyValue
Legacy conversion to unparsed expression.- Parameters:
name
- Nameexp
-
-
getPropertyValueString
Get a property value string from the model.- Parameters:
name
- The name.
-
getPropertyValue
Get a property value from the model.- Parameters:
name
- The name.
-
getParsedPropertyValue
Get a property value from the model.- Parameters:
name
- The name.
-
getPropertyNames
Returns the property names.- Returns:
- The property names.
-
hasPropertyValue
Test, if a property is declared and has nonull unparsed expression.- Parameters:
name
- The property name.- Returns:
- True, if the property is declared.
-
hasInitialPropertyValue
Test, if a property is declared and has nonull unparsed expression.- Parameters:
name
- The property name.- Returns:
- True, if the property is declared.
-
getProperties
Get the properties.- Returns:
- The properties.
-
setProperties
Set the properties.- Parameters:
properties
-
-
hasProperty
Test if a property exists. -
addProperty
Add a property.- Parameters:
prop
- The property.
-
addProperty
Add a simple string-based property.- Parameters:
name
- Property name.value
- The string value.
-
addProperty
Add a simple string-based property.- Parameters:
name
- Property name.value
- The string value.
-
removeProperty
Remove a property.- Parameters:
propname
- Name of the property.
-
removeProperty
Remove a property.- Parameters:
prop
- The property.
-
setProperty
Set a property value: a) val==null -> remove property b) val!=null invalid input: '&'invalid input: '&' !hasProp(name) -> addProp(name, val) c) val!=null invalid input: '&'invalid input: '&' hasProp(name) -> setInitialVal(val) -
setParameter
public void setParameter(String name, String value, Class<?> type, boolean string, String direction) Set a parameter value: a) val==null -> remove property b) val!=null invalid input: '&'invalid input: '&' !hasProp(name) -> addProp(name, val) c) val!=null invalid input: '&'invalid input: '&' hasProp(name) -> setInitialVal(val) -
toString
Create a string representation of this activity. -
getPool
Get the pool of the activity.- Returns:
- The pool of the activity.
-
setPool
Set the pool of the activity.- Parameters:
pool
- The pool of the activity.
-
getLane
Get the lane of the activity.- Returns:
- The lane of the activity.
-
setLane
Set the lane of the activity.- Parameters:
lane
- The lane of the activity.
-
isEventHandler
public boolean isEventHandler()Get the eventhandler.- Returns:
- The eventhandler.
-
setEventHandler
public void setEventHandler(boolean eventhandler) Set the eventhandler.- Parameters:
eventhandler
- The eventhandler to set.
-
getClazz
public jadex.common.ClassInfo getClazz()Get the class.- Returns:
- The class.
-
setClazz
public void setClazz(jadex.common.ClassInfo clazz) Set the class.- Parameters:
clazz
- The class to set.
-
isEvent
public boolean isEvent()Test if activity is event.- Returns:
- True, if is event.
-
isStartEvent
public boolean isStartEvent()Test if activity is a start event.- Returns:
- True, if is event.
-
isEndEvent
public boolean isEndEvent()Test if activity is a end event.- Returns:
- True, if is event.
-
isIntermediateEvent
public boolean isIntermediateEvent()Test if activity is an intermediate event.- Returns:
- True, if is event.
-
isMessageEvent
public boolean isMessageEvent()Test if activity is event.- Returns:
- True, if is event.
-
isSignalEvent
public boolean isSignalEvent()Test if activity is event.- Returns:
- True, if is event.
-
isGateway
public boolean isGateway()Test if activity is gateway.- Returns:
- True, if is gateway.
-
getBodyMethod
Get and save the body method info. -
getCancelMethod
Get and save the cancel method info. -
getComponentInjections
Get and save the body method info. -
getArgumentInjections
Get and save the body method info. -
getResultInjections
Get and save the body method info. -
getMethod
Get method with an annotation. -
getFields
public static List<jadex.common.FieldInfo> getFields(Class<?> body, Class<? extends Annotation> type) Get method with an annotation.
-