Package jadex.bpmn.model
Class MActivity
- Direct Known Subclasses:
MSubProcess,MTask
Base class for all kinds of activities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe activity type.The argument injection targets.protected jadex.common.MethodInfoThe body method cached for speed.protected jadex.common.MethodInfoThe body method cached for speed.protected jadex.common.ClassInfoThe class.protected List<jadex.common.FieldInfo>The component injection targets.protected booleanThe flag if this activity is an event handler.The event handlers.static final StringThe interface name.The incoming messages description.protected StringThe incoming sequence edges description.The incoming data edges.protected List<MMessagingEdge>The incoming message edges.protected List<MSequenceEdge>The incoming sequence edges.static final StringConstant for the sequential result execution mode .static final StringIs service constant.protected MLaneThe lane (if any).protected StringThe lane description.protected booleanThe looping flag.static final StringThe method name.protected static final jadex.common.MethodInfoThe outgoing data edges.The outgoing messages description.protected StringThe 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 MPoolThe pool.The properties (name -> MProperty).The result injection targets.static final StringConstant for the result param name.static final StringConstant for the result param type (needed for distinguishing collection results from single values).static final StringConstant for the return parameter name.protected booleanThe throwing flag.protected StringThe type.Fields inherited from class jadex.bpmn.model.MAssociationTarget
associations, associationsdescriptionFields inherited from class jadex.bpmn.model.MNamedIdElement
description, nameFields inherited from class jadex.bpmn.model.MAnnotationElement
annotationsFields inherited from class jadex.bpmn.model.MIdElement
id, ID_GENERATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventHandler(MActivity eventhandler) Add an event handler.voidaddIncomingDataEdge(MDataEdge edge) Add an incoming edge.voidAdd an incoming message description.voidAdd an incoming message edge.voidAdd an incoming edge.voidaddOutgoingDataEdge(MDataEdge edge) Add an outgoing edge.voidAdd an outgoing message description.voidAdd an outgoing message edge.voidAdd an outgoing edge.voidaddParameter(MParameter param) Add a parameter.voidaddProperty(MProperty prop) Add a property.voidaddProperty(String name, String value) Add a simple string-based property.voidaddProperty(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.MethodInfoGet and save the body method info.jadex.common.MethodInfoGet and save the cancel method info.jadex.common.ClassInfogetClazz()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.voidgetIncomingSequenceEdges(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.MethodInfogetMethod(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.voidgetOutgoingMessagingEdges(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.UnparsedExpressiongetPropertyValue(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.booleanTest, if a property is declared and has nonull unparsed expression.booleanhasParameter(String name) Test if a prop exists.booleanhasProperty(String name) Test if a property exists.booleanhasPropertyValue(String name) Test, if a property is declared and has nonull unparsed expression.booleanTest if activity is a end event.booleanisEvent()Test if activity is event.booleanGet the eventhandler.booleanTest if activity is gateway.booleanTest if activity is an intermediate event.booleanTest if the activity is looping.booleanTest if activity is event.booleanTest if activity is event.booleanTest if activity is a start event.booleanTest if the activity is throwing.voidremoveEventHandler(MActivity eventhandler) Remove an event handler.voidRemove an outgoing edge.voidRemove an incoming message description.voidRemove an incoming message edge.voidRemove an incoming edge.voidRemove an outgoing edge.voidRemove an outgoing message description.voidRemove an outgoing message edge.voidRemove an outgoing edge.voidremoveParameter(MParameter param) Remove a parameter.voidremoveParameter(String name) Remove a parameter.voidRemove a parameter.voidremoveProperty(MProperty prop) Remove a property.voidremoveProperty(String propname) Remove a property.voidsetActivityType(String activitytype) Set the activity type.voidsetClazz(jadex.common.ClassInfo clazz) Set the class.voidsetEventHandler(boolean eventhandler) Set the eventhandler.voidsetIncomingDataEdges(List<MDataEdge> indataedges) Set the incoming data edges.voidsetIncomingMessagingEdges(List<MMessagingEdge> inmsgedges) Set the incoming message edges.voidsetIncomingSequenceEdgesDescription(String incomingedges) Set the xml incoming edges description.voidSet the lane of the activity.voidsetLaneDescription(String lanedescription) Set the xml lane description.voidsetLooping(boolean looping) Set the looping state.voidsetOutgoingDataEdges(List<MDataEdge> outdataedges) Set the outgoing data edges.voidsetOutgoingSequenceEdges(List<MSequenceEdge> outseqedges) Set the outgoing sequence edges.voidsetOutgoingSequenceEdgesDescription(String outgoingedges) Set the xml outgoing edges desription.voidsetParameter(String name, String value, Class<?> type, boolean string, String direction) Set a parameter value: a) val==null -> remove property b) val!=null && !hasProp(name) -> addProp(name, val) c) val!=null && hasProp(name) -> setInitialVal(val)voidsetParameters(jadex.collection.IndexMap<String, MParameter> parameters) Sets the parameters.voidSet the pool of the activity.voidsetProperties(jadex.collection.IndexMap<String, MProperty> properties) Set the properties.voidsetProperty(String name, String value, boolean string) Set a property value: a) val==null -> remove property b) val!=null && !hasProp(name) -> addProp(name, val) c) val!=null && hasProp(name) -> setInitialVal(val)voidsetPropertyValue(String name, jadex.common.UnparsedExpression exp) Legacy conversion from unparsed expression.voidsetPropertyValue(String name, jadex.javaparser.IParsedExpression exp) Legacy conversion to unparsed expression.voidsetThrowing(boolean throwing) Set the throwing state.voidSet the type.toString()Create a string representation of this activity.Methods inherited from class jadex.bpmn.model.MAssociationTarget
addAssociation, getAssociations, getAssociationsDescription, removeAssociation, setAssociationsDescriptionMethods inherited from class jadex.bpmn.model.MNamedIdElement
getDescription, getName, setDescription, setNameMethods inherited from class jadex.bpmn.model.MAnnotationElement
addAnnotation, getAnnotationsMethods 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 && !hasProp(name) -> addProp(name, val) c) val!=null && 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 && !hasProp(name) -> addProp(name, val) c) val!=null && 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.
-