org.jbpm.pvm
Interface Activity

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
ExternalActivity

public interface Activity
extends java.io.Serializable

piece of Java code that is to be included in a process as the runtime node behaviour or as a hidden listener to process events.

Author:
Tom Baeyens

Method Summary
 void execute(Execution execution)
          piece of Java code that is to be included in a process as node behaviour or as a hidden listener to process events.
 

Method Detail

execute

void execute(Execution execution)
             throws java.lang.Exception
piece of Java code that is to be included in a process as node behaviour or as a hidden listener to process events.

Activities can be used to implement the behaviour of nodes, in which case this behaviour is associated to a graphical node in the diagram, or they can be added as events, in that case, they are being hidden from the diagram.

If an activity is the node behaviour, then it can control the propagation of execution. Node behaviours can be external activities. That means their runtime behaviour is a wait state. In that case, ExternalActivity should be implemented to also handle the external triggers.

If an activity is being used as a listener to process events, the propagation of the execution can not be controlled in an activity. So following methods are not to be called during Events.

will result in a PvmException.

If an exception is thrown that is not handled by an ExceptionHandler, the exception will be wrapped and propagated to the original client that performed an operation on the execution.

Throws:
java.lang.Exception