/** sets the behaviour on the current node.
* A current node is required. */
public ProcessFactory behaviour(Activity activity) {
if (exceptionHandler!=null) {
throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
}
if (node==null) {
throw new PvmException("no current node");
}
node.setBehaviour(activity);
return this;
}