/*
 * Created on Oct 30, 2006
 * 
 * (C) Copyright TANDBERG Television Ltd.
 */

package com.tandbergtv.workflow.driver.event;

import org.jbpm.graph.def.Node;
import org.jbpm.graph.exe.Token;

import com.tandbergtv.workflow.core.WorkflowProcess;

/**
 * Event fired to indicate that an execution path has timed out at a particular node
 * 
 * @author Vijay Silva
 * @author Sahil Verma
 */
public class NodeTimeoutEvent extends WorkflowProcessEvent
{
	private Node node;
	
	/**
	 * Constructor
	 * 
	 * @param source the source of the event
	 * @param token the path of execution that timed out
	 * @param node the node at which the timeout occured
	 */
	public NodeTimeoutEvent(Object source, Token token, Node node)
	{
		super(source, (WorkflowProcess)token.getProcessInstance(), token, WorkflowProcessEventType.TIMEOUT);
		this.node = node;
	}

	/**
	 * @return Returns the node.
	 */
	public Node getNode()
	{
		return this.node;
	}
}
