<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@page import="com.fujitsu.ibpm.dtm.*"
%><%@page import="com.fujitsu.iflow.model.bpm.BPMSession"
%><%@page import="com.fujitsu.iflow.model.bpmcore.BPMSessionImpl"
%>
<% //checks the session is valid or not
    request.setCharacterEncoding("UTF-8");
    BPMSession bps = (BPMSession) session.getAttribute("BPMSession");
    if (bps == null) {
        %><jsp:include page="PasswordPanel.jsp" flush="true"/><%
        return;
    }
%>
<%@ include file="dtmCommon.jsp" %>

<%
	boolean toBeSaved = false;			  //used for saving the DecisionTable

	String toBeSavedStr = (String) session.getAttribute("toBeSaved");
	toBeSaved=new Boolean(toBeSavedStr).booleanValue();

	if (actionStr != null && actionStr.length() > 0) {
 					toBeSaved = true;
	String decisionTableIdStr = request.getParameter("decisionTableId");
	if (actionStr.equals("delete")) {
				int decisionTableId = (new Integer(decisionTableIdStr)).intValue();
   			 	//debug(trace, out, "\n decisionTableId="+decisionTableId);
				dtm.deleteDecisionTable(decisionTableId);
				
        }
	}
		session.setAttribute("toBeSaved","true");
		session.setAttribute("isActive","true");
		response.sendRedirect("DecisionTableManagement.jsp");
%>