<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
  <channel>
    <title>dingyuan</title>
    <description></description>
    <link>http://dingyuan.javaeye.com</link>
    <language>UTF-8</language>
    <copyright>Copyright 2003-2008, JavaEye.com</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>JavaEye - 做最棒的软件开发交流社区</generator>
      <item>
        <title>tomcat默认页诀窍</title>
        <author>dingyuan</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://dingyuan.javaeye.com">dingyuan</a>&nbsp;
          链接：<a href="http://dingyuan.javaeye.com/blog/82506" style="color:red;">http://dingyuan.javaeye.com/blog/82506</a>&nbsp;
          发表时间: 2007年05月24日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          很多人肯定用tomcat的时候会遇到类似的问题。。。<br />配置了<br /><pre name="code" class="java">&lt;welcome-file-list>
	&lt;welcome-file>index.do&lt;/welcome-file>
&lt;/welcome-file-list></pre><br /><br />但没有用，还是会404错误....挺烦人的，只能弄一个index.html重定向到index.do<br />但无疑是网站首页访问效率降低了，等于request了2个请求。。<br /><br />无意看了一下tomcat注释<br />When a request URI refers to a directory, the default servlet looks for a "welcome file" within that directory and, if present,  to the corresponding resource URI for display<br /><br />也就是说，必须web-app目录下有index.do这个文件。。。。。。于是就加个.do后缀的空文件咯，居然成功了。。。
          <br/>
          <span style="color:red;">
            <a href="http://dingyuan.javaeye.com/blog/82506#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 24 May 2007 09:36:15 +0800</pubDate>
        <link>http://dingyuan.javaeye.com/blog/82506</link>
        <guid>http://dingyuan.javaeye.com/blog/82506</guid>
      </item>
      <item>
        <title>工作流情景分析(一)</title>
        <author>dingyuan</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://dingyuan.javaeye.com">dingyuan</a>&nbsp;
          链接：<a href="http://dingyuan.javaeye.com/blog/40307" style="color:red;">http://dingyuan.javaeye.com/blog/40307</a>&nbsp;
          发表时间: 2006年12月22日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><strong style="mso-bidi-font-weight: normal"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">情景：</span></strong><strong style="mso-bidi-font-weight: normal"><span style="FONT-SIZE: 12pt"><font face="Times New Roman"> </font></span></strong><strong style="mso-bidi-font-weight: normal"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">法院一般对一个案子有以下一个流程</span></strong><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="FONT-SIZE: 12pt"><o:p></o:p></span></strong></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><font size="3"><span lang="EN-US"><font face="Times New Roman"><span style="mso-spacerun: yes">&nbsp;</span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">立案</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分案</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">审判</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结案</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">其中</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">立案阶段</span><span lang="EN-US"><font face="Times New Roman"> ---- </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">立案人员</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分案阶段</span><span lang="EN-US"><font face="Times New Roman"> ---- </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分案人员</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">审判阶段</span><span lang="EN-US"><font face="Times New Roman"> ---- </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">法官</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结案阶段</span><span lang="EN-US"><font face="Times New Roman"> ---- </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">法官</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上述的立案人员，分案人员，法官各自都是一个</span><span lang="EN-US"><font face="Times New Roman">Group</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个案件加入有</span><span lang="EN-US"><font face="Times New Roman">8</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个属性</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3" face="Times New Roman">a b c d e f g h</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">每个阶段不同组的人员处理案件的属性为</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">立案阶段</span><span lang="EN-US"><font face="Times New Roman"> ---- </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">立案人员</span><span lang="EN-US"><font face="Times New Roman"> -- a b</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分案阶段</span><span lang="EN-US"><font face="Times New Roman"> ---- </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分案人员</span><font face="Times New Roman"> <span lang="EN-US">&ndash; c d</span></font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">审判阶段</span><span lang="EN-US"><font face="Times New Roman"> ---- </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">法官</span><span lang="EN-US"><font face="Times New Roman"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>--e f</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结案阶段</span><span lang="EN-US"><font face="Times New Roman"> ---- </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">法官</span><span lang="EN-US"><font face="Times New Roman"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>--g h</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 24pt; TEXT-INDENT: -24pt; mso-list: l0 level1 lfo3; tab-stops: list 24.0pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="FONT-SIZE: 12pt; mso-bidi-font-family: 宋体"><span style="mso-list: Ignore"><font face="Times New Roman">一．<span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></span></span></strong><strong style="mso-bidi-font-weight: normal"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">需要工作流的本质</span></strong><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="FONT-SIZE: 12pt"><o:p></o:p></span></strong></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">根据上述的情景，试想一下没有工作流的情况，我们一般的实现方式</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">为了将问题简单化</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定义一个</span><span lang="EN-US"><font face="Times New Roman">model</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为</span><span lang="EN-US"><font face="Times New Roman">Case --- </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">案件</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其中</span><span lang="EN-US"><font face="Times New Roman">Case</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">里面有一个属性，专门纪录案件状态，为</span><span lang="EN-US"><font face="Times New Roman">state</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在立案状态，</span><span lang="EN-US"><font face="Times New Roman">state =&rsquo;L&rsquo;</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><span style="mso-spacerun: yes"><font face="Times New Roman">&nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分案状态，</span><span lang="EN-US"><font face="Times New Roman">state =&rsquo;F&rsquo;</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><span style="mso-spacerun: yes"><font face="Times New Roman">&nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">审判状态，</span><span lang="EN-US"><font face="Times New Roman">state =&rsquo;S&rsquo;</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><span style="mso-spacerun: yes"><font face="Times New Roman">&nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结案状态，</span><span lang="EN-US"><font face="Times New Roman">state =&rsquo;J&rsquo;</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还有一个与案件相关的</span><span lang="EN-US"><font face="Times New Roman">Repository</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span><span lang="EN-US"><font face="Times New Roman">CaseRepository</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">以及处理案件的用例</span><span lang="EN-US"><font face="Times New Roman">ProcessCaseService</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们只分析处理案件用例里面的</span><span lang="EN-US"><font face="Times New Roman">3</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个子用例</span><span lang="EN-US"><font face="Times New Roman"> </font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21.75pt; TEXT-INDENT: -21.75pt; mso-list: l2 level1 lfo1; tab-stops: list 21.75pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">1．</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp;&nbsp;&nbsp; </span></font></span></span><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">取得相关案件</span><span lang="EN-US"><font face="Times New Roman"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>List getCases(String userName)</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21.75pt; TEXT-INDENT: -21.75pt; mso-list: l2 level1 lfo1; tab-stops: list 21.75pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">2．</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp;&nbsp;&nbsp; </span></font></span></span><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">改变案件状态</span><span lang="EN-US"><font face="Times New Roman"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>void changeCaseState(String userName)</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21.75pt; TEXT-INDENT: -21.75pt; mso-list: l2 level1 lfo1; tab-stops: list 21.75pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">3．</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp;&nbsp;&nbsp; </span></font></span></span><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">由立案人员建立一个案件</span><font face="Times New Roman"> <span lang="EN-US">void createCase(String userName)</span></font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21.75pt; TEXT-INDENT: -21.75pt; mso-list: l2 level1 lfo1; tab-stops: list 21.75pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">4．</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp;&nbsp;&nbsp; </span></font></span></span><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">处理案件</span><span lang="EN-US"><font face="Times New Roman"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>void dealCase(BussinessDomain business)</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还有一个处理用户和用户组的用例</span><span lang="EN-US"><font face="Times New Roman">ProcessOrganizationService</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">里面的相关的用例有</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman">1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">．取得相关的用户组</span><font face="Times New Roman"> <span lang="EN-US">String getGroupName(String userName)<o:p></o:p></span></font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">立案人员有</span><span lang="EN-US"><font face="Times New Roman">3</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个用例与之相关</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo2; tab-stops: list 18.0pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">1．</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp; </span></font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">只获得与立案阶段相关的案件</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo2; tab-stops: list 18.0pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">2．</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp; </span></font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">将案件状态改变为分案状态</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo2; tab-stops: list 18.0pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">3．</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp; </span></font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">建立一个处于立案阶段的案件</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo2; tab-stops: list 18.0pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">4．</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp; </span></font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">处理立案阶段案件的相关数据</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">分案人员同样与立案人员有相似的用例</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">整一个案件的处理过程，也就是整一个处理案件的主线</span><span lang="EN-US"><o:p></o:p></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">立案</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分案</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">审判</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结案</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">而这一个过程，涉及到的相关的业务逻辑有</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman">1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">．只获得属于自己处理阶段的相关案件</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman">2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">．改变案件状态</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman">3</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">．案件状态对应的</span><span lang="EN-US"><font face="Times New Roman">groupName</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当业务逻辑发生变化的时候</span><span lang="EN-US"><font face="Times New Roman">,</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">比如有的地方法院实现分案，后立案</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分案</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span lang="EN-US"><font face="Times New Roman"> </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">立案</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">审判</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结案</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">那么，针对这个法院，我们就要对我们原来存在的系统进行代码的修整</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">原来是立案人员建立一个案件</span><font face="Times New Roman"> </font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">现在由分案人员建立一个案件</span><span lang="EN-US"><font face="Times New Roman"> </font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">需要修正的代码是</span><span lang="EN-US"><font face="Times New Roman">void createCase(String userName)</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这个时候，又有的地方法院分案阶段处理的案件属性是</span><span lang="EN-US"><font face="Times New Roman">a</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span><span lang="EN-US"><font face="Times New Roman">b,</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">而不是原来的</span><span lang="EN-US"><font face="Times New Roman">c</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span><span lang="EN-US"><font face="Times New Roman">d</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">需要修正的代码是</span><span lang="EN-US"><font face="Times New Roman">void dealCase(BussinessDomain business)</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当</span><span lang="EN-US"><font face="Times New Roman">dealCase</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">业务逻辑复杂的时候，所需要修改的代码是海量的</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">这时候，又有的法院的案件处理是分案人员负责立案，立案人员负责分案</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">需要修正代码的地方是</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3" face="Times New Roman">void changeCaseState(String userName)</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3" face="Times New Roman">void createCase(String userName)</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3" face="Times New Roman">void dealCase(BussinessDomain business)</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">这里只是法院的业务流程，每个行业都有每个行业自己的业务流程，为了将对业务流程的处理这一部分，抽取出来，并且尽可能的少修改代码，就有了工作流引擎的产生</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><span style="mso-spacerun: yes"><font size="3" face="Times New Roman">&nbsp; </font></span></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 24pt; TEXT-INDENT: -24pt; mso-list: l0 level1 lfo3; tab-stops: list 24.0pt"><font face="Times New Roman"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="FONT-SIZE: 12pt; mso-bidi-font-family: 宋体"><span style="mso-list: Ignore">二．<span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></strong><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="FONT-SIZE: 12pt">wfmc</span></strong></font><strong style="mso-bidi-font-weight: normal"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定义的域模型</span></strong><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="FONT-SIZE: 12pt"><o:p></o:p></span></strong></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">业务流程是什么？业务逻辑的那些部分是属于业务流程？哪些业务逻辑是要划分给工作流引擎的呢？</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo4; tab-stops: list 18.0pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">1．</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp; </span></font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">什么是需要根据实际情况系统要发生改变</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">根据情景</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman">(1) </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一般法院的案件处理流程为</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">立案</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分案</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">审判</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结案</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">而有的法院为</span><span lang="EN-US"><font face="Times New Roman"> </font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><font size="3"><span lang="EN-US"><span style="mso-spacerun: yes"><font face="Times New Roman">&nbsp;&nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分案</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span lang="EN-US"><font face="Times New Roman"> </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">立案</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">审判</span><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">&agrave;</span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结案</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><font size="3"><strong style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这</span><span lang="EN-US"><font face="Times New Roman">4</font></span></strong><strong style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个阶段的先后顺序会发生变化</span><span lang="EN-US"><o:p></o:p></span></strong></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 23.25pt; TEXT-INDENT: -23.25pt; mso-list: l3 level1 lfo5; tab-stops: list 23.25pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">(2)</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></span></span><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有的地方法院分案阶段处理的案件属性是</span><span lang="EN-US"><font face="Times New Roman">a</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span><span lang="EN-US"><font face="Times New Roman">b,</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">而不是原来的</span><span lang="EN-US"><font face="Times New Roman">c</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span><span lang="EN-US"><font face="Times New Roman">d</font></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 23.25pt"><strong style="mso-bidi-font-weight: normal"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不同阶段需要处理的案件相关数据发生变化</span><span lang="EN-US"><o:p></o:p></span></font></strong></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 23.25pt; TEXT-INDENT: -23.25pt; mso-list: l3 level1 lfo5; tab-stops: list 23.25pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">(3)</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">有的地方法院是分案人员负责立案，立案人员负责分案</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 23.25pt"><strong style="mso-bidi-font-weight: normal"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">角色所要负责处理的相应阶段的事情发生了变化</span><span lang="EN-US"><o:p></o:p></span></font></strong></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US"><o:p><font size="3" face="Times New Roman">&nbsp;</font></o:p></span></strong></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这个情景只是法院的情况，不同的领域，业务流程也不一样。为了将所有领域的业务流程的抽取出来，标准化组织对此做出了明确的定义，并定义了元数据模型，也就是我们开发过程中的业务流程相关的</span><span lang="EN-US"><font face="Times New Roman">model</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如下图</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><img src="http://www.javaeye.com/topics/download/07f2a0f5-72af-4bd6-abff-5272bfab7751" alt="" /></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></span></font></p>
