eos7+ in combination with Nui to realize the display of flowchart and activity information __bps

Source: Internet
Author: User


Read more about the process related knowledge points, please visit http://doc.primeton.com

1, when creating the page frame of the project selection is Richweb, you can select the workflow component in the page palette "Workflow tag------processgraph", the page will automatically introduce the relevant JSP and tags, But the last Workflow-tag.js path error, you need to remove the front of the "/common". If the page is only used to display flowchart or metafile information, remove this JS also. As shown below:

<% @taglib uri= "Http://eos.primeton.com/tags/workflow" prefix= "WF"%>
<% @page pageencoding= "UTF-8"% >
<% @include file= "/common/common.jsp"%>
<% @include file= "/common/skins/skin0/component.jsp" %>

2, if the above

<script src= "<%=request.getcontextpath ()%>/workflow/wfcomponent/web/js/workflow.js" ></script>
<script src= "<%=request.getcontextpath ()%>/workflow/wfcomponent/web/js/graphic.js" ></script >
<script src= "<%=request.getcontextpath ()%>/workflow/wfcomponent/web/js/workflow-tag.js" > </script>

3, can also follow the instructions in the BPS Help document, with the following code to replace the automatically introduced JSP and JS, at this time the code is relatively concise, as follows:

<% @page pageencoding= "UTF-8"%>
<% @include file= "/workflow/wfcomponent/web/common/common.jsp"%>

Note: In the Nui page frame, the following code is in the default template:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD" >
In the page that displays the flowchart, be sure to remove the line code, otherwise the flowchart will be misplaced.

4. If you want to display the information of the activity entity, you need to use the activitygraph tag, as shown in the following code:

<wf:processgraph processinstid= "321" zoomquotiety= "1" >
   <wf:activitygraph activitytype= "Manual" Onclick= "Show (This)"/>
</wf:processGraph>

There is a detailed description of the attribute in the product online Help, but the double-click event is not supported in this version.

5, in the above code show in need to obtain human activity entities of the information, methods are as follows:

Function Show (e) {
    alert ("Process definition ID:" + e.getattribute ("Processdefid"));
    Alert ("Activity definition ID:" + e.getattribute ("Activitydefid"));
    Alert ("Process instance ID:" + e.getattribute ("Processinstid"));
    Alert ("Activity instance ID:" + e.getattribute ("Activityinstid"));
}

6, use Nui control display activity information, there are a variety of ways, in addition to Nui.open, there are Nui MessageBox and window, can be selected according to the actual situation. This article provides three ways in which the detailed code is as follows:

<%--<% @taglib uri= "Http://eos.primeton.com/tags/workflow" prefix= "WF"%>--%> <%@ page language= "Java" Contenttype= "text/html; Charset=utf-8 "pageencoding=" UTF-8 "session=" false "%> <% @include file="/workflow/wfcomponent/web/common/ common.jsp "%> <%--<% @include file="/common/common.jsp "%> <% @include file="/common/skins/skin0/ component.jsp "%>--%> 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.