Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\workflow\read.jsp
<%/****************************************************************************** * Copyright (c) 2000-2004 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. * ******************************************************************************/%><%@page session="true"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.helper.custom.WorkflowHelper" %> <%@ page import="com.edeal.frontline.AttachmentBean"%> <%@ page import="com.edeal.frontline.helper.GraphVizHelper" %> <%@ page import="com.edeal.frontline.helper.custom.WorkflowHelper" %> <%@ page import="com.edeal.frontline.helper.XMLHelper" %> <%@ page import="org.apache.axis.encoding.Base64" %> <%@ page import="com.edeal.frontline.services.FlServiceException"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.WorkflowBean" id="Workflow" scope="request"/> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); String id = null; try { id = Workflow.getID(); } catch (FieldNotInitializedException e) { } String wkfContent = null; try{ wkfContent = Workflow.getWkfContent(); }catch(FieldNotInitializedException e){ } boolean hasGraphVizService; try{ context.getServiceManager().getServiceClient("GraphViz"); hasGraphVizService = true; }catch(FlServiceException e){ hasGraphVizService = false; } WorkflowHelper workflowHelper = new WorkflowHelper(Workflow); wkfContent = XMLHelper.formatToColoredXML(wkfContent); boolean isValid = false; String errorMsg = workflowHelper.isXMLValid(); isValid = Utils.isEmpty(errorMsg); String workflowGraph = flRequest.getRequestParameterOrAttribute("WkfGraph"); StringBuilder graphSource = new StringBuilder(); graphSource.append(workflowGraph); GraphVizHelper gv = new GraphVizHelper(); gv.setDotSource(graphSource); AttachmentBean img = new AttachmentBean(context); boolean gotImg = false; String serviceError = ""; String img64 = ""; if(hasGraphVizService){ try{ img = WorkflowHelper.getGraphAsAnImg(context, gv.getDotSource(), "png"); gotImg = true; Base64 base64 = new Base64(); img64 = base64.encode(img.getAttFile()); }catch(FrontlineException e){ serviceError = e.getMessage(); } } %> <script type="text/javascript"> $(function(){ $('#graphContainer').attr('style', 'overflow-y:hidden;overflow-x:auto;width: '+($(window).width()-290)+'px'); $('#sourceContainer').attr('style', 'overflow-y:hidden;overflow-x:auto;width: '+($(window).width()-290)+'px'); $('#errorContainer').attr('style', 'overflow-y:hidden;overflow-x:auto;width: '+($(window).width()-290)+'px'); }); </script> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L65E6\", false, true, \"Workflow\") %>" ou="<%= \"/read_workflow.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td colspan="3" class="titreFiche"> <fl:getProperty name="Workflow" property="WkfName" alt=" " /> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <tr class="fieldline"> <td colspan="3"> <fl:autodisplay name="Workflow" zone="WorkflowMain" /> </td> </tr> </table> <fl:notes name="WkfDescription" title="<%= Utils.getMessage(session, \"L2007\", \"Description\") %>" nbPix="30"><fl:getProperty name="Workflow" property="WkfDescription" alt=""/></fl:notes> <table class="container" cellpadding="0"> <tr class="ligne_separation"><td colspan="3"> </td></tr> <tr> <td class="titrePartie" style="text-align: left;"><fl:getMessage code="F203D" alt="Contenu"/></td> <td style="text-align: right"> <label title="<fl:getMessage code="<%= (isValid ? \"L65A9\":\"L813F\") %>" alt="<%= (isValid ? \"XML valide\":\"Voir l'onglet erreur pour plus de détail\") %>"/>"> <img src="<fl:webapp/><%= (isValid ? "/icons/bigvalid.gif" : "/icons/bigvalid_non.gif") %>" alt=""> </label> </td> </tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="DETAIL"> <fl:sTab id="wflow1Graph" title="Graphe"> <div id="graphContainer" align="center"> <%if(gotImg){ %> <img src="data:<%=img.getAttContentType()%>;base64,<%=img64 %>"> <%}else{ %> <img src="<fl:webapp/>/js/progressbar/images/failure.png" title="<%=serviceError %>"/> <%} %> </div> </fl:sTab> <fl:sTab id="wflow2Source" title="Source"> <table class="container" cellpadding="0"> <tr> <td class="dataValue" colspan="3"> <div id="sourceContainer"> <pre><%=wkfContent %></pre> </div> </td> </tr> </table> </fl:sTab> <%if(!Utils.isEmpty(errorMsg)){ %> <fl:sTab id="wflowError" title="<%= Utils.getMessage(session, \"F7059\", \"Erreur\") %>"> <div id="errorContainer"> <pre> <%=errorMsg%> </pre> </div> </fl:sTab> <%} %> </fl:smallTabs> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de