<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">不同的流程有时会调用相同的相关数据，以及组织结构等这部分公共数据可能是相同的</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">标准化组织又在基本的</span><span lang="EN-US"><font face="Times New Roman">model</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">之上定义了包结构</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如下图</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><img src="http://www.javaeye.com/topics/download/5704559a-d45a-4f56-962a-edeba0e85649" alt="" /></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">&nbsp;</p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">目的就是为了防止重复定义，增强复用性，被包内任何工作流定义引用</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">1．</font><span new="" times="" style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">&nbsp; </span></font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">工作流引擎怎么与其他业务逻辑交互以及与抽取的业务流程互交，以及工作流引擎自身如何管理，不同的工作流引擎之间又如何互交</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">标准化组织又为工作流引擎明确定义了一下接口</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3"><img src="http://www.javaeye.com/topics/download/58453005-dc80-4d88-9b80-5b43e90cbaa9" alt="" /></font></span></p>
<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman">nterface1 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">解决了与其他业务逻辑交互以及与抽取的业务流程互交问题</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman">interface2 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就是工作流引擎相关的客户端</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman">interface3 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就是流程处理中，所需要调用的外部程序，如何和他们互交</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman">interface4 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就是如何与其他工作流引擎互交</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman">interface5 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就是工作流引擎的管理和监控接口，改变工作流的一些初始化配置</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">&nbsp;</p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">&nbsp;</p>
</span></span>
          <br/>
          <span style="color:red;">
            <a href="http://dingyuan.javaeye.com/blog/40307#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 22 Dec 2006 14:29:20 +0800</pubDate>
        <link>http://dingyuan.javaeye.com/blog/40307</link>
        <guid>http://dingyuan.javaeye.com/blog/40307</guid>
      </item>
      <item>
        <title>事务概念</title>
        <author>dingyuan</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://dingyuan.javaeye.com">dingyuan</a>&nbsp;
          链接：<a href="http://dingyuan.javaeye.com/blog/37436" style="color:red;">http://dingyuan.javaeye.com/blog/37436</a>&nbsp;
          发表时间: 2006年12月05日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><em class="FIRSTTERM">事务</em>是所有数据库系统的一个基本概念。 一次事务的要点就是它把多个步骤捆绑成了一个单一的，不成功则成仁的操作。 其它并发的事务是看不到在这些步骤之间的中间状态的，并且如果发生了一些问题， 导致该事务无法完成，那么所有这些步骤都完全不会影响数据库。 </p>
