⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editworkitem-body.jsp

📁 一个工作流设计及定义的系统,可以直接与数据库结合进行系统工作流程的定义及应用.
💻 JSP
字号:
<%@ taglib uri="/tags/struts-bean" prefix="bean" %><%@ taglib uri="/tags/struts-html" prefix="html" %><%@ taglib uri="/tags/struts-logic" prefix="logic" %><%@ taglib uri="/tags/struts-tiles" prefix="tiles" %><%@ page import="openwfe.org.engine.workitem.WorkItem" %><%@ page import="openwfe.org.engine.workitem.LaunchItem" %><%@ page import="openwfe.org.engine.workitem.InFlowWorkItem" %><%@ page import="openwfe.org.engine.workitem.HistoryItem" %><%@ page import="openwfe.org.engine.expressions.FlowExpressionId" %><%@ page import="openwfe.org.input.InputHelper" %><%@ page import="openwfe.org.webclient.Definitions" %><%@ page import="openwfe.org.webclient.OwfeSession" %><script language="javascript">    function submitForm (actionTarget)    {	document.forms["workItemForm"].action=actionTarget;	document.forms["workItemForm"].method="POST";	document.forms["workItemForm"].submit();    }</script><%    String encoding = openwfe.org.Utils.getEncoding();    OwfeSession owfeSession = OwfeSession.getOwfeSession(request);    InFlowWorkItem ifwi = null;    try    {	WorkItem wi = owfeSession.getWorkItem();	if (wi instanceof InFlowWorkItem) ifwi = (InFlowWorkItem)wi;	if (wi == null)	{	    out.print("wi is null");	    return;	}	FlowExpressionId id = null;	if (ifwi != null) id = ifwi.getLastExpressionId();%><table border=0 width=1010><tr><td valign=top><form name="workItemForm" enctype="multipart/form-data" accept-charset="<%= encoding %>"><table border=0 width=100%><!--     head--><tr bgcolor=#d3d3d3>    <td width=50 align=right><i>field</i></td>    <td><i>value</i></td></tr><!--     lastModified --><tr>    <td align=right>last modified</td>    <td><%= wi.getLastModified() %></td></tr><%	if (ifwi != null)	{%><!--     dispatchTime--><tr>    <td align=right>dispatch time</td>    <td><%= ifwi.getDispatchTime() %></td></tr><!--     participant--><tr>    <td align=right>participant</td>    <td><%= ifwi.getParticipantName() %></td></tr><!--     flowExpressionId--><tr>    <td align=right>engine</td>    <td><%= id.getEngineId() %></td></tr><tr>    <td align=right>wfdName</td>    <td><%= id.getWorkflowDefinitionName() %></td></tr><tr>    <td align=right>wfdRevision</td>    <td><%= id.getWorkflowDefinitionRevision() %></td></tr><tr>    <td align=right>wfInstanceId</td>    <td><%= id.getWorkflowInstanceId() %></td></tr><tr>    <td align=right>expressionName</td>    <td><%= id.getExpressionName() %></td></tr><tr>    <td align=right>expressionId</td>    <td><%= id.getExpressionId() %></td></tr><%	}%><!--     WORKFLOW DEFINITION URL--><tr>    <td align=right>wfdUrl</td>    <% 	String wfdUrl = null;	if (ifwi != null)	    wfdUrl = ifwi.getLastExpressionId().getWorkflowDefinitionUrl();	else if (wi instanceof LaunchItem)	    wfdUrl = ((LaunchItem)wi).getWorkflowDefinitionUrl();	if (wfdUrl == null) 	    wfdUrl = "";	if (wfdUrl.startsWith("http://") &&	    owfeSession.shouldDisplayHistory())	{    %>    <td><a href="<%= OwfeSession.getDrofloLink(request, wi) %>"><%= wfdUrl %></a></td>    <%	}	else	{    %>    <td><%= wfdUrl %></td>    <%	}    %></tr><!--    ATTRIBUTES--><%	java.util.Iterator it = wi.getAttributes().stringKeySet().iterator();	while (it.hasNext())	{	    String field = (String)it.next();%><tr bgcolor=#d3d3d3>    <td align=right valign=top><%= field %>&nbsp;<%	    InputHelper.getInstance(application)		.displayDeleteTag(out, wi, field);    %></td>    <td><% 	    InputHelper.getInstance(application)		.displayInputTag(false, request, out, wi, field);    %></td></tr><%	}%><!--    Add another field ?--><%	if (ifwi == null || 	    (ifwi.getFilter() == null || ifwi.getFilter().isAddAllowed()))	{%><tr>    <!-- add field -->    <td align=right valign=top><input style="font-style: italic" type=text name=newfieldname value=""><br>    <small>(enter here the name of the new field)</small></td>    <td align=left valign=top><a href="" onClick="submitForm('/webclient/update.action'); return false;"><img src=/webclient/images/plus.png border=0 title="Add new field"></a> <small><i>Add a new field</i></small></td></tr><%	}%><!--    item footer--><%	if (ifwi != null)	{	    //	    // regular workitem footer%><tr>    <td colspan=2 align=right><a href="" onClick="submitForm('/webclient/delegate.action'); return false;" title="Delegate this workitem to another participant or push it to another store (changes are kept)">delegate</a> <a href="" onClick="submitForm('/webclient/proceed.action'); return false;" title="Make this workitem leave this store and resume its run in the flow (changes are kept)">proceed</a> <a href="" onClick="submitForm('/webclient/save.action'); return false;" title="Save the changes and unlock the workitem. It stays then in the store.">save</a> <a href="/webclient/cancel.action" title="Forget any changes just made and return the workitem to the store.">cancel</a></td></tr><%	}	else	{	    //	    // launchitem footer%><tr>    <td colspan=2 align=right><a href="" onClick="submitForm('/webclient/proceed.action?engineId=<%= session.getAttribute("engineId") %>'); return false;">launch</a> <a href="/webclient/cancel.action" title="Return to the main view without launching the flow">cancel</a></td></tr><%	}%></table></form></td><!--    H i s t o r y	          or     D r o f l o--><td align=right valign=top><%    if (owfeSession.shouldDisplayHistory())    {	//	// HISTORY%><table border=0 width=100%>    <tr>	<td colspan=3 bgcolor=#d3d3d3><i>History</i></td>    </tr><%	if (ifwi != null && ifwi.getHistory() != null)	{	    it = ifwi.getHistory().iterator();	    while (it.hasNext())	    {		HistoryItem hi = (HistoryItem)it.next();%>    <tr>	<td bgcolor=#d3d3d3 rowspan=4>&nbsp;&nbsp;&nbsp;</td>	<td align=right bgcolor=#d3d3d3><small><i>date</i></small></td>	<td><small><%= hi.getDate() %></small></td>    </tr>    <tr>	<td align=right bgcolor=#d3d3d3><small><i>author</i></small></td>	<td><small><%= hi.getAuthor() %></small></td>    </tr>    <tr>	<td align=right bgcolor=#d3d3d3><small><i>host</i></small></td>	<td><small><%= hi.getHost() %></small></td>    </tr>    <tr>	<td valign=top align=right bgcolor=#d3d3d3><font size=1><i>text</i></font></td>	<td><small><%= hi.getText() %></small></td>    </tr><%	    }	}%></table><%    }    else    {%><table border=0 width=100%>    <tr>	<td bgcolor=#d3d3d3><i>Flow Diagram</i></td>    </tr>    <tr>	<td align=center><%	//	// DROFLO		java.net.URL drofloUrl = 	    new java.net.URL(OwfeSession.getDrofloLink(request, wi));		openwfe.org.misc.WebUtils	    .include(new java.io.PrintWriter(out), drofloUrl);%>	</td>    </tr></table><%    }%><p align=right><%    if (owfeSession.shouldDisplayHistory())    {%><a href="/webclient/toggleHistoryEdit.action" title="Switch to graphical display of flow"><small>display flow diagram</small></a><%    }    else    {%><a href="/webclient/toggleHistoryEdit.action" title="Switch to the view of history events attached to the workitem"><small>display workitem history</small></a><%    }%></p></td></tr></table><%    }    catch (Throwable t)    {	out.write("<pre>");	out.write(""+t);	//	t.printStackTrace(new java.io.PrintWriter(out));	//	out.write("</pre>");    }%><!-- demo text --><br><br><table border=0 width=1010><tr><td><%    if (ifwi != null)    {%><i>delegate</i> allows you to delegate this workitem to the store of another participant or directly to another participant.<br>Some participants may be automatic agents that don't have any store, that's why direct delegation is possible to reach them.<br>Each user may have a different set of delegation rights.<br>Changes made to the workitem will be kept.<br><br><i>proceed</i> forwards the workitem back to the engine that will take care of resuming the flow.<br><br><i>save</i> will simply keep the changes made to the workitem and put it back in the worklist. It will also take care of unlocking it. So users that also have access to the store may use it too.<br><%    }    else    {%><i>launch</i> will launch the desired flow with the fields that were entered.<br><%    }%><br><i>cancel</i> will discard any changes and unlock the workitem in the store.</td></tr></table><!-- end demo text -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -