开发目的:

  • 实现通用流程自动化处理(即实现不需要hardcode代码的bpm统一处理后台,仅需要写少量前端html form代码和拖拽设计BPM定义)
  • 可独立运行可依托于Liferay依托其它门户系统(使用portlet规范技术实现)运行;

 

先实现一个JSP + Servlet版的通用流程处理,将来迁移到Portlet

迁移工作将保留大量的前后端代码,仅需要改动少量的注解。

考虑到Liferay的客户端体系是bootstrap+jQuery(对移动端的支持非常好),JSP的实现也用了这两者。

第1步,前端原型实现

首先先实现一个客户端的原型,简单实现一些逻辑,

jsp相关的:

  1. 登陆index.jsp:用于模拟获取user session;
  2. 启动流程列表页flowList.jsp: 用于启动流程;
  3. 待办页flowToDo.jsp
  4. 请假流程模拟页formLeave.jsp : 用于模拟请假流程;
  5. 借款流程模拟页formLoan.jsp : 用于模拟借款流程;

java控制器相关的:

  1. Login.java : 用于登陆逻辑;
  2. BpmForm.java : 流程表单统一控制;
  3. BpmDate.java: 数据控制;
  4. BpmInst.java: 流程实例控制;
  5. ......

第2步:登陆逻辑模拟

index.jsp

注意:不支持IE8 。在这个阶段仅仅是先实现模拟前端展示,更细节的代码我们后面再逐步补充

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>登陆</title>
<!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="css/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="css/signin.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>

    <div class="container">

      <form class="form-signin" action="login" method="post">
        <h2 class="form-signin-heading">用户登陆</h2>
        <label for="inputEmail" class="sr-only">账户</label>
        <input type="text" id="inputUsername" name="inputUsername" class="form-control" placeholder="账户" required autofocus>
        <label for="inputPassword" class="sr-only">密码</label>
        <input type="password" id="inputPassword" name="inputPassword" class="form-control" placeholder="密码" required>
        <button class="btn btn-lg btn-primary btn-block" type="submit">登陆</button>
      </form>

    </div> <!-- /container -->
    <script src="js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案