<p>比如，假设一个银行的数据库包含各种客户帐户的余额，以及每个分行的总余额。 假设我们要记录一次从 Alice 的帐户到 Bob 的帐户的金额为 $100.00 的支付动作。那么，完成这个任务的简单到极点的 SQL 命令象下面这样 </p>
<pre class="PROGRAMLISTING">UPDATE accounts SET balance = balance - 100.00
    WHERE name = 'Alice';
UPDATE branches SET balance = balance - 100.00
    WHERE name = (SELECT branch_name FROM accounts WHERE name = 'Alice');
UPDATE accounts SET balance = balance + 100.00
    WHERE name = 'Bob';
UPDATE branches SET balance = balance + 100.00
    WHERE name = (SELECT branch_name FROM accounts WHERE name = 'Bob');</pre>
<p>&nbsp;</p>
<p>这些命令的细节在这儿并不重要；重要的是这里牵涉到了好几个独立的更新来完成这个相当简单的操作。 我们的银行官员会希望要么所有这些更新都生效，要么全部不起作用。 我们当然不希望一次系统崩溃就导致 Bob 收到 100 块不是 Alice 支付的钱， 也不希望 Alice 老是不花钱从 Bob 那里拿到物品。我们需要保证：如果在操作的过程中出了差错， 那么所有这些步骤都不会发生效果。把这些更新组合成一个<em class="FIRSTTERM">事务</em>就给予我们这样的保证。 事务被认为是<em class="FIRSTTERM">原子的</em>：从其它事务的角度来看，它要么是全部发生，要么完全不发生。 </p>
<p>我们还需要保证：一旦一个事务完成并且得到数据库系统的认可， 那么它必须被真正永久地存储，并且不会在随后的崩溃中消失。 比如，如果我们记录到了一个 Bob 撤单的动作， 那么我们不希望仅仅在他走出银行大门之后的一次崩溃就会导致对他的帐户的扣减动作消失。 一个事务型数据库保证一个事务所做的所有更新在事务发出完成响应之前都记录到永久的存储中（也就是磁盘）。 </p>
<p>事务型数据库的另外一个重要的性质和原子更新的概念关系密切： 当多个事务并发地运行的时候，那么每个事务都不应看到其它事务所做的未完成的变化。 比如，如果一个事务正忙着计算所有分行的余额总和， 那么它不应该包括来自 Alice 的分行的扣帐和来自 Bob 分行的入帐，反之亦然。 所以事务必须是黑白分明的，不仅仅体现在它们在数据库上产生的永久影响出发，而且体现在它们运转时的自身的可视性上。 一个打开的事务做的更新在它完成之前是其它事务无法看到的，而到提交的时候所有更新同时可见。 </p>
<p>在 <span class="PRODUCTNAME">PostgreSQL</span> 里，一个事务是通过把 SQL 命令用 <tt class="COMMAND">BEGIN</tt> 和 <tt class="COMMAND">COMMIT</tt> 命令包围实现的。 因此我们的银行事务实际上看起来象下面这样 </p>
<pre class="PROGRAMLISTING">BEGIN;
UPDATE accounts SET balance = balance - 100.00
    WHERE name = 'Alice';
