/*
#=============================================================================
#																			   
#			copyright (c) 2009 Origin Enterprise Solution LTD.		   
#																			   
#=============================================================================
# File name: SubmitAttachmentInWorkflowHandler.java
# File description: 										   	
#=============================================================================
#	Date		Name		Action	Description of Change					   
#									   
#=============================================================================
 */
package cust.com.rac.workflow;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import com.teamcenter.rac.aif.AbstractAIFUIApplication;
import com.teamcenter.rac.aifrcp.AIFUtility;
import com.teamcenter.rac.kernel.TCException;

/**
 * @author 
 */
public class SubmitAttachmentInWorkflowHandler extends AbstractHandler implements IHandler {

	/*
	 * @see
	 * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
	 * ExecutionEvent)
	 */
	public Object execute(ExecutionEvent arg0) throws ExecutionException {
		AbstractAIFUIApplication app = AIFUtility.getCurrentApplication();
		try {
			SubmitAttachmentInWorkflowCommand command = new SubmitAttachmentInWorkflowCommand(app);
			command.executeModal();
		} catch (TCException e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
}
