org.jbpm.graph.def
Class GraphElement
java.lang.Object
org.jbpm.graph.def.GraphElement
- All Implemented Interfaces:
- Serializable, Identifiable
- Direct Known Subclasses:
- Node, ProcessDefinition, Task, Transition
public abstract class GraphElement
- extends Object
- implements Identifiable, Serializable
- See Also:
- Serialized Form
name
protected String name
description
protected String description
processDefinition
protected ProcessDefinition processDefinition
events
protected Map events
exceptionHandlers
protected List exceptionHandlers
GraphElement
public GraphElement()
GraphElement
public GraphElement(String name)
getSupportedEventTypes
public abstract 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 constraints on the event-types.
getEvents
public Map getEvents()
- gets the events, keyed by eventType (java.lang.String).
hasEvents
public boolean hasEvents()
getEvent
public Event getEvent(String eventType)
hasEvent
public boolean hasEvent(String eventType)
addEvent
public Event addEvent(Event event)
removeEvent
public Event removeEvent(Event event)
getExceptionHandlers
public List 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(String eventType,
ExecutionContext executionContext)
fireAndPropagateEvent
public void fireAndPropagateEvent(String eventType,
ExecutionContext executionContext)
createAsyncActionExecutionJob
protected ExecuteActionJob createAsyncActionExecutionJob(Token token,
Action action)
executeAction
public void executeAction(Action action,
ExecutionContext executionContext)
raiseException
public void raiseException(Throwable exception,
ExecutionContext executionContext)
- looks for an exception handler 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 rethrow, the exception is considered handled. Otherwise the
rethrown exception is propagated up the parent hierarchy.
- Throws:
DelegationException - if no applicable exception handler is found
findExceptionHandler
protected ExceptionHandler findExceptionHandler(Throwable exception)
getParent
public GraphElement getParent()
getParents
public List getParents()
- Returns:
- the ancestors of this graph element ordered by depth.
getParentChain
public List getParentChain()
- Returns:
- this graph element plus the ancestors ordered by depth.
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
getId
public long getId()
- Specified by:
getId in interface Identifiable
getName
public String getName()
setName
public void setName(String name)
getDescription
public String getDescription()
setDescription
public void setDescription(String description)
getProcessDefinition
public ProcessDefinition getProcessDefinition()
setProcessDefinition
public void setProcessDefinition(ProcessDefinition processDefinition)
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.