-- 等等
COMMIT;</pre>
<p>&nbsp;</p>
<p>如果在该事务的过程中，我们决定不做提交（可能是我们刚发现 Alice 的余额是负数）， 那么我们可以发出 <tt class="COMMAND">ROLLBACK</tt> 命令而不是 <tt class="COMMAND">COMMIT</tt> 命令，那么到目前为止我们的所有更新都会被取消。 </p>
<p><span class="PRODUCTNAME">PostgreSQL</span> 实际上把每个 SQL 语句当做在一个事务中执行的来看待。 如果你没有发出 <tt class="COMMAND">BEGIN</tt> 命令，那么每个独立的语句都有一个隐含的 <tt class="COMMAND">BEGIN</tt> 和（如果成功的话） <tt class="COMMAND">COMMIT</tt> 语句包围在周围。 一组包围在 <tt class="COMMAND">BEGIN</tt> 和 <tt class="COMMAND">COMMIT</tt> 语句中间的语句有时候被称做<em class="FIRSTTERM">事务块</em>。 </p>
<div class="NOTE"><blockquote class="NOTE">
<p><strong>注意: </strong>一些客户库自动发出 <tt class="COMMAND">BEGIN</tt> 和 <tt class="COMMAND">COMMIT</tt>， 因此你可能不需要特意请求就可以获取事务块的效果。查看你使用的接口的文档。 </p>
</blockquote></div>
<p>我们可以通过使用 <em class="FIRSTTERM">savepoints</em> 的方法，在一个事务里更加精细地控制其中的语句。 保存点允许你有选择性地抛弃事务中的某些部分，而提交其它剩下的。 在用 <tt class="COMMAND">SAVEPOINT</tt> 定义了一个保存点后，如果需要，你可以使用 <tt class="COMMAND">ROLLBACK TO</tt> 回滚到该保存点。 则该事务在定义保存点到回滚到它之间的所有数据库更改都被抛弃，但是在保存点之前的修改将被保留。 </p>
<p>在回滚到一个保存点之后，这个保存点仍然保存着其定义，所以你可以回滚到这个位置好几次。 当然，如果你确信你不需要再次回滚到一个保存点，那么你可以释放它，这样系统可以释放一些资源。 要记住：释放或者回滚到一个保存点都会自动释放在其后定义的所有保存点。 </p>
<p>所有这些都发生在一个事务块内部，所以所有这些都不可能被其它事务会话看到。 当且仅当你提交了这个事务块，这些提交了的动作才能以一个单元的方式被其它会话看到， 而回滚的动作完全不会再被看到。 </p>
<p>还记得我们的银行数据库吗？假设我们从 Alice 的帐户上消费 $100.00， 然后给 Bob 的帐户进行贷记加款，稍后我们发现我们应该给 Wally 的账号贷记加款。 那么我们可以像下面这样的保存点来做： </p>
<pre class="PROGRAMLISTING">BEGIN;
UPDATE accounts SET balance = balance - 100.00
    WHERE name = 'Alice';
