org.ow2.bonita.pvm.listener
Interface EventListenerExecution

All Superinterfaces:
Discussable, Execution, OpenExecution, java.io.Serializable
All Known Implementing Classes:
ExecutionImpl

public interface EventListenerExecution
extends OpenExecution

view upon an path of execution exposed to EventListener implementations.

Author:
Tom Baeyens

Field Summary
 
Fields inherited from interface org.ow2.bonita.pvm.Execution
STATE_ACTIVE, STATE_ASYNC, STATE_CANCELLED, STATE_CREATED, STATE_ENDED, STATE_INACTIVE, STATE_SUSPENDED
 
Method Summary
 void addLog(ProcessLog processLog)
          adds a log to this execution.
 void fire(java.lang.String eventName, ObservableElement eventSource)
          fires the event on the given eventSource and then propagates the event up to the eventSource's parent chain.
 Event getEvent()
          the event that is being fired, part of the current position in the process graph.
 ObservableElement getEventSource()
          the original object that fired the event, part of the current position in the process graph.
 java.lang.Exception getException()
          the exception in case an exception handler is handling an exception.
<T> T
getExtension(java.lang.Class<T> extensionClass)
          way to access process language extensions in the execution without having to cast.
 Transition getTransition()
          the current transition indicating the position in the process definition graph.
 void setPriority(int priority)
          setter for the priority.
 
Methods inherited from interface org.ow2.bonita.pvm.model.OpenExecution
createVariable, createVariable, getExecution, getExecutions, getExecutionsMap, getJobs, getNode, getParent, getProcessDefinition, getProcessInstance, getSubProcessInstance, getVariable, getVariableKeys, getVariables, hasExecution, hasVariable, hasVariables, removeVariable, removeVariables, setVariable, setVariables
 
Methods inherited from interface org.ow2.bonita.pvm.Execution
getDbid, getId, getKey, getName, getNodeName, getPriority, getState, isActive, isEnded, isFinished, isLocked, isSuspended
 
Methods inherited from interface org.ow2.bonita.pvm.model.Discussable
createComment, getComments, removeComment
 

Method Detail

addLog

void addLog(ProcessLog processLog)
adds a log to this execution.


getTransition

Transition getTransition()
the current transition indicating the position in the process definition graph. Can be null in case this execution is not taking a transition.


fire

void fire(java.lang.String eventName,
          ObservableElement eventSource)
fires the event on the given eventSource and then propagates the event up to the eventSource's parent chain. All the actions will see the given eventSource in getEventSource(), event if the events are registered to parent's of the given eventSource.


getException

java.lang.Exception getException()
the exception in case an exception handler is handling an exception.


getEventSource

ObservableElement getEventSource()
the original object that fired the event, part of the current position in the process graph. Can be null in case no event is being fired. This is mostly the object that is listened to with an Activity, but the eventSource can also be a child of the object to which is listened in case of event propagation.


getEvent

Event getEvent()
the event that is being fired, part of the current position in the process graph. Can be null in case no event is being fired.


getExtension

<T> T getExtension(java.lang.Class<T> extensionClass)
way to access process language extensions in the execution without having to cast. Casting can be problematic for persistence.


setPriority

void setPriority(int priority)
setter for the priority. The default priority is 0, which means NORMAL. Other recognized named priorities are HIGHEST (2), HIGH (1), LOW (-1) and LOWEST (-2). For the rest, the user can set any other priority integer value, but then, the UI will have to display it as an integer and not the named value.

Specified by:
setPriority in interface OpenExecution


Copyright © 2009 OW2 Consortium. All Rights Reserved.