org.jbpm.graph.def
Class GraphElement
java.lang.Object
org.jbpm.graph.def.GraphElement
- All Implemented Interfaces:
- java.io.Serializable, Identifiable
- Direct Known Subclasses:
- Node, ProcessDefinition, Task, Transition
public abstract class GraphElement
- extends java.lang.Object
- implements Identifiable, java.io.Serializable
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
protected java.lang.String name
description
protected java.lang.String description
processDefinition
protected ProcessDefinition processDefinition
events
protected java.util.Map<java.lang.String,Event> events
exceptionHandlers
protected java.util.List<ExceptionHandler> exceptionHandlers
GraphElement
public GraphElement()
GraphElement
public GraphElement(java.lang.String name)
getSupportedEventTypes
public abstract java.lang.String[] getSupportedEventTypes()
- indicative set of event types supported by this graph element. this is currently only used by the process designer
to know which event types to show on a given graph element. in process definitions and at runtime, there are no
contstraints on the event-types.
getEvents
public java.util.Map<java.lang.String,Event> getEvents()
- gets the events, keyd by eventType (java.lang.String).
hasEvents
public boolean hasEvents()
getEvent
public Event getEvent(java.lang.String eventType)
hasEvent
public boolean hasEvent(java.lang.String eventType)
addEvent
public Event addEvent(Event event)
removeEvent
public Event removeEvent(Event event)
getExceptionHandlers
public java.util.List<ExceptionHandler> getExceptionHandlers()
- is the list of exception handlers associated to this graph element.
addExceptionHandler
public ExceptionHandler addExceptionHandler(ExceptionHandler exceptionHandler)
removeExceptionHandler
public void removeExceptionHandler(ExceptionHandler exceptionHandler)
reorderExceptionHandler
public void reorderExceptionHandler(int oldIndex,
int newIndex)
fireEvent
public void fireEvent(java.lang.String eventType,
ExecutionContext executionContext)
fireAndPropagateEvent
public void fireAndPropagateEvent(java.lang.String eventType,
ExecutionContext executionContext)
createAsyncActionExecutionJob
protected ExecuteActionJob createAsyncActionExecutionJob(Token token,
Action action)
executeAction
public void executeAction(Action action,
ExecutionContext executionContext)
raiseException
public void raiseException(java.lang.Throwable exception,
ExecutionContext executionContext)
throws DelegationException
- throws an ActionException if no applicable exception handler is found. An ExceptionHandler is searched for in this
graph element and then recursively up the parent hierarchy. If an exception handler is found, it is applied. If the
exception handler does not throw an exception, the exception is considered handled. Otherwise the search for an
applicable exception handler continues where it left of with the newly thrown exception.
- Throws:
DelegationException
findExceptionHandler
protected ExceptionHandler findExceptionHandler(java.lang.Throwable exception)
getParent
public GraphElement getParent()
getParents
public java.util.List<GraphElement> getParents()
- Returns:
- all the parents of this graph element ordered by age.
getParentChain
public java.util.List<GraphElement> getParentChain()
- Returns:
- this graph element plus all the parents ordered by age.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
getId
public long getId()
- Specified by:
getId in interface Identifiable
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getDescription
public java.lang.String getDescription()
setDescription
public void setDescription(java.lang.String description)
getProcessDefinition
public ProcessDefinition getProcessDefinition()
setProcessDefinition
public void setProcessDefinition(ProcessDefinition processDefinition)
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.