SAVEPOINT my_savepoint;
UPDATE accounts SET balance = balance + 100.00
    WHERE name = 'Bob';
-- 呀！加错钱了，应该用 Wally 的账号
ROLLBACK TO my_savepoint;
UPDATE accounts SET balance = balance + 100.00
    WHERE name = 'Wally';
COMMIT;</pre>
<p>&nbsp;</p>
<p>这个例子当然是实在太简单了，但是通过使用保存点，我们可以对事务块有大量的控制。 并且，<tt class="COMMAND">ROLLBACK TO</tt> 是除了事务全部回滚，重新来过之外的唯一可用的， 用于重新控制一个因错误而被系统置于退出状态下的事务的方法。 </p>
          <br/>
          <span style="color:red;">
            <a href="http://dingyuan.javaeye.com/blog/37436#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Tue, 05 Dec 2006 19:54:26 +0800</pubDate>
        <link>http://dingyuan.javaeye.com/blog/37436</link>
        <guid>http://dingyuan.javaeye.com/blog/37436</guid>
      </item>
      <item>
        <title>外键概念</title>
        <author>dingyuan</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://dingyuan.javaeye.com">dingyuan</a>&nbsp;
          链接：<a href="http://dingyuan.javaeye.com/blog/37435" style="color:red;">http://dingyuan.javaeye.com/blog/37435</a>&nbsp;
          发表时间: 2006年12月05日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><code class="CLASSNAME">weather</code> 和 <code class="CLASSNAME">cities</code> 表。考虑一下下面的问题：你想确保没有人可以在 <code class="CLASSNAME">weather</code> 表里插入一条在 <code class="CLASSNAME">cities</code> 表里没有匹配记录的数据行。 这就叫维护你的表的<em class="FIRSTTERM">参考完整性</em>。 在简单的数据库系统里，实现（如果也叫实现）这个特性的方法 通常是先看看 <code class="CLASSNAME">cities</code> 表里是否有匹配的记录， 然后插入或者拒绝新的 <code class="CLASSNAME">weather</code> 记录。 这个方法有许多问题，而且非常不便，因此 <span class="PRODUCTNAME">PostgreSQL</span> 可以为你做这些。 </p>
<p>新的表声明看起来会象下面这样： </p>
<pre class="PROGRAMLISTING">CREATE TABLE cities (
        city            varchar(80) primary key,
        location        point
);

CREATE TABLE weather (
        city            varchar(80) references cities(city),
        temp_lo         int,
        temp_hi         int,
        prcp            real,
        date            date
);
</pre>
<p>然后我们试图插入一条非法的记录： </p>
<pre class="PROGRAMLISTING">INSERT INTO weather VALUES ('Berkeley', 45, 53, 0.0, '1994-11-28');</pre>
<p>&nbsp;</p>
<pre class="SCREEN">ERROR:  insert or update on table &quot;weather&quot; violates foreign key constraint &quot;weather_city_fkey&quot;
DETAIL:  Key (city)=(Berkeley) is not present in table &quot;cities&quot;.</pre>
          <br/>
          <span style="color:red;">
            <a href="http://dingyuan.javaeye.com/blog/37435#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Tue, 05 Dec 2006 19:49:29 +0800</pubDate>
        <link>http://dingyuan.javaeye.com/blog/37435</link>
        <guid>http://dingyuan.javaeye.com/blog/37435</guid>
      </item>
      <item>
        <title>左级联,右级联概念</title>
        <author>dingyuan</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://dingyuan.javaeye.com">dingyuan</a>&nbsp;
          链接：<a href="http://dingyuan.javaeye.com/blog/37433" style="color:red;">http://dingyuan.javaeye.com/blog/37433</a>&nbsp;
          发表时间: 2006年12月05日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>这个查询是一个<em class="FIRSTTERM">左手边外连接</em>， 因为在连接操作符（译注∶LEFT OUTER JOIN）左手边的表中的行在输出中至少要出现一次， 而在右手边的行将只输出那些与左手边行有对应匹配的行。 如果输出的左手边表的行没有对应匹配的右手边表的行，那么在右手边行的字段将填充空（NULL）。 </p>
          <br/>
          <span style="color:red;">
            <a href="http://dingyuan.javaeye.com/blog/37433#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Tue, 05 Dec 2006 19:43:19 +0800</pubDate>
        <link>http://dingyuan.javaeye.com/blog/37433</link>
        <guid>http://dingyuan.javaeye.com/blog/37433</guid>
      </item>
      <item>
        <title>spring loaded observer pattern</title>
        <author>dingyuan</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://dingyuan.javaeye.com">dingyuan</a>&nbsp;
          链接：<a href="http://dingyuan.javaeye.com/blog/35608" style="color:red;">http://dingyuan.javaeye.com/blog/35608</a>&nbsp;
          发表时间: 2006年11月23日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>转自<br />
<font face="Arial">http://www.theserverside.com/tt/articles/article.tss?l=SpringLoadedObserverPattern</font></p>
<p>This article describes an easy process of implementing the observer pattern in the Spring framework (Spring Core). Also discussed in this article are a few of the Spring Core classes as well as an easy way to start the Spring Framework in any project. Finally, this article shows developers and designers that the Spring framework is a great reason to continue design pattern advocacy in your projects.</p>
<p>Recently, it seems when developers use the Spring framework to improve their projects they focus only on simple object oriented design techniques. Unfortunately some of the more brilliantly researched patterns are forgotten in place of a brilliant framework (Spring). Although the Factory Pattern and the Singleton Pattern are built into Spring, other patterns such as the Decorator Pattern, the Adapter Pattern, and the Observer Pattern are often forgotten because of the new ideas Spring has to offer. Fortunately, design patterns and the Spring framework can exist in the same application. In this article I show how the commonly used Observer Pattern fits nicely in the Spring Framework.</p>
<h2>Observer Pattern</h2>
<p>The Observer Pattern is also known as a publisher and subscriber design pattern. The pattern is useful when you have one publisher and many subscribers (one-to-many) that are interested in the publisher's state or messages. Additionally, interested subscribers have the ability to register and unregister as they please. Lastly, subscribers are notified of the publisher's messages automatically (that is, by no effort of their own). Figure 1 is an example of a typical observer pattern.</p>
<h5>Figure 1. Observer Pattern</h5>
<p><img src="http://www.theserverside.com/tt/articles/content/SpringLoadedObserverPattern/clip_image002.jpg" height="307" alt="" width="499" /><br />
</p>
<p>I chose to use a more widely accepted diagram to describe the Observer Pattern so you will notice that the aforementioned publisher is actually the Subject in this diagram. The subscriber is the Observer in the diagram. The intimate details of the Observer Pattern are far outside of the scope of this article, but a note worthy topic is how the Spring framework can be used to leverage good object oriented design techniques while creating the concrete classes of this pattern.</p>
<p>A normal concreteObserver class is required to have code similar to this constructor (or a similar &ldquo;setter&rdquo; method to achieve the registering of the Observer with the Subject):</p>
<pre>public concreteObserver(Subject s) {
	s.addListener(this);
}
</pre>
<p>Below you will see how the Spring framework wires the two concrete classes together with XML and not with code inside the classes. Ultimately, this allows the developer to avoid any unnecessary coupling of the concrete classes.</p>
<h2>Spring Considerations</h2>
<p>Since this article covers only the most simple implementation of the observer pattern, I utilize only the required Spring framework jars. At a minimum you need to have the spring-core.jar, the spring-context.jar, and the spring-beans.jar from the Spring framework distribution. Also to avoid any run time errors you need the commons-logging.jar from the Apache Commons project in your class path.</p>
<p>Each of these jars provide a specific role that make using the Spring framework possible. First is the spring-core.jar; this jar is required for all Spring applications. It includes Spring's dependency injection classes as well as other classes that are used to create Spring beans. The spring-context.jar contains the ApplicationContext interface. This interface is used to start the Spring framework in my included example project.</p>
<p>The last Spring jar is the spring-beans.jar. It contains the DesposibleBean interface which the FileSystemXmlApplicationContext bean sub-interfaces. I do not directly use the DesposibleBean interface but I use the FileSystemXmlApplicationContext bean to located the XML file used to configure the Spring framework. The code that implements these classes is shown in Listing 6.</p>
<h2>Wiring The Observer Pattern with Spring</h2>
<p>To illustrate the Observer Pattern concretely, I chose to create a Town Crier class that sends messages to any registered Town Resident class. To keep this example simple, I developed the same interfaces shown in Figure 1, but the concrete classes are TownCrier and TownResident. All four of these classes are shown in Listings 1 through 4.</p>
<p>After I created the TownCrier (Listing 3) and two TownResident (Listing 4) classes I created an incomplete version the ObserverContext.xml file (Listing 5). This file contains the Spring definitions of the concrete implementation beans. Since this example is simple, I chose not to use any of the more complex attributes of the bean tag.</p>
<p>Typical Bean tags for the shown classes:</p>
<pre>	<bean class="springobserver.TownCrier" id="townCrier"></bean>
	<bean class="springobserver.TownResident" id="townResident1"></bean>
	<bean class="springobserver.TownResident2" id="townResident1"></bean>
</pre>
<p>At this point, I was able to run my ExampleRun class (Listing 6), but nothing eventful actually happened. This is because the TownResident classes were not &ldquo;wired&rdquo; into the TownCrier class.</p>
<p>To perform the wiring of the Observer Pattern I chose to use Spring's MethodInvokingFactoryBean class. This process is a very simple way of calling a method on a class and ultimately passing a parameter into method. In this example, the parameter is the bean definition of a townResident. A snapshot of this bean definition is:</p>
<pre><bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" id="registerTownResident1"></bean>
    <property name="targetObject"><ref local="townCrier"></ref></property>
    <property name="targetMethod"><value></value>addListener</property>
    <property name="arguments">
    <list></list>
      <ref bean="townResident1"></ref>
    
    </property>

</pre>
<p>As you can see, the targetObject is the townCrier bean, the targetMethod is the addListener method and the argument is the townResident1 bean. This configuration is the only code needed to compose the concrete implementations of the TownCrier with TownResident class.</p>
<p>Now that I have the beans wired together using the MethodInvokingFactoryBean class, I can run my ExampleRun class and see that my TownResident classes are receiving messages from the TownCrier class. Results shown in Example 1.</p>
<h2>Conclusion</h2>
<p>A few lessons learned in this article include a simple way to start the Spring framework, how to use the MethodInvokingFactoryBean, and an efficient implementation the Observer Pattern in the Spring framework. Since this is a minimal approach to the Spring framework, I was able to show the relationship between the ApplicationContext and it's implementation FileSystemXmlApplicationContext class. This process for starting Spring applications is a very easy way to leverage an incredible framework.</p>
<p>Part of this framework is the MethodInvokingFactoryBean. When using it you are free to employ any parameter available to you such as an Integer, a String, or in our case, another Spring bean. By allowing you to expose methods in your context xml files you can be as flexible as you can dream. This article has covered the addListener() method of the Observer Pattern. I would like to extend a challenge to you to figure out how to implement the removeListener() method using strictly the Spring framework.</p>
<p>Lastly, the Observer Pattern is a common and very useful pattern. The practices shown in this article provide an example of how the concrete implementation of the Observer interface can be developed with no additional coupling to the concrete implementation of the Subject interface. This feature of Spring encourages good object oriented design techniques. As a final note, there is really no reason developers and designers can not find ways to marry proven design patterns with beautifully developed frameworks.</p>
<h5>Listing 1. The Observer Interface</h5>
<pre>package springobserver;
public interface Observer {
  public void update(String messageText);
}
</pre>
<h5>Listing 2. The Subject Interface</h5>
<pre>package springobserver;
public interface Subject {
  public void addListener(Observer o);
  public void removeListener(Observer o);
  public void notifyListeners();
}
</pre>
<h5>Listing 3. The Town Crier</h5>
<pre>package springobserver;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class TownCrier implements Subject {

	private List townResident = new ArrayList();
	private String messageText;

	// this message is added so I can give 
	// this class a reason to call notifyListener.
	public void setMessage(String message){
		System.out.println(&quot;I'm the Town Crier and &quot; +
				&quot;I've got a message: &quot; + message);
		this.messageText = message;
		this.notifyListeners();
	}
	
	public void addListener(Observer o) {
		this.townResident.add(o);
	}

	public void removeListener(Observer o) {
		if (this.townResident.contains(o)){
			this.townResident.remove(o);
		}
	}

	
	// call the update method on 
	// each observer (town resident)
	public void notifyListeners() {
		for (Iterator iter = townResident.iterator(); iter.hasNext();) {
			Observer listener = (Observer) iter.next();
			listener.update(messageText);
		}
	}

}
</pre>
<h5>Listing 4. The Town Residents</h5>
<pre>package springobserver;

public class TownResident implements Observer {
	public void update(String messageText) {
		System.out.println(&quot;Greetings my name is: &quot; + this);
		System.out.println(&quot;I heard: &quot; + messageText);
	}

-------- new class --------
package springobserver;

public class TownResident2 implements Observer {
	public void update(String messageText) {
		System.out.println(&quot;Greetings my name is: &quot; + this);
		System.out.println(&quot;I heard: &quot; + messageText);
	}

}</pre>
<h5>Listing 5. The Application Context XML (ObserverContext.xml)</h5>
<!-- 6 -->
<pre><!--l version="1.0" encoding="UTF-8-->
<!--CTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
"http://www.springframework.org/dtd/spring-beans.dt-->

<beans></beans>
	<!-- This bean is the town crier.  
	He's responsible for notifying all town residents that are interested in his message -->
	<bean class="springobserver.TownCrier" id="townCrier"></bean>
	
	<!-- this bean is a town resident interested in the town criers messages -->
	<bean class="springobserver.TownResident" id="townResident1"></bean>          
       
	<!-- this bean is another town resident interested in the town criers messages -->
	<bean class="springobserver.TownResident2" id="townResident2"></bean>
    
    
     <!-- this is a method invoking bean that registers the first town resident with
          with the town crier -->   
    <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" id="registerTownResident1"></bean>
      <property name="targetObject"><ref local="townCrier"></ref></property>
      <property name="targetMethod"><value></value>addListener</property>
      <property name="arguments">
      <list></list>
        <ref bean="townResident1"></ref>
      
      </property>
    
    
    
     <!-- this is a method invoking bean that registers the second town 
          resident with the town crier -->   
    <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" id="registerTownResident2"></bean>
      <property name="targetObject"><ref local="townCrier"></ref></property>
      <property name="targetMethod"><value></value>addListener</property>
      <property name="arguments">
      <list></list>
        <ref bean="townResident2"></ref>
      
      </property>
             
 
 
</pre>
<!-- 7 -->
<h5>Listing 6. Example Run</h5>
<pre>package springobserver;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class ExampleRun {
	public static void main(String[] args) {
		// launch the spring frame work.
		ApplicationContext ctx = new FileSystemXmlApplicationContext(
				&quot;/config/ObserverContext.xml&quot;);
		// grab the Town Crier out of the spring 
		// framework and send a message too all observers
		TownCrier crier = (TownCrier) ctx.getBean(&quot;townCrier&quot;);
		crier.setMessage(&quot;It is 1 O'Clock and all is well!&quot;);
	}
}
</pre>
<h5>Example 1. System Output</h5>
<pre>I'm the Town Crier and I've got a message: It is 1 O'Clock and all is well!
Greetings my name is: springobserver.TownResident@80fa6f
I heard: It is 1 O'Clock and all is well!
Greetings my name is: springobserver.TownResident2@1b9ce4b
I heard: It is 1 O'Clock and all is well!!
</pre>
          <br/>
          <span style="color:red;">
            <a href="http://dingyuan.javaeye.com/blog/35608#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 23 Nov 2006 12:52:28 +0800</pubDate>
        <link>http://dingyuan.javaeye.com/blog/35608</link>
        <guid>http://dingyuan.javaeye.com/blog/35608</guid>
      </item>
      <item>
        <title>不应该用struts的思维去想jsf</title>
        <author>dingyuan</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://dingyuan.javaeye.com">dingyuan</a>&nbsp;
          链接：<a href="http://dingyuan.javaeye.com/blog/34729" style="color:red;">http://dingyuan.javaeye.com/blog/34729</a>&nbsp;
          发表时间: 2006年11月17日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>无论是struts ,还是 webwork, 对于组件的复用主要集中在业务逻辑层..通过action调用不同的manager去实现服用.</p>
<p>但如果把backingbean看成action,那我觉得绝对是对jsf的一种滥用了</p>
<p>而jsf对于组件的复用,却应该复用在web层.....不同的页面可以调用相同的backingbean组件,也就是把manager直接提取为backingbean.</p>
<p>这样页面的灵活性相当的高...当然在struts, webwork里面通过<c:import>的方式也有间接的解决服用性的办法</c:import></p>
<p><c:import>seam更是将实体bean和会话bean和jsf的backingbean结合到了一起</c:import></p>
<p>随着jsf1.2和jsp2.1的出现之后,相信jsf能走得更好...</p>
          <br/>
          <span style="color:red;">
            <a href="http://dingyuan.javaeye.com/blog/34729#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 17 Nov 2006 12:44:36 +0800</pubDate>
        <link>http://dingyuan.javaeye.com/blog/34729</link>
        <guid>http://dingyuan.javaeye.com/blog/34729</guid>
      </item>
  </channel>
</rss>