<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8252421586595387612</id><updated>2024-09-12T01:56:30.524+08:00</updated><category term="Oracle"/><category term="BPM"/><category term="SOA"/><category term="BPMN"/><category term="GlassFish"/><category term="JavaEE6"/><category term="WebLogic"/><title type='text'>提姆碎碎唸</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-2449474554266812314</id><published>2012-04-05T12:10:00.006+08:00</published><updated>2012-04-05T12:12:52.094+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>[Oracle BPM/SOA 實務] 彈性欄位(Flex Field)的應用</title><content type='html'>最近一些合作夥伴遇到一個開發的問題，我想應該蠻多人實務上會遇到這樣的情形的，請注意，閱讀這一篇內容時請先確定你做過&lt;a href=&quot;http://timwu1975.blogspot.jp/2011/02/oracle-bpmsoa-bpm.html&quot;&gt;【客制化前端應用程式】&lt;/a&gt;。&lt;br /&gt;
&lt;br /&gt;
問題是這樣的：&lt;br /&gt;
在應用程式前端進行人工單取件時，通常使用下列的API進行&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #38761d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; id=&quot;aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 指定查詢條件 -- 此處只抓出已經ASSIGNED給特定角色的&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;工作&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;Predicate pred = new Predicate(TableConstants.WFTASK_STATE_COLUMN, Predicate.OP_EQ, &quot;ASSIGNED&quot;);&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;// 執行查詢&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;result = querySvc.queryTasks(bpmCtx,&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queryColumns,&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; optionalInfo,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ITaskQueryService.AssignmentFilter.MY_AND_GROUP,&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// 抓出指定給該使用&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //者本人或其所屬群組&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; null,&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// 不使用keywords&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pred,&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; null,&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// 沒有指定查詢排序&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0, &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// 不paging查詢結果&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0);&lt;/span&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
在這樣的設計之下，前端應用查詢出來的是我們在指定查詢條件中，Predicate物件所設定的【已經在ASSIGNED狀態下的所有工作，但是在某些情形之下，如果人工單案件很多，我們會希望可以增加一些查詢條件，&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;根據流程中所帶入給此人工單的變數&lt;/span&gt;&lt;/b&gt;來查詢，以增加查詢的效能，這個時候我們就會需要應用到彈性欄位(Flex Field)的使用。&lt;br /&gt;
&lt;br /&gt;
彈性欄位的概念是，基本上，在Oracle BPM Server後端資料庫表格的欄位設計上，我們有一些預留一些欄位，作為讓開發人員儲存變數資料所用。簡單來說：在資料庫中，我們預先有設計了一個TABLE：&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;WFTASK&lt;/span&gt;用以記錄所有的人工單資料，此&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;WFTASK&lt;/span&gt; TABLE中包括：&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;TEXTATTRIBUTE1...TEXTATTRIBUTE10&lt;/span&gt;、&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;NUMBERATTRIBUTE1...NUMBERATTRIBUTE5&lt;/span&gt;以及&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;DATEATTRIBUTE1...DATEATTRIBUTE5&lt;/span&gt;等欄位，這些欄位基本上在預設的應用模式上面是不會被使用到的，是被預留給彈性查詢來使用的。我們就來看一些怎麼使用這些欄位吧!&lt;br /&gt;
&lt;br /&gt;
首先，使用weblogic帳號登入BPM Workspace，並且選擇右上角的【管理】選項，接下來的畫面你可以在左手邊看到彈性欄位的選項：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBBPeVweLKtJoPRxJD1VwTvjMqnBUEaaogtHauBsw7S2sZ9f5RDuLQozAOsSRrzJjiNh4gzCztY7sqBoKvFJKe4QpF8uHAMl69iFhzOeIoIX41hRLr6aNRPS161v9PElbxCSnvYhPzadQ/s1600/i1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;372&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBBPeVweLKtJoPRxJD1VwTvjMqnBUEaaogtHauBsw7S2sZ9f5RDuLQozAOsSRrzJjiNh4gzCztY7sqBoKvFJKe4QpF8uHAMl69iFhzOeIoIX41hRLr6aNRPS161v9PElbxCSnvYhPzadQ/s640/i1.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
首先，你可以為一個你需要使用到的欄位(如：TEXTATTRIBUTE1)指定它的標籤，舉例來說，我們在流程之中會帶入一個資料儲存上一個人工單關卡執行人員的ID，我們可以按下綠色的【加號】按鈕，增加一個名為【requestID】的文字屬性欄位，並且把他對應到【TextAttribute1】的資料庫欄位：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSL97YypTbu_w-pW4cC7U_WKMQZmHq8MSPss-drboyrUkc0XUkC_paO-zXZCNyAaEc2dqHLmI6YokwbJR4bKXiJYo2eGyw5tmLyTdvb5v-2XKpoR8a_rh4fI0gPLusLQ0Kf0EJJMcU5fo/s1600/i2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;374&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSL97YypTbu_w-pW4cC7U_WKMQZmHq8MSPss-drboyrUkc0XUkC_paO-zXZCNyAaEc2dqHLmI6YokwbJR4bKXiJYo2eGyw5tmLyTdvb5v-2XKpoR8a_rh4fI0gPLusLQ0Kf0EJJMcU5fo/s640/i2.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
完成標籤建立之後，接下來我們需要指定哪一個流程的那一個人工關卡要把那一個資料傳進來給這個標籤使用：&lt;br /&gt;
&lt;br /&gt;
選擇【按工作型態編輯對應】，並按下右手邊的【放大鏡】按鈕，如下圖畫面中，你可以打入你的人工關卡名稱，如：【Approve】，下方會列出所有滿足條件的人工關卡，接下來可以根據你要的流程名稱來去選擇正確的關卡。&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjqHnyWUZD_S2XsG6P2_b9eSZHaKZYOJ9XbXEFqw7WDBzFbrFuuTLYPX3e-xOdQ6w8SJRdSLR5gLj6Nsk5ulA5Am2ejWsx4cB7t29iPWpFPkInYxyfdtcqWuQ5AiQx_4DejuaYyJ05qpM/s1600/i3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;372&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjqHnyWUZD_S2XsG6P2_b9eSZHaKZYOJ9XbXEFqw7WDBzFbrFuuTLYPX3e-xOdQ6w8SJRdSLR5gLj6Nsk5ulA5Am2ejWsx4cB7t29iPWpFPkInYxyfdtcqWuQ5AiQx_4DejuaYyJ05qpM/s640/i3.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
選擇之後，接下來會選擇此關卡中哪一個帶入的資料會被存入此標籤：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqh_BQJCah8bDO4g0m7726US5xTYF0AHWNpYjZtZY-cd-mDMnQyNJAy0MkzbnltyKrnSDT4y0EOG-DGutOfaX4fr7LwHV-_tnHY73JayVHBhDR5V_exp0H3uwQOzH1YAitN0OUF93Uo_Y/s1600/i4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;374&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqh_BQJCah8bDO4g0m7726US5xTYF0AHWNpYjZtZY-cd-mDMnQyNJAy0MkzbnltyKrnSDT4y0EOG-DGutOfaX4fr7LwHV-_tnHY73JayVHBhDR5V_exp0H3uwQOzH1YAitN0OUF93Uo_Y/s640/i4.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
在畫面中間有對應的Payload屬性可選擇，此Payload屬性即是你人工關卡中所訂定義傳入的變數資料，這裡我們使用的是一個叫做【requestId】的變數為例，對應到剛才所完成的【requestID】標籤。特別注意的是，我們可以選擇的變數只有Simple Type，如文字、數字或日期的變數，假設你所傳入的是一整個XSD所定義的Business Object，基本上是沒辦法選擇的，唯一的做法是，你要把你需要做彈性欄位的資料，設計成一個Simple Type的變數傳入。&lt;br /&gt;
&lt;br /&gt;
完成之後，按下儲存即可。&lt;br /&gt;
&lt;br /&gt;
之後，所有執行到【Approve】關卡的流程實例，都會把他傳入給【requestId】變數存一份給【requestID】標籤，然後儲存到TEXTATTRIBUTE1資料庫欄位之中。&lt;br /&gt;
&lt;br /&gt;
未來，在前端應用程式的
&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;Predicate&amp;nbsp;&lt;/span&gt;物件設計就可以多一個查詢條件，來加快查詢的效能：&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #38761d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; id=&quot;aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 指定查詢條件 -- 此處只抓出已經ASSIGNED給特定角色的&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;工作&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;Predicate pred = new Predicate(TableConstants.WFTASK_STATE_COLUMN, Predicate.OP_EQ, &quot;ASSIGNED&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #38761d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; id=&quot;aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 增加查詢條件 -- TEXTATTRIBUTE1欄位等於某字串&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;pred.addClause(Predicate.AND, TableConstants.WFTASK_TEXTATTRIBUTE1_COLUMN, Predicate.OP_EQ, &quot;searchString&quot;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/2449474554266812314/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/2449474554266812314' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/2449474554266812314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/2449474554266812314'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2012/04/oracle-bpmsoa-flex-field.html' title='[Oracle BPM/SOA 實務] 彈性欄位(Flex Field)的應用'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBBPeVweLKtJoPRxJD1VwTvjMqnBUEaaogtHauBsw7S2sZ9f5RDuLQozAOsSRrzJjiNh4gzCztY7sqBoKvFJKe4QpF8uHAMl69iFhzOeIoIX41hRLr6aNRPS161v9PElbxCSnvYhPzadQ/s72-c/i1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-443127573715613654</id><published>2012-01-11T15:22:00.000+08:00</published><updated>2012-01-11T15:23:37.002+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>BPM11g PS4FP新功能介紹 -- 參數式角色</title><content type='html'>介紹一個重要BPM11g PS4FP的新功能 - 參數式角色 (Parametric Role)。&lt;br /&gt;
&lt;br /&gt;
話說，在BPM 的世界裡，大家都很習慣使用角色來去定義參與特定工作的人員，因此，假設有一個【IT障礙處理】流程，其中至少會有兩種角色 - 一個是【一般使用者】 (也就是會申告發生障礙的人)、另外一個就是【IT人員】 (處理障礙的人員)。若使用BPMN進行設計時，設計人員會將設計兩個水道(Swing Lane)放置不同的人工作業。&lt;br /&gt;
&lt;br /&gt;
然而，實際情形往往不是那麼美好的，實務上，客戶有可能會告訴你：【沒錯啊，我們是有這兩種角色，但是因為我們的公司有分台北與高雄兩地，IT人員也分在這兩個地方，所以你的指定工作人員的時候，必需要根據申告的人員所在位置來指派這地點裡面的角色人員。】。當沒有參數化角色功能的時候，你可能就需要在設計的時候將【IT人員】這樣的角色切割成為【台北IT人員】與【高雄IT人員】，另外增加水道與判斷條件來實作流程。這種做法會讓流程的設計看起來更加不直覺，同時也更加難以維護。&lt;br /&gt;
&lt;br /&gt;
參數式角色的設計在BPM中就是用以解決這樣的問題。做法就是在使用者除了原本LDAP內的基本資訊之外，根據需求增加【擴充的使用者特性】，然後在流程指定角色的時候，可以另外選定【參數式角色】 - 而此【參數式角色】可根據這些【擴充的使用者特性】增加某些規則來限制角色的人員。舉例來說，剛才的【IT障礙處理】流程，我們就可以增加一個【LOCATION】的【擴充的使用者特性】來記錄每一位員工的所在位置 (例如：TAIPEI或KAOHSIUNG)，另外增加一個【Local Person】的【參數式角色】，並指定一個規則是被指定的使用者，其【LOCATION】特性需要符合申告障礙人員所在的位置。&lt;br /&gt;
&lt;br /&gt;
來看看這在BPM 11g中怎麼達成：&lt;br /&gt;
&lt;br /&gt;
首先，使用管理者的角色(如：weblogic)登入BPM Workspace，並選擇右上角的管理功能：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijgK4QsYr765CEWkhdTc-6PFL4LycZNgy8Heemvh3zenLpaq2rxQs5FasFjUGB9VAatXT4YyHkB9fp8I95bzlfRBC5XyWWfbs5LD-8g26x5Ps2yvPT6KXT-RWcwzmCbo_hil5GmPqCH3s/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;221&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijgK4QsYr765CEWkhdTc-6PFL4LycZNgy8Heemvh3zenLpaq2rxQs5FasFjUGB9VAatXT4YyHkB9fp8I95bzlfRBC5XyWWfbs5LD-8g26x5Ps2yvPT6KXT-RWcwzmCbo_hil5GmPqCH3s/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
請注意左方功能區有兩個這次會用到的功能：【參數式角色】與【擴充的使用者特性】。請先點選【擴充的使用者特性】：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis26FqEwI3kgu77VEGTv8dU7jdzV_ojNGrgjJYs_Ui7Hafm_WvRDTBH47pjIO2ZyuOsGXcloLPfW0WDdd6NVuluGc2FefmP0JP6z3RZ4sFgpVL8U_YxqS4nb1OGjoaN9ETXUGaviNf-Hw/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis26FqEwI3kgu77VEGTv8dU7jdzV_ojNGrgjJYs_Ui7Hafm_WvRDTBH47pjIO2ZyuOsGXcloLPfW0WDdd6NVuluGc2FefmP0JP6z3RZ4sFgpVL8U_YxqS4nb1OGjoaN9ETXUGaviNf-Hw/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
如上圖所示，我新建了一個叫做【LOCATION】的字串特性，其可能的值只有【TAIPEI】與【KAOHSIUNG】兩種。請注意，目前Oracle BPM只支援字串與數字兩種種類的特性，而字串必須是事前被定義好的幾種可能的值。&lt;br /&gt;
&lt;br /&gt;
畫面下方【對應特性】部分，則是讓管理人員指定系統所有使用者相關特性資料的地方，如上圖所示，我指定了tim、user1與user2三個使用者資料，其LOCATION特性分別為TAIPEI、TAIPEI與KAOHSIUNG。特別注意的是，你不需要為系統中所有的人員指定所有的【擴充的使用者特性】，只需要指定有需要的即可。&lt;br /&gt;
&lt;br /&gt;
這次，點選【參數式角色】功能：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL0xL_pz-61V-kj3hHRXpJ27Bqa_NBeHdrmslpviVaulPklIza63HD4-221Tp2pTDlF2bL9rogGoUaMn3pWdCDD5Xfm38YlMC53-hm2xBrWIoiHEXAq0Quyjtkey7CtHoXxwp75AA7OBI/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL0xL_pz-61V-kj3hHRXpJ27Bqa_NBeHdrmslpviVaulPklIza63HD4-221Tp2pTDlF2bL9rogGoUaMn3pWdCDD5Xfm38YlMC53-hm2xBrWIoiHEXAq0Quyjtkey7CtHoXxwp75AA7OBI/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
你將會在畫面中間【參數式角色】部分新增、修改或刪除一個你所欲設定的角色，如上圖所示，我已設計了一個【Local Person】的參數角色，此角色的詳細資訊列是出現在上圖所示的右方畫面。&lt;br /&gt;
&lt;br /&gt;
在這裡我設計了兩個字串參數 - 【roleName】與【location】，分別是用來帶入流程中被指派的角色以及流程中所指定的所在位置。而下方的條件部分，我指定了：&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;受權者：【應用程式角色】 --&amp;gt; 【OracleBPMProceessRolesApp】 --&amp;gt; 【$roleName】，特別注意$roleName代表的是，被授權的角色是透過roleName這個參數由流程實例之中帶入的。&lt;/li&gt;
&lt;li&gt;【LOCATION】 【等於】 【$location】，代表了另外一個條件是，符合該角色的人員在&amp;nbsp;&amp;nbsp;
【LOCATION】這個擴充的使用者特性，需要與location這個參數傳入的值一致。&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
至此，我們已經完成了server端的環境準備，接下來進行流程的設計：&lt;br /&gt;
&lt;br /&gt;
首先，假設你已經依照使用者需求完成了上述的流程，如下圖所示：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIZyVZQANcf2mn0q-M_JA1WPyhD_AyMfWcRVC3F-dcTz2I2RoYk8V2QIThPRFXehzjmsV3tW8WDor2CgtYyH_j_PiuFTd_xLMjFlMOOKKrp2SR8iqIgODN2F_PHBjYzjEFUsl_M6wbWck/s1600/step4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;338&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIZyVZQANcf2mn0q-M_JA1WPyhD_AyMfWcRVC3F-dcTz2I2RoYk8V2QIThPRFXehzjmsV3tW8WDor2CgtYyH_j_PiuFTd_xLMjFlMOOKKrp2SR8iqIgODN2F_PHBjYzjEFUsl_M6wbWck/s400/step4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
此流程之中會有一個流程變數 -- location，記錄障礙所發生的地點，此location變數會傳遞進入【IT人員處理】的人工作業。&lt;br /&gt;
&lt;br /&gt;
接下來編輯【IT人員處理】此Human Task，並點選其Assignment：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT-u2gQAIMuhmUpYY5iYF6Joqv-ohCQrPukDEkEe6ix4PhOZF3ZqB5A2CeE7hoORB1YBRLOVP6GG2N-IG1h26XK4fSMaesgnr8Rtn-8dwYdQoznxPaj-wQCVv-MBev04PGACCCy3fosjQ/s1600/step5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT-u2gQAIMuhmUpYY5iYF6Joqv-ohCQrPukDEkEe6ix4PhOZF3ZqB5A2CeE7hoORB1YBRLOVP6GG2N-IG1h26XK4fSMaesgnr8Rtn-8dwYdQoznxPaj-wQCVv-MBev04PGACCCy3fosjQ/s400/step5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
在Participant List之中，下拉選單有一個新的【Parametric Role】選項，在你選擇後，可以按下右方放大鏡按鍵選擇要執行的參數式角色，此處我們選擇之前所設定好的【Local Person】。選擇完成後下方會自動帶出此參數式角色所需傳遞的參數 -- 【roleName】與【location】。我們分別為其指定：&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;roleName：使用&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;bpm:getPerformer()&lt;/span&gt;，抓出此人工作業所位於的水道角色資訊。&lt;/li&gt;
&lt;li&gt;location：使用&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/task:task/task:payload/task:location&lt;/span&gt;，指定由流程傳入的location變數。&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
接下來，你就可以將此流程deploy上server試試看囉，你將可以觀察到，流程在執行過程中，被指定的IT角色人員將是特定符合location位置所在的使用者。&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/443127573715613654/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/443127573715613654' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/443127573715613654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/443127573715613654'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2012/01/bpm11g-ps4fp.html' title='BPM11g PS4FP新功能介紹 -- 參數式角色'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijgK4QsYr765CEWkhdTc-6PFL4LycZNgy8Heemvh3zenLpaq2rxQs5FasFjUGB9VAatXT4YyHkB9fp8I95bzlfRBC5XyWWfbs5LD-8g26x5Ps2yvPT6KXT-RWcwzmCbo_hil5GmPqCH3s/s72-c/step1.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-4987565785491088029</id><published>2011-12-13T11:26:00.002+08:00</published><updated>2011-12-13T11:27:19.044+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>BPM11g PS4FP新功能介紹 -- AlterFlow</title><content type='html'>最近太忙，好久沒有寫文章了。很快更新一下最新在BPM11g PS4FP的其中一項重要的新功能：AlterFlow (也就是在BPM 10g出現的Grab功能)。&lt;br /&gt;
&lt;br /&gt;
AlterFlow的目的是提供特定人員透過手動介入流程的執行，以更改目前流程執行到的步驟、或是更動流程中變數資料。在BPM應用之中，此功能往往是使用者或管理人員在例外處理所需要的重要功能，現在終於在BPM11g PS4FP中出現了。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
首先，我設計了一個很簡單流程如下：&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpnvb_eyn-KzZ6S-t2ZkST2SRjtIJvyf8oJUJadOmOP6268_QZ1HU9gRP-HkPBnbxQ5B5Xn9TQ-t9y-ciSAeMsECAc2V5fv7s2ZhNkFa7gTROxHIlz28wqecej0TX34PdPtyzohBKxgws/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpnvb_eyn-KzZ6S-t2ZkST2SRjtIJvyf8oJUJadOmOP6268_QZ1HU9gRP-HkPBnbxQ5B5Xn9TQ-t9y-ciSAeMsECAc2V5fv7s2ZhNkFa7gTROxHIlz28wqecej0TX34PdPtyzohBKxgws/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
在流程中我定義了兩個人工關卡 - Step1與Step2，分別交給Role1與Role2兩種角色執行，另外一個在流程中的重要角色叫做Process Owner，此角色不需要由開發人員創建，基本上在每一個流程中系統會預設此角色，此角色在AlterFlow中十分重要，任何屬於此流程Process Owner角色的人員都可以使用AlterFlow功能介入人工處理。另外，在流程中我也定義了一個字串變數叫做msg，簡單用來記錄每個關卡之後的狀態。&lt;br /&gt;
&lt;br /&gt;
部署並執行此流程後，先登入Role1的使用者完成Step1，接下來，請用擁有Process Owner角色的使用者登入BPM Workspace，選擇&quot;處理追蹤&quot;工作頁，按下&quot;進階&quot;，並選擇搜尋條件，在此你可以選定指派給所有使用者(所有角色)的特定流程 - AlterFlow v1.0：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHErSghtWMUEFChOTyMpfdrDCRRriW7w_Ue8Dzglp64ckkHxcHSiMKHZbvSxggXHBgPoYcxqBl6WLGkbOPK1PWd_Nm-4hPWMa719UJE_3xe0I2yDvgh_cXzcU3rBn3I56qmsIxmLVqf1Y/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHErSghtWMUEFChOTyMpfdrDCRRriW7w_Ue8Dzglp64ckkHxcHSiMKHZbvSxggXHBgPoYcxqBl6WLGkbOPK1PWd_Nm-4hPWMa719UJE_3xe0I2yDvgh_cXzcU3rBn3I56qmsIxmLVqf1Y/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
接下來，你可以找到目前正在執行中的所有AlterFlow流程instance，選定你要更動的instance之後，你可以看到到如下圖所示的目前流程執行狀態：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm2DbMEapa8OGDiHJrj1FW_3BYIPB8SpO8D3oLNYhVTb3Eo3zke2-wEHliQ04G4pjBo2Jcjm20GQWLURXYnhagE4tt9ZVY5UPbj8-ihBlLH6dgi1-yWgetzB7MSKdbYR8GZGHKdfMaZeE/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;257&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm2DbMEapa8OGDiHJrj1FW_3BYIPB8SpO8D3oLNYhVTb3Eo3zke2-wEHliQ04G4pjBo2Jcjm20GQWLURXYnhagE4tt9ZVY5UPbj8-ihBlLH6dgi1-yWgetzB7MSKdbYR8GZGHKdfMaZeE/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
你可以清楚在&quot;稽核歷程檔&quot;以及&quot;開啟的活動&quot;中看到流程執行的歷史以及目前停留的活動位置。選擇&quot;動作&quot; --&amp;gt; &quot;更改流程並暫停&quot;，你會見到如下圖所示的畫面，你可以在&quot;新活動&quot;中選擇你所希望流程跳到哪一個活動位置，如圖所示，我們可以把流程手動回到上一個Step1的步驟：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlTpK0O-Cfa6AxIpgUqhDKStyrEqLeSo8eGTHQEZIDDxsUrXyPStKIxMJ7CAFjRhLNg4CwiuP4PdS0gFf2t3nUvNFc-5FNUYwR7vSCz2kVTHQT_FU4GGVHLVujahm5Cd1UcONMdOKE1nk/s1600/step4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;227&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlTpK0O-Cfa6AxIpgUqhDKStyrEqLeSo8eGTHQEZIDDxsUrXyPStKIxMJ7CAFjRhLNg4CwiuP4PdS0gFf2t3nUvNFc-5FNUYwR7vSCz2kVTHQT_FU4GGVHLVujahm5Cd1UcONMdOKE1nk/s400/step4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
另外，如果你同時需要更動變數資料，以清除或還原流程狀態的話，你可以選擇中間變數並按下那一支筆的圖案：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjGts-_0Tp7VQ3qYprvEurOdjSS1KNrr2aZ5OblFjfADV9Pi4BxLDsK-el9OqudWuXKULxVtIV25QU90uCslEQZlyFelYiLpHlkctkPnGcwApng8V7hPdOqcMSujV_39dHcFHIrh4Cs28/s1600/step5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;231&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjGts-_0Tp7VQ3qYprvEurOdjSS1KNrr2aZ5OblFjfADV9Pi4BxLDsK-el9OqudWuXKULxVtIV25QU90uCslEQZlyFelYiLpHlkctkPnGcwApng8V7hPdOqcMSujV_39dHcFHIrh4Cs28/s400/step5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
接下來就可以改資料了，只不過是raw XML的格式，對一般使用者是比較苦了...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
在台灣，有些客戶有特定的流程&quot;抽件&quot;需求，也就是，關卡已經送出了，但是在下一關人員尚未執行之前，可以將案件反悔抽回至自己手上，遇到這樣的需求，看來AlterFlow配合上API的前端客制是最容易實現的方式了。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/4987565785491088029/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/4987565785491088029' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/4987565785491088029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/4987565785491088029'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/12/bpm11g-ps4fp-alterflow.html' title='BPM11g PS4FP新功能介紹 -- AlterFlow'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpnvb_eyn-KzZ6S-t2ZkST2SRjtIJvyf8oJUJadOmOP6268_QZ1HU9gRP-HkPBnbxQ5B5Xn9TQ-t9y-ciSAeMsECAc2V5fv7s2ZhNkFa7gTROxHIlz28wqecej0TX34PdPtyzohBKxgws/s72-c/step1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-7653310833507103792</id><published>2011-09-21T17:05:00.000+08:00</published><updated>2011-09-21T17:43:28.401+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>11gR1PS4 BPM FP 正式發表</title><content type='html'>等待許久的11gR1PS4 BPM FP (Features Pack)終於發表了，雖然這個版本從名字看來不是那麼重要 -- 只是PS4 (11gR1的第四個Patch Set)中的BPM功能包，但從功能面來看，這個版本補足了許多之前版本所欠缺的重要功能，個人覺得重要的幾個新功能包括：&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;新版本的BPM Composer：提供更完整的Web介面給Business User或Enterprise Architect設計流程專案，提供多版本管理與多人合作的功能，在我看來，新版本的BPM Composer可以讓未來流程設計可以真正由Business User透過網頁工具起頭，IT開發人員接手使用JDeveloper進行細項設計。&lt;/li&gt;
&lt;li&gt;流程實例的更動與移轉：可以讓有權限的人員更動正在執行的流程內容，這點可以滿足國內許多客戶希望管理人員可以隨時更動流程執行狀態的需求。另外，這版本也支援了流程實例的移轉，簡單來說，假設伺服器上已經有某流程被部署，我們再重新部署新版本流程之時，可以選擇保留舊版本流程實例繼續執行，接下來該流程的owner則可以在workspace之中找出需要進行移轉的實例進行直接移轉，也可以針對特定的流程實例更動流程實例資料內容，以確保移轉正確。&lt;/li&gt;
&lt;li&gt;Correlations：基本上Correlation算是多流程實例交互引用時非常重要的功能，簡單來說，一個非同步的外部系統呼叫，在外部系統執行完成之後需要callback流程實例，這個時候就有個基本的問題，系統中可能有好多個流程實例都在等待callback，到底此時該找到那個流程實例呢? Correlation就是此問題的解決方案，之前版本的BPM不是不能解決這問題，只是要解決需透過BPEL的功能來做，拐了個彎相當不方便。最新版本此功能被新增至BPMN流程設計之中了。&lt;/li&gt;
&lt;li&gt;預先定義的流程變數：以往在流程之中要取得一些流程資訊如：instanceId、compositeDN、title、creationDate...等資料是有點麻煩的，通常需要透過XPATH呼叫Oracle的一些函式才能夠拿到，在開發上面比較繁瑣，這版本把這些資料放入了一些預設變數之中方便開發人員取用。&lt;/li&gt;
&lt;li&gt;新的Data Association Editor：簡單來說，有個新開發介面方便資料的對應的設計，看圖感受一下吧：&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY3kov6p90Be6px99dMibWdwiv8njTOvSC4JAhjh67VBWhffRRS4i-W6dg752Ut5ZquG_HhvZk2EjYT2aq3mJ-5qgSEKc1soZlhB3mNAEoQr88KgEPXY99MfRhaI9TS6MgZWzWh8NUfi0/s1600/pic1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY3kov6p90Be6px99dMibWdwiv8njTOvSC4JAhjh67VBWhffRRS4i-W6dg752Ut5ZquG_HhvZk2EjYT2aq3mJ-5qgSEKc1soZlhB3mNAEoQr88KgEPXY99MfRhaI9TS6MgZWzWh8NUfi0/s400/pic1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;規則引擎強化：新的規則引擎增加了測試功能與audit trail的紀錄，以後再BPM Console中查詢流程實例的執行歷程紀錄時，我們可以看到規則引擎的實行歷程，也算是方便未來的debug與trace。&lt;/li&gt;
&lt;li&gt;Draft Mode and Log Messages：同樣是為了開發與測試的便利性，現在開發人員可以將流程中尚未開發完成的activity指定為draft狀態，指定為draft狀態的activity可以不需要指定詳細的實作方式，一樣可以被部署並進行測試，這和以前我們需要完成全部的流程開發之後才能進行部署測試是更佳的彈性了。另外，這版本也可以很簡單得在每一個activity之中加上你想要紀錄的訊息，當然，這就像是你用Log4J來記錄Java程式的執行狀態一樣，方便未來的除錯過程。&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
其餘還有一些功能如：Parametric role、Sticky user、Oracle UCM整合、Activity Guide、Notification Activity、Round-trip simulation與流程文件的產生...等，基本上算是很多新功能的版本了!&lt;br /&gt;
&lt;br /&gt;
PS4FP是透過Patch的方式散佈，所以有興趣的朋友，你必須先有個安裝完成一個現有PS4環境，接下來透過Oracle Support找到Patch 12413651才能下載安裝檔。&lt;br /&gt;
&lt;br /&gt;
後續有時間的時候，我會陸續做幾個簡單範例介紹這些新功能。So.... Stay tuned!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/7653310833507103792/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/7653310833507103792' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/7653310833507103792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/7653310833507103792'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/09/11gr1ps4-bpm-fp.html' title='11gR1PS4 BPM FP 正式發表'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY3kov6p90Be6px99dMibWdwiv8njTOvSC4JAhjh67VBWhffRRS4i-W6dg752Ut5ZquG_HhvZk2EjYT2aq3mJ-5qgSEKc1soZlhB3mNAEoQr88KgEPXY99MfRhaI9TS6MgZWzWh8NUfi0/s72-c/pic1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-483155405634305910</id><published>2011-07-05T11:46:00.000+08:00</published><updated>2011-07-05T11:47:32.790+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>[Oracle BPM/SOA 實務] 應用外部LDAP Server做為使用者資料來源</title><content type='html'>BPM的應用往往會應用企業內部現有使用者資訊，最通常會遇到的就是和企業內部的MS Active Directory、Sun iPlanet Directory、OpenLDAP、Oracle Internet Directory或Novell Directory Server...等LDAP Server整合。在單機測試環境中，你可以應用WebLogic Server本身內建的LDAP Server進行開發，但是當部署到線上系統的時候，架構規劃人員就需要思考如何介接上述的LDAP Server了。在之前的&lt;a href=&quot;http://timwu1975.blogspot.com/2011/01/oracle-fusion-middleware-bpm-server.html&quot;&gt;文章&lt;/a&gt;中，我已經有介紹過如何建構開發環境，並使用WebLogic內建LDAP Server，本文我們就來看看怎麼和外部的LDAP Server整合。&lt;br /&gt;
&lt;br /&gt;
為了測試方便起見，我們使用OpenLDAP做為範例，關於OpenLDAP的簡單使用方式，你可以參考此&lt;a href=&quot;http://www.openldap.org/&quot;&gt;連結&lt;/a&gt;，若你使用Windows作業系統進行開發測試，請到&lt;a href=&quot;http://www.userbooster.de/en/download/openldap-for-windows.aspx&quot;&gt;此處&lt;/a&gt;下載Windows版本。另外，你會需要一個LDAP Client方便產生並修改使用者資料，我們這裡使用的是&lt;a href=&quot;http://jxplorer.org/&quot;&gt;JXplorer&lt;/a&gt;，你可以使用任何熟悉的工具。&lt;br /&gt;
&lt;br /&gt;
這裡我所使用的範例的base DN是&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;dc=oracle,dc=com&lt;/span&gt;，如果你是重新建立一個新的OpenLDAP環境，可以修改&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;slapd.conf&lt;/span&gt;檔案來去指定相關的&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;suffix&lt;/span&gt;、&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;rootdn&lt;/span&gt;與&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;rootpw參數&lt;/span&gt;。如果你是使用現存環境的話，記得在接下來的範例之中，依據你環境中的base DN與密碼進行修正。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;新建使用者與群組&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
下面我提供了一個簡單的LDIF檔案，你可以做些簡單的修改，並透過JXplorer將他餵入OpenLDAP之中：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;dn: ou=people,dc=oracle,dc=com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ou: people&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;objectClass: top&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;objectClass: organizationalUnit&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;dn:cn=user1,ou=people,dc=oracle,dc=com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;objectClass:inetOrgPerson&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;cn:user1&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sn:user1&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;uid:user1&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;userPassword:welcome1&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;dn:cn=user2,ou=people,dc=oracle,dc=com&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;objectClass:inetOrgPerson&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;cn:user2&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sn:user2&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;uid:user2&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;userPassword:welcome1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;dn: ou=groups,dc=oracle,dc=com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ou: groups&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;objectClass: top&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;objectClass: organizationalUnit&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;dn: cn=testGroup,ou=groups,dc=oracle,dc=com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;objectClass: top&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;objectClass: groupOfNames&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;cn: testGroup&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;member: cn=user2,ou=people,dc=oracle,dc=com&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;請注意，我在這裡面建立了兩個OU，一個DN是&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ou=people,dc=oracle,dc=com&lt;/span&gt;，代表了使用者，另一個是代表&lt;/span&gt;使用者群組的&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ou=groups,dc=oracle,dc=com&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;。同時，我順便&lt;/span&gt;建立了&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;user1&lt;/span&gt;與&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;user2&lt;/span&gt;兩個使用者以及一個&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;testGroup&lt;/span&gt;使用者群組。&lt;br /&gt;
&lt;br /&gt;
從JXplorer你將看到這樣的畫面資訊：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDIbnaS8_9kFFETZaGSAK2au50WKfjKMn2qfAsGDdRBMOsEyNEKiz9ooPR6O66HEsRhJ5aLG7L9xHYcNeiWNwPXASXr-j5KQFNNVDyhVoop5wp_v2CK1AHkX7UWfiHZXfx_9YWLJAEgvA/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;235&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDIbnaS8_9kFFETZaGSAK2au50WKfjKMn2qfAsGDdRBMOsEyNEKiz9ooPR6O66HEsRhJ5aLG7L9xHYcNeiWNwPXASXr-j5KQFNNVDyhVoop5wp_v2CK1AHkX7UWfiHZXfx_9YWLJAEgvA/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
特別注意，在BPM應用之中，你會用到很多額外的資訊，像是使用者的姓名、顯示名稱、職稱、Email、電話以及主管是誰...等等。因此，這些使用者所設定的&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;objectClass&lt;/span&gt;最好是指定為&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;inetOrgPerson。&lt;/span&gt;在簡單的建立了使用者之後，建議你可以透過LDAP Client連進去修改使用者完整的資訊。&lt;br /&gt;
&lt;br /&gt;
這樣你的LDAP Server環境已經準備完成了，準備設定BPM Server的連接了!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
設定BPM Server&lt;br /&gt;
&lt;br /&gt;
首先，請登入WebLogic Console，並選擇【安全範圍】--&amp;gt;【myrealm】--&amp;gt;【提供者】。首先，你會看到兩個預設的認證提供者【DefaultAuthenticator】與【DefaultIdentityAsserter】，此時請按下新增按鍵，如下圖所示，新建一個OpenLDAP的認證提供者。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi87PhXVujx_S8jbHdyqUj_TkfjYC-zzdqlwwWmgVFB_vuuXQ_3UeazFu1kKeVjPZL3llqwQWcOz5HKT7imDeyARdy7VXjvRW7FwM3xj7u47OTYnivyG0zD1m-Y2H9itdPvAvm8_03ztcY/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;291&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi87PhXVujx_S8jbHdyqUj_TkfjYC-zzdqlwwWmgVFB_vuuXQ_3UeazFu1kKeVjPZL3llqwQWcOz5HKT7imDeyARdy7VXjvRW7FwM3xj7u47OTYnivyG0zD1m-Y2H9itdPvAvm8_03ztcY/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
按下確定鍵之後，你會看到新的認證提供者已經產生了，請點選這個新的提供者，並選擇【提供者特有】進行設定：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUQ486U4DOQKzejsfNPUPBkGBWMB7tSS9xT1wpNIQJroJJ9VHBmco0XsFUw1XTBuv6SAlmUIIzgHn3fM7W4doQD7yjohPzSxIhEG8kKP4HxLJw1J_Q8ssqUqGon9U0rHqLP7F-iLp1krI/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUQ486U4DOQKzejsfNPUPBkGBWMB7tSS9xT1wpNIQJroJJ9VHBmco0XsFUw1XTBuv6SAlmUIIzgHn3fM7W4doQD7yjohPzSxIhEG8kKP4HxLJw1J_Q8ssqUqGon9U0rHqLP7F-iLp1krI/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
在連線部分，請指定你OpenLDAP Server的主機hostname與port，並且指定所使用的密碼。&lt;br /&gt;
接下來是一堆我有修改的設定，請也依據修改：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;使用者&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;使用者基本 DN: ou=people, dc=oracle, dc=com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;名稱篩選中的使用者:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(&amp;amp;(cn=%u)(objectclass=inetOrgPerson))&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;使用者物件類別:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inetOrgPerson&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;群組&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;群組基本 DN: ou=groups, dc=oracle, dc=com&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;名稱篩選中的群組: (&amp;amp;(cn=%g)(objectclass=groupOfNames))&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;靜態群組&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;靜態群組物件類別: groupOfNames&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;成員 DN 篩選中的靜態群組 DN:(&amp;amp;(member=%M)(objectclass=groupOfNames))&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
完成之後，記得將你新建認證提供者的【控制旗標】設定為【SUFFICIENT】，如下圖所示：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiks8i_9XKC-gWa2f7ygnq5rA7uD-zhXfplNpyN7rz-27BU1oGhtbz1_0ocPFwD0UQeTuHxQdVl7fpi0S8MwUFFc_9yuv_wVyAox7DzCSctW327IyxprqRuBujc0Ytmjh7jB3NLFwsR_ns/s1600/step4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiks8i_9XKC-gWa2f7ygnq5rA7uD-zhXfplNpyN7rz-27BU1oGhtbz1_0ocPFwD0UQeTuHxQdVl7fpi0S8MwUFFc_9yuv_wVyAox7DzCSctW327IyxprqRuBujc0Ytmjh7jB3NLFwsR_ns/s400/step4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
同時，請將DefaultAuthenticator的控制旗標設定為【OPTIONAL】，並且重新排序各個提供者，將你所新建的認證提供者放到最上端。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1x2BdeuMDiQJ3f9JW9oLiPtFYlkn4K5PFrDMycgAIXLlUOEAZV12085-rzpA0xNWUggRNTmJrXIAvSEZZVl5pU1OqtHS5vaBNnQa5tqMa2160wGjp9bdj0oxw1ux0Kc0i0Sz7xShQF74/s1600/step6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;306&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1x2BdeuMDiQJ3f9JW9oLiPtFYlkn4K5PFrDMycgAIXLlUOEAZV12085-rzpA0xNWUggRNTmJrXIAvSEZZVl5pU1OqtHS5vaBNnQa5tqMa2160wGjp9bdj0oxw1ux0Kc0i0Sz7xShQF74/s400/step6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
重新啟動Server，這次你在myrealm之中，可以看到來自不同認證提供者的使用者：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGWlHYHBk-_e2TMacwzRFFUo6d9aQBm2SUpgtY8w2RW_7288hl6BVihU_vYjUy9kWUAwIKUevnAPG_ws7DebBzk3-BKn6YsxTY17vcpjj77qhjH8xqGLG6Dl1YFe2SA4a0ALJo6FiY6dg/s1600/step7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGWlHYHBk-_e2TMacwzRFFUo6d9aQBm2SUpgtY8w2RW_7288hl6BVihU_vYjUy9kWUAwIKUevnAPG_ws7DebBzk3-BKn6YsxTY17vcpjj77qhjH8xqGLG6Dl1YFe2SA4a0ALJo6FiY6dg/s400/step7.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
恭喜你! 所以設定已經完成，你可以試試看用user1登入BPM Composer了! 你可以試試看在新的使用者上面測試之前我們介紹過的&lt;a href=&quot;http://timwu1975.blogspot.com/2011/02/oracle-bpmsoa-muli-tier.html&quot;&gt;Multi-Tier審核流程&lt;/a&gt;囉!</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/483155405634305910/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/483155405634305910' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/483155405634305910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/483155405634305910'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/07/oracle-bpmsoa-ldap-server.html' title='[Oracle BPM/SOA 實務] 應用外部LDAP Server做為使用者資料來源'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDIbnaS8_9kFFETZaGSAK2au50WKfjKMn2qfAsGDdRBMOsEyNEKiz9ooPR6O66HEsRhJ5aLG7L9xHYcNeiWNwPXASXr-j5KQFNNVDyhVoop5wp_v2CK1AHkX7UWfiHZXfx_9YWLJAEgvA/s72-c/step1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-2744094184843943335</id><published>2011-05-17T10:18:00.000+08:00</published><updated>2011-07-05T11:47:32.791+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>[Oracle BPM/SOA 基礎] BPM/SOA Suite 11gR1PS4 使用 JRockit VM</title><content type='html'>最近&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Oracle悄悄的出了新版的Fusion Middleware，這次的版本是11gR1PS4，手癢的我趕緊抓了下來安裝，基本上想要嘗鮮新功能的開發人員可能要失望了，這個版本算是的bug-fix release，也因此在BPM/SOA部分沒有添加啥特別的新功能，到是修正了一些PS3所出現的bug，同時也做了一些效能的調教，有興趣的人可以去MetaLink看看Doc ID：1316076.1和1316062.1。&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;到是我在測試使用JRockit做為JVM的時候遇到了一些問題：&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;安裝最新JRockit：R28.1.3&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;修改&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;setDomainEnv.cmd&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;，改使用JRockit：&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;set BEA_JAVA_HOME=D:\jrockit\jrockit-jdk1.6.0_24-R28.1.3-4.0.1&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;set JAVA_VENDOR=Oracle&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;接著再啟動的時候會在console一直跑出下列資訊 (但是伺服器是正常作業的喔)：&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[WARN ][osal &amp;nbsp; ] Could not enumerate processes (1) error=-1073738819&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[WARN ][osal &amp;nbsp; ] Could not add counter (null)\ for query&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[WARN ][osal &amp;nbsp; ] Failed to init virtual size counter.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;JRockit R28 Known Issues的文件中有明白指出，這樣的問題有可能是Windows PerfOS counter沒有被enable (抱歉，我不知道這是啥意思)，按照文件指示到Microsoft網站上下載了工具後發現，我的設定一切正常，但是問題卻一再發生。&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;網路上爬了一下文發現，這樣的問題有可能是我的performance counter已經毀損，並且可以透過下列指令重建：&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;C:\Windows\system32&amp;gt;lodctr /r&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;執行過後就解掉我的問題了，提供給遇到相同問題的同好參考!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/2744094184843943335/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/2744094184843943335' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/2744094184843943335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/2744094184843943335'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/05/oracle-bpmsoa-bpmsoa-suite-11gr1ps4.html' title='[Oracle BPM/SOA 基礎] BPM/SOA Suite 11gR1PS4 使用 JRockit VM'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-908876739925150461</id><published>2011-04-20T18:07:00.001+08:00</published><updated>2011-04-21T09:20:24.684+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic"/><title type='text'>[Oracle WebLogic Server] Off-loading網站程式session資料至其他JVM</title><content type='html'>不知道大家有沒有遇過這樣的情形：&lt;br /&gt;
&lt;br /&gt;
有時候因為環境因素，你所使用的application server是跑在32-bit的JVM之上，也因此，受限於JVM process能夠allocate到記憶體的大小，你的application server能夠使用到的heap大小在東扣西扣之後所剩不多，而某些的應用系統又特別需要記憶體空間，因為他們將大量的資料放在user session之中...&lt;br /&gt;
&lt;br /&gt;
也許有人會說，那樣就使用cluster架構啊，這樣可以用多台application server分散user執行的分布，這樣的話，JVM會有比較多heap space存放session資料。但是只要你的cluster架構有使用到session-replication的話，基本上，你的每一個application server除了本身的session資料之外，還需要幫至少另外一台application server備份他的session資料，所以算來算去，你的heap space還是有可能會不夠。&lt;br /&gt;
&lt;br /&gt;
64-bit JVM? 是的，這算是解法之一，但是要特別注意的是當heap space開到太大的時候，可能伴隨而來的long GC pause time問題。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
來看看一個WebLogic的功能(GlassFish也最近也開始提供了喔...)，我們讓WebLogic Server把session的資料存放在另外一到多個JVM上，而這些JVM可以被任意部署在多個硬體主機之上。這樣的架構帶來的好處是，你的session【理論上】可以存放到非常、非常多的資料。更棒的是，你可以讓不同的網頁應用程式共用session (想像一下使用者的shopping cart資料可以在A application與B application之中共用)，甚至，你可以讓不同廠牌的application server互相做到session replication的機制。&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;&quot;註：其實此機制不只支援WebLogic與GlassFish Server，也支援IBM WebSphere、JBoss以及Apache Tomcat等... application server，使用WebLogic是因為有現成的SPI可以直接放在application server之上，方便說明。&quot;&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;
跨JVM共用儲存資料? 這樣的技術其實並不是為了session資料複製所存在的，最早的出現是為了實現分散式快取 (Distributed Cache) 或分散式雜湊表 (Distributed Hash Table)而出現的，Oracle數年前收購了一間公司Tangosol，其產品：【Coherence】就是在做這件事情的，上面所說到將session資料丟到其他的JVM中，應用的就是Coherence技術的加工。我在這裡並不詳細說明Coherence，有興趣的人可以參考&lt;a href=&quot;http://blog.dbai.biz/?p=997&quot;&gt;小白的介紹&lt;/a&gt;。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;環境準備&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
首先，如果沒有WebLogic最新版本，可以在&lt;a href=&quot;http://www.oracle.com/technetwork/middleware/fusion-middleware/downloads/index.html&quot;&gt;這邊&lt;/a&gt;取得WebLogic 10.3.4的版本，此版本應該已經內含Coherence 3.6版。安裝完成後，請透過Config Wizard自己產生一個新的domain，其中至少需要包含兩個managedServer：server1與server2，並且建立一個cluster：cluster1，包含server1與server2。除此之外，這次我們建立的環境將會讓管理人員透過WebLogic Admin Console執行所有server的開啟與關閉，所以也請在domain中使用node manager。&lt;br /&gt;
&lt;br /&gt;
另外，你會需要架設一個Apache HTTPD加上WebLogic Proxy module，由Apache扮演前端proxy與request dispatcher的角色，我的做法是Apache聽80 port然後dispatch給server1的7002 port與server2的7003 port。&lt;br /&gt;
&lt;br /&gt;
最後，你會需要一個小application，其中會紀錄session資料的。我是用一個簡單的JSP，裡面會將此session連進此JSP網頁的次數顯示出來。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;開始設定&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
請連到WebLogic Admin Console，展開&amp;lt;domain_name&amp;gt; --&amp;gt; 環境，將看到新的選項：Coherence伺服器：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfPDUjy5A1cRUwBXVBPYblZZGFWNx1nFO1jyteb_b4G9IWhnArEhyphenhyphen9QSpraC3TVSv6gg8la45nUmFxdCQOL6NAiGPNIIh9TenePO4XNnee_RqLJ-XVBtup5pe7haXG5H5zEgRRXEQM-os/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;261&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfPDUjy5A1cRUwBXVBPYblZZGFWNx1nFO1jyteb_b4G9IWhnArEhyphenhyphen9QSpraC3TVSv6gg8la45nUmFxdCQOL6NAiGPNIIh9TenePO4XNnee_RqLJ-XVBtup5pe7haXG5H5zEgRRXEQM-os/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
如上圖，你可以透過【新建】功能，產生一到多個Coherence Server，每一個代表一個獨立的JVM提供給WebLogic Server存放session資料，至於需要多少個Coherence Server就端看你需要存放多大的session量來決定，我這邊先放兩個Coherence Server：coh-server1與coh-server2。&lt;br /&gt;
&lt;br /&gt;
建立Coherence Server時，基本設定只需要很簡單的指定名稱與機器：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghmO7k9fBfvupJsxWLDoAuK9jJtM5-Udz0GO1ALkyEeaKu8HGBojtSFVi8veG9TLkLBvZHpzV9Tu_i9HMNkALJFJrc75bF4IUQQbDkO2XJroyiIxo2QmZPelU5uE0MOBomYFU3Lc4us6A/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;297&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghmO7k9fBfvupJsxWLDoAuK9jJtM5-Udz0GO1ALkyEeaKu8HGBojtSFVi8veG9TLkLBvZHpzV9Tu_i9HMNkALJFJrc75bF4IUQQbDkO2XJroyiIxo2QmZPelU5uE0MOBomYFU3Lc4us6A/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
重點在完成新增之後，你需要點進去此Coherence Server指定他的啟動引數與類別路徑：&lt;br /&gt;
&lt;br /&gt;
類別路徑請設定：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/coherence_3.6/lib/coherence.jar;&amp;lt;MW_HOME&amp;gt;/coherence_3.6/lib/coherence-web-spi.war;&amp;lt;MW_HOME&amp;gt;/modules/features/weblogic.server.modules.coherence.server_10.3.4.0.jar&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
引數：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-Xms256m -Xmx256m -Dtangosol.coherence.cacheconfig=WEB-INF/classes/session-cache-config.xml -Dtangosol.coherence.session.localstorage=true&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
完成後，請啟動這兩個Coherence Server。&lt;br /&gt;
&lt;blockquote&gt;&quot;注意：&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;&lt;/span&gt;是你WebLogic安裝的Middleware目錄，你可以任意修改引數中的JVM heap設定，另外，已經熟悉Coherence的人，請不要懷疑，這裡localstorage的設定是&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-Dtangosol.coherence.&lt;b&gt;session&lt;/b&gt;.localstorage=true，不要把session改成distributed了&quot;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;接下來，使用WebLogic Admin Console在server1與server2上面部署下列的&lt;b&gt;程式庫&lt;/b&gt;：&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/wlserver_10.3/common/deployable-libraries/active-cache-1.0.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/coherence_3.6/lib/coherence-web-spi.war&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs_8ceQP5r2sONZiMNBLoLBIyieHZbOdnF9vBM8QMgbsINTH4OL2NyeqWbcky4VBSJB8ti4o7w3pMWV0xO-sYcv7Z8Qro3kv8j-ZeR9aIiutFjP5Bl6xEd7E9yr_a_5NeX9grS-6jpUJc/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs_8ceQP5r2sONZiMNBLoLBIyieHZbOdnF9vBM8QMgbsINTH4OL2NyeqWbcky4VBSJB8ti4o7w3pMWV0xO-sYcv7Z8Qro3kv8j-ZeR9aIiutFjP5Bl6xEd7E9yr_a_5NeX9grS-6jpUJc/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;完成後，請將server1與server2啟動。&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;到此為止，你在伺服器上面設定已經完成了! 接著要做的是你每個網頁應用程式在WAR檔打包時該修改的：&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;將&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/coherence_3.6/lib/coherence.jar檔打包進WEB-INF/lib之下&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;編輯WEB-INF/weblogic.xml檔，新增：&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;wls:library-ref&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;wls:library-name&amp;gt;coherence-web-spi&amp;lt;/wls:library-name&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;/wls:library-ref&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;編輯META-INF/manifest.mf，放入：&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Extension-List: active-cache&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;active-cache-Extension-Name: active-cache&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;active-cache-Specification-Version: 1.0&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;active-cache-Implementation-Version: 1.0&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;將你的WAR檔&lt;/span&gt;部署到cluster1上吧!&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;恭喜你! 你已經完成了!&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;透過你的Apache連入你的網頁程式，此時你應該可以任意的關閉server1與server2其中一台WebLogic Server。好玩的是，只要你Coherence Server還在啟動的狀態，你同時將server1與server2都關掉，在重新啟動其中任何一台之後，你會發現session還是存在，這就代表了你的session是被獨立存在Coherence Server的JVM上。&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Enjoy!&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/908876739925150461/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/908876739925150461' title='4 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/908876739925150461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/908876739925150461'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/04/oracle-weblogic-server-off.html' title='[Oracle WebLogic Server] Off-loading網站程式session資料至其他JVM'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfPDUjy5A1cRUwBXVBPYblZZGFWNx1nFO1jyteb_b4G9IWhnArEhyphenhyphen9QSpraC3TVSv6gg8la45nUmFxdCQOL6NAiGPNIIh9TenePO4XNnee_RqLJ-XVBtup5pe7haXG5H5zEgRRXEQM-os/s72-c/step1.PNG" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-344896051281624176</id><published>2011-04-13T11:39:00.002+08:00</published><updated>2011-08-05T10:55:12.890+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>[Oracle BPM/SOA 實務] 使用API查詢Composite instance</title><content type='html'>很多專案進行的過程中會有需要客制化一些前端應用，提供使用者查詢SOA/BPM平台中，特定的composite執行的狀態，來了解流程執行是否已經完成，或是執行內容是不是錯誤... 等。這篇文章我們就簡單介紹怎麼使用API來應用客制化：&lt;br /&gt;
&lt;br /&gt;
首先，你需要引用下列JAR Library：&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;mw_home&amp;gt;/wlserver_10.3/server/lib/weblogic.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;mw_home&amp;gt;/oracle_common/webservices/wsclient_extended.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;mw_home&amp;gt;/oracle_common/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;mw_home&amp;gt;/Oracle_SOA/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;mw_home&amp;gt;/oracle_common/modules/oracle.fabriccommon_11.1.1/fabric-common.jar&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;我們程式的第一步需要透過&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Locator&lt;/span&gt;物件去執行Composite資料的查詢，&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Locator&lt;/span&gt;物件可以透過下列函式取得：&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 塞入WebLogic連接方式&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Hashtable jndiProps = &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;new &lt;/span&gt;&lt;/b&gt;Hashtable();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;jndiProps.put(Context.PROVIDER_URL,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;t3://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/soa-infra&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;&quot;weblogic.jndi.WLInitialContextFactory&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;jndiProps.put(Context.SECURITY_PRINCIPAL, &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;&quot;weblogic&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;jndiProps.put(Context.SECURITY_CREDENTIALS, &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;&quot;&amp;lt;password&amp;gt;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;jndiProps.put(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;&quot;dedicated.connection&quot;&lt;/span&gt;, &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;&quot;true&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Locator locator = LocatorFactory.createLocator(jndiProps);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;接下來，Locator需要透過一個&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&quot;DN&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;，識別你的&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Composite&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;，舉例來說&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;DN&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;的格式如下：&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #783f04;&quot;&gt;blogdemo&lt;/span&gt;/&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #073763;&quot;&gt;CompositeDemo&lt;/span&gt;!&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #674ea7;&quot;&gt;1.0&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;其中&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #783f04;&quot;&gt;blogdemo&lt;/span&gt;&lt;/b&gt;代表&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Composite&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;被部署所在的&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;partition&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;名稱，&quot;/&quot;之後就是&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Composite&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;的名稱 - &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0c343d;&quot;&gt;CompositeDemo&lt;/span&gt;&lt;/b&gt;，最後在&quot;!&quot;之後則是此&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Composite&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;的版本 - &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #674ea7;&quot;&gt;1.0&lt;/span&gt;&lt;/b&gt;。&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;查詢方式：&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Composite composite = locator.lookupComposite(&quot;&amp;lt;dn&amp;gt;&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;最終使用者需要查詢的是某個&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Composite instance&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;的&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;狀態，這裡我們可以使用對應的CompositeInstance與CompositeIntanceFilter類別來做處理，下面是一個簡單的範例，我們需要找出所有正在執行中的&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Composite instance&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;：&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 產生CompositeIntance&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;CompositeInstanceFilter instanceFilter = &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;CompositeInstanceFilter();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// 指定查詢條件為正在執行的Composite intance&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;instanceFilter.setState(CompositeInstance.STATE_RUNNING);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;List&amp;lt;CompositeInstance&amp;gt; instances = composite.getInstances(instanceFilter);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;for &lt;/span&gt;&lt;/b&gt;(CompositeInstance ins : instances) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&amp;nbsp;// 做你想做的吧!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Enjoy!!!&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/344896051281624176/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/344896051281624176' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/344896051281624176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/344896051281624176'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/04/oracle-bpmsoa-apicomposite-instance.html' title='[Oracle BPM/SOA 實務] 使用API查詢Composite instance'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-8581132295177977137</id><published>2011-03-29T11:58:00.000+08:00</published><updated>2011-03-29T11:58:41.374+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>[Oracle BPM/SOA 實務] 隨意路由(Ad-hoc Routing) 的使用</title><content type='html'>最近剛好被問到這個問題，挖掘了一下發現BPM 11g的Human Workflow還有一些新功能能夠動態地讓使用者在人工關卡中邀請其他使用者審核，這樣的功能將讓Oracle BPM Suite在台灣這種強調【彈性】人工作業的環境能夠更加實用。&lt;br /&gt;
&lt;br /&gt;
先來簡單看一下需求：&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;使用者需要在每一個人工作業關卡之中，根據需求與判斷決定是不是要在此關卡中拉進其他的人員來參與次關卡之簽核，拉進來可為一至多位，需支援多人的會簽與串簽的情境。&lt;/i&gt;&lt;/blockquote&gt;我們先簡單設計一個流程，其中只包含一個簡單的人工作業關卡與Exclusive Gateway。另外，也請為此關卡設計一個簡單的UI，如果感到陌生的話，請參考&lt;a href=&quot;http://timwu1975.blogspot.com/2011/01/oracle-fusion-middleware-bpm.html&quot;&gt;這裡&lt;/a&gt;的做法。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2GvMts3JrQMseFLCj6Gb8S4OtMTTJ8-v5YRmGDTPevwua1Ex4CC4vfC89yNnkMJZbokGTcryVuq9IYO610dHibvVN39eGUt-PnlKGEPIxSMoSjsjkeALyfAidQQYadfE-3_mzNFWc6M/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2GvMts3JrQMseFLCj6Gb8S4OtMTTJ8-v5YRmGDTPevwua1Ex4CC4vfC89yNnkMJZbokGTcryVuq9IYO610dHibvVN39eGUt-PnlKGEPIxSMoSjsjkeALyfAidQQYadfE-3_mzNFWc6M/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
這裡的重點只有在其中Human Task的設定，接著在你的composite中點選你所開發的Human Task，請將你的Task Outcome給訂兩種結果：APPROVE與REJECT。&lt;br /&gt;
&lt;br /&gt;
接下來重點在Task Assignment的設定，點選了Assignment Tab，你會看到類似下面的畫面：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFYzefeMkJkXSQWBh4j8VP9YCakoLpF3bTJf1Zo53ArAnIcGZNV3IOm05B9zU-CPU9OQLf0wRSQelloslPVF5gJbg4Uo8s_s9LNmt8yjh9D5-rfcuiITiw9ukIp9b732unIpRijveL1AM/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFYzefeMkJkXSQWBh4j8VP9YCakoLpF3bTJf1Zo53ArAnIcGZNV3IOm05B9zU-CPU9OQLf0wRSQelloslPVF5gJbg4Uo8s_s9LNmt8yjh9D5-rfcuiITiw9ukIp9b732unIpRijveL1AM/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Double-click 中間有&quot;人像&quot;的那個區域，這裡指定了此人工作業參與的人員設定，你可以看到這裡我直接指定此做頁是由 &quot;tim&quot; 使用者處理。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsEQ-v3ZU4QQ-Oy86RDJpVNyFFr-nlJSsHj6yoS7UWPATbSiawqmY-z0KPXDkDpIBWAdxoyyxbwvPc_QZzo9rNvbblx9uVe2AWvP_Xr3MhMZYzjWAXy9SadO4shyicj3rWpZyMwuBP6II/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsEQ-v3ZU4QQ-Oy86RDJpVNyFFr-nlJSsHj6yoS7UWPATbSiawqmY-z0KPXDkDpIBWAdxoyyxbwvPc_QZzo9rNvbblx9uVe2AWvP_Xr3MhMZYzjWAXy9SadO4shyicj3rWpZyMwuBP6II/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;接下來是主要的部分了，我們要給予 &quot;tim&quot; 使用者在接到工作時，能夠將此工作分給其他的人員的權利。做法很簡單，你只要在同個視窗之中，將 Advanced 區域展開，並且點選 &quot;Allow this participant to invite other participants&quot; 就可以了。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgezWi19-OVXTwz55SSGP2BmiTXu0JS1Gx3s_G3SqXYeD2eodDAtJM5D-m7rrMiCDUn73B2cpYvnOXd4tEBeIPpgNu4E7CPgpC7QG8gLVs74YmQ8ci4_GSgx5hSfy98RH88mhSJ-RUeMsw/s1600/step4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgezWi19-OVXTwz55SSGP2BmiTXu0JS1Gx3s_G3SqXYeD2eodDAtJM5D-m7rrMiCDUn73B2cpYvnOXd4tEBeIPpgNu4E7CPgpC7QG8gLVs74YmQ8ci4_GSgx5hSfy98RH88mhSJ-RUeMsw/s400/step4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
按下 &quot;OK&quot; 回到上個畫面，接下來我們需要指定另一個規則：當有許多使用者被動態指定審核後，若有其中一個人REJECT了，其他平行被指定但尚未處理的工作將被自動取消。要做到這樣的需求，也是透過一個簡單的設定達成。&lt;br /&gt;
&lt;br /&gt;
中央畫面右上角的 &quot;Task will go from starting to final participant&quot; 旁邊有支筆的圖案，請點選他，打開另一個設定視窗。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4WdanDWIoFvPV-B3Y39-fMCG32BZWmxvTgX2fsgnhLgDK4tyskC-kD3ZRYuSokvbiA3Ctrt0mHWgdUNkvnak0THn_ljj6Wvd3fR1BhsKEA-4B377O7HmQue3i55FxRSaK2FoAVgDingY/s1600/step5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4WdanDWIoFvPV-B3Y39-fMCG32BZWmxvTgX2fsgnhLgDK4tyskC-kD3ZRYuSokvbiA3Ctrt0mHWgdUNkvnak0THn_ljj6Wvd3fR1BhsKEA-4B377O7HmQue3i55FxRSaK2FoAVgDingY/s400/step5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
注意我們勾選了 &quot;Complete task when a participant chooses: REJECT&quot; 與 &quot;Enable early completion in parallel subtasks&quot;，畫面中間那一支筆的圖案則是讓你選擇這種自動提前完成的作業是針對哪一種Outcome，這裡我們是針對有人REJECT的時候才處理，因此選擇REJECT。&lt;br /&gt;
&lt;br /&gt;
接下來你就可以部署並測試你的流程了!&lt;br /&gt;
&lt;br /&gt;
當你啟動一個流程instance後，使用 &quot;tim&quot; 使用者登入BPM Workspace，你會看到已經有個人工單指派給你。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxXMrcf2kzxkeMCgIj3NFraZLm_IW8qpKtulmaISxhsNQ1m0zFkG2i18JZ2S1HoG-6X4nt3LRMfxC9H_hsAdm1XMeOzecD3Qj2U1G6z0D0ESHt-xPmPoJSNQCT7KSRkxpiBACJeAmAiCA/s1600/step6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxXMrcf2kzxkeMCgIj3NFraZLm_IW8qpKtulmaISxhsNQ1m0zFkG2i18JZ2S1HoG-6X4nt3LRMfxC9H_hsAdm1XMeOzecD3Qj2U1G6z0D0ESHt-xPmPoJSNQCT7KSRkxpiBACJeAmAiCA/s400/step6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
當 &quot;tim&quot; 需要指定一個隨意路由時，他只需要選擇 &quot;動作&quot; --&amp;gt; &quot;隨意路由&quot;，並可以看到一個對話框出現。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqCF_dO0FtpLxwOFc2qgoeG0w_5xj0HG4wLB-w-og-AOgHjFwjAZgOzCgHkCR-6qodb_16C6TpX79R-BOr-cNqD7JURn2nRQn7XjVtaVOOT2UAALF8qGwbmY0lWfcfuK9po-3VsycocPE/s1600/step7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqCF_dO0FtpLxwOFc2qgoeG0w_5xj0HG4wLB-w-og-AOgHjFwjAZgOzCgHkCR-6qodb_16C6TpX79R-BOr-cNqD7JURn2nRQn7XjVtaVOOT2UAALF8qGwbmY0lWfcfuK9po-3VsycocPE/s400/step7.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixEV2giBZ1RNmCgempsQncdBMD0kM13OKcOJr1EdIkgYplIkaVfNfGn4Hgn7SJoiaTdpVXXs_4qKG_fOoBz8OO4gUCle-fRZQlhxb3DfnmqvibOS6pGvD7tHvVpmRYycHGW24kBulsHaM/s1600/step8.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixEV2giBZ1RNmCgempsQncdBMD0kM13OKcOJr1EdIkgYplIkaVfNfGn4Hgn7SJoiaTdpVXXs_4qKG_fOoBz8OO4gUCle-fRZQlhxb3DfnmqvibOS6pGvD7tHvVpmRYycHGW24kBulsHaM/s400/step8.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
這對話框可以讓使用者決定他是要指定單一使用者審核還是多使用者，串簽方式還是會簽：&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;單一核准者：就指定一個人啦!&lt;/li&gt;
&lt;li&gt;群組表決：會簽&lt;/li&gt;
&lt;li&gt;單一核准者鏈結：串簽&lt;/li&gt;
&lt;/ul&gt;所有的使用者資訊可以透過下方的區域進行搜尋與指定，下圖示一個簡單的範例指定 &quot;david&quot; 與 &quot;leon&quot; 兩個使用者串簽。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnFSfUPWVm7mzugY-IIeryJSK8gjLzrlMjl-tAtKy8AM53sRIsMY22SLjUOb4hXIfvmr2IfEQzIxBbA8YlXsBZ5SPbdeuj8PH-zmAAXNrIi9gOJkLrUOk5gtp2xZQSKUgyYiekSvsnnfk/s1600/step9.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnFSfUPWVm7mzugY-IIeryJSK8gjLzrlMjl-tAtKy8AM53sRIsMY22SLjUOb4hXIfvmr2IfEQzIxBbA8YlXsBZ5SPbdeuj8PH-zmAAXNrIi9gOJkLrUOk5gtp2xZQSKUgyYiekSvsnnfk/s400/step9.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
至於會簽，Oracle BPM Suite其實是透過了功能更強的群組投票的方式來達成，在指定群組表決時，可以設定預設結果的百分比，例如，我們需要全部被指定人都ACCEPT才代表ACCEPT時，請將預設結果設定為 &quot;核准&quot;、共識百分比設定為 &quot;100&quot;；若你需要的是五個人其中四個ACCEPT即可，你就需要設定共識百分比為 &quot;80&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQcyFZvnLRnDsPuWfwsVtk-8xBkXCAO1zx8tPL6UP7XPxtAT0Qq7MhZux-qiTvEB3hmqRldFxozTwcJ2lf3BEwLYCxRLR3rLJilgEOD_AIGt4z0-jCWD82gB1r_UGz8h98cT8nmmawxSM/s1600/step10.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQcyFZvnLRnDsPuWfwsVtk-8xBkXCAO1zx8tPL6UP7XPxtAT0Qq7MhZux-qiTvEB3hmqRldFxozTwcJ2lf3BEwLYCxRLR3rLJilgEOD_AIGt4z0-jCWD82gB1r_UGz8h98cT8nmmawxSM/s400/step10.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;請注意，這類的隨意路由在所有被指定使用者完成之後，系統就會根據結果直接完成此人工作業，並不會回到啟動隨意路由的人身上。如果你需要該啟動作做最後的同意，請他記得將自己加入路由的最後吧!&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;
至於怎麼看到我送出的隨意路由的執行狀況，我們以一個會簽的流程為例，&quot;tim&quot; 在送出會簽邀請給 &quot;david&quot; 和 &quot;leon&quot; 之後，你會發現， &quot;tim&quot;本身已經沒有被指派的工作了，要查詢他所送出的工作你需要將畫面中央的 &quot;指派對象&quot; 從 &quot;我和群組&quot; 改選為 &quot;上一個&quot;，你會發現，原來的工作現在另外產生了兩個子工作，分別被指派給 &quot;david&quot; 與 &quot;leon&quot; 兩人，你可以點選任意一個工作，並將工作內容中的 &quot;歷史紀錄&quot; 部分展開，你可以看到如下圖畫面所示的工作歷史。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkd4EZ9iRwAD2xzjWnV4QzlnVhi9iqj2VPRDe1h5UTEojHh7DX-k-n_q2F8C8PgKVHUXMwv3Cw39RBLyZdt9D-ad9PxOxN5-QWJPEm2oJZbMZu2ZPvkwLBXlVkvQgoCyQhKBf4NP3J5M0/s1600/step11.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;303&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkd4EZ9iRwAD2xzjWnV4QzlnVhi9iqj2VPRDe1h5UTEojHh7DX-k-n_q2F8C8PgKVHUXMwv3Cw39RBLyZdt9D-ad9PxOxN5-QWJPEm2oJZbMZu2ZPvkwLBXlVkvQgoCyQhKBf4NP3J5M0/s400/step11.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
另一種情境，使用者可能需要其他人給針對這件事情給一些意見，但是還是由自己本人做決定，在這樣的需求下，你可以使用 &quot;動作&quot; --&amp;gt; &quot;要求資訊&quot;。 這樣，被你所選定的使用者就只能提供一些註解或附件資訊，完成後工作還是回到原先使用者身上做決定。&lt;br /&gt;
&lt;br /&gt;
自己試試看吧! Enjoy it!</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/8581132295177977137/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/8581132295177977137' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/8581132295177977137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/8581132295177977137'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/03/oracle-bpmsoa-ad-hoc-routing.html' title='[Oracle BPM/SOA 實務] 隨意路由(Ad-hoc Routing) 的使用'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2GvMts3JrQMseFLCj6Gb8S4OtMTTJ8-v5YRmGDTPevwua1Ex4CC4vfC89yNnkMJZbokGTcryVuq9IYO610dHibvVN39eGUt-PnlKGEPIxSMoSjsjkeALyfAidQQYadfE-3_mzNFWc6M/s72-c/step1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-7323673736179057190</id><published>2011-03-24T11:57:00.001+08:00</published><updated>2011-03-24T11:59:56.411+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GlassFish"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaEE6"/><title type='text'>[初探JavaEE6] 使用Eclipse與GlassFish開發JEE6應用程式 (Part II -- HttpServlet &amp; RESTful Service)</title><content type='html'>&lt;b&gt;HttpServlet開發&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
接下來，我們來看一下前端的網頁程式怎麼做吧，撇開始用複雜的web framework，這裡指先做一個HttpServlet的範例，我們用它來看看JavaEE 6做了些甚麼更動。&lt;br /&gt;
&lt;br /&gt;
熟悉Eclipse的朋友們，產生Servlet的方式還是一樣，右鍵Project --&amp;gt; New --&amp;gt; Servlet，我們產生一個叫做&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;MasterServlet&lt;/span&gt;的Servlet出來。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiukdw9p8eTWtVBJfxbf5okSkTikhiTFCZuPSybSoI9VwFDRyTNgRqxEC_HI7mWOFinPvSbTqVsArI_Vy8fZqT70zoBRblBm1GHpJOlgcv3bZpT0RsjeveW_rOEo50Qd6xhOcqBXNwDMRs/s1600/step9.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;333&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiukdw9p8eTWtVBJfxbf5okSkTikhiTFCZuPSybSoI9VwFDRyTNgRqxEC_HI7mWOFinPvSbTqVsArI_Vy8fZqT70zoBRblBm1GHpJOlgcv3bZpT0RsjeveW_rOEo50Qd6xhOcqBXNwDMRs/s400/step9.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;當結束後，Eclipsse自動幫你產生了下列程式碼，&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;package &lt;/span&gt;&lt;/b&gt;blogjee6;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;import &lt;/span&gt;&lt;/b&gt;java.io.IOException;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;* Servlet implementation class MasterServlet&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@WebServlet&lt;/span&gt;(&quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;/MasterServlet&lt;/span&gt;&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public class&lt;/span&gt;&lt;/b&gt; MasterServlet &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;extends &lt;/span&gt;&lt;/b&gt;HttpServlet {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;private static final long&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;serialVersionUID &lt;/span&gt;= 1L;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;/**&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; * @see HttpServlet#HttpServlet()&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public &lt;/span&gt;&lt;/b&gt;MasterServlet() {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;super();&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// TODO Auto-generated constructor stub&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&amp;nbsp;/**&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;protected &lt;/span&gt;&lt;/b&gt;void doGet(HttpServletRequest request, HttpServletResponse response) &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;throws &lt;/span&gt;&lt;/b&gt;ServletException, IOException {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// TODO Auto-generated method stub&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;請注意，在&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;上面有個新的&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;annotation&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;叫做@WebServlet，&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;JavaEE 6的想法是多利用annotation的方式將資訊可以附加在程式碼之中，&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@WebServlet&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;就是用來指定此HttpServlet所接受HTTP request的URI資訊。你可能懷疑，那傳統的web.xml到哪裡去了呢? 的確，再產生了這個HttpServlet之後，你到WEB-INF下面看一下，Eclipse現在不會自動幫你產生對應的web.xml以及其中的Servlet設定資料，一切資料現在都在class的annotation之中了!&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;但web.xml並不是就此失效或不再使用，其實，你還是可以使用web.xml的傳統方式來去指定，指示通常是在deploy階段有需要特定的更動才會使用。&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;我們需要呼叫前一篇文章所產生的EJB做資料查詢，首先，我們需要container能夠幫我們inject入此EJB instance，我們只需要在MasterServlet的property中加入此行：&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@EJB&lt;/span&gt; MasterFacade &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;info&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;接著在doGet method之中加入下列程式碼以產生網頁：&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Master master = &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;info&lt;/span&gt;.queryMaster(1L);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;PrintWriter out = response.getWriter();&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;out.println(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;out.println(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;h1&amp;gt;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;out.println(master.getMasterId() + &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;, &quot;&lt;/span&gt; + master.getCol1() + &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;, &quot;&lt;/span&gt; + master.getCol2());&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;out.println(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;/h1&amp;gt;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;List&amp;lt;Detail&amp;gt; details = master.getDetails();&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;for &lt;/span&gt;&lt;/b&gt;(Detail detail : details) {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;out.println(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;h2&amp;gt;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;out.println(detail.getDetailId() + &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;, &quot;&lt;/span&gt; + detail.getCol1());&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;out.println(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;/h2&amp;gt;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;out.println(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;老實說，少了context setup，interface lookup...等事情，就這樣直接當作POJO使用，是比以前爽度提升太多了...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;連接到http://localhost:8080/BlogJEE6/MasterServlet，你應該可以看到你在MASTER與DETAIL資料庫table中的資料。&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;RESTful Service開發&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;系統與功能的開發，通常會伴隨著給人看的介面以及給其他系統進行資料交換的介面，近年來在企業內部遠端功能呼叫或是資料查詢，通常是使用Web Service的方式以SOAP (舊名為Simple Object Access Protocol) 訊息做交換，SOAP一方面是標準，一方面也相當成熟有一堆相關的標準去支援安全性、交易一制性...等的功能。只是... SOAP可以一點都不simple，相對的實在是有點肥，也因此，很多人都使用HTTP + XML/JSON的方式做自己的資料介面，RESTful就算是這一類的做法吧。&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;首先，你需要在Project Facet中多選個JAX-RS。右鍵Project --&amp;gt; Properties 再選Project Facet就可，記得，當你勾選時，下方會有紅色的Further configuration選項讓你進行細部設定。&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrGHwjRaoA2zCTaaN1sGW4GQs7xPVRmgpkW7mVsuX8ELBrWpCLKyo5dhyphenhyphenmBcSCCu3dhtzMnnhb6eCmgS0a3E1NlzRqkK7KtjpNhqxz0LcsD_9QYM3PDuVbFaOU66POxJM0hVg4WIbpt3c/s1600/step11.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;241&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrGHwjRaoA2zCTaaN1sGW4GQs7xPVRmgpkW7mVsuX8ELBrWpCLKyo5dhyphenhyphenmBcSCCu3dhtzMnnhb6eCmgS0a3E1NlzRqkK7KtjpNhqxz0LcsD_9QYM3PDuVbFaOU66POxJM0hVg4WIbpt3c/s400/step11.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;在這裡，我把JAX-RS Servlet的URL mapping指定為&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/rest/*&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;，代表所有在&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/rest/&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;之下的URI代表就是RESTful Service。&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Om7xKITm-6zYEI2eGGzPbGYDO9xSo3iqJecq5uOql7IGzOcwVaY-bDBWT5yN11Zip-ZoKh9nCMAc9dzGOsrbRi9T6OZnNNYRD58w6cvuE_xL_QOenABrDxN3NZbaX5wefF5t0o0rEwI/s1600/step12.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Om7xKITm-6zYEI2eGGzPbGYDO9xSo3iqJecq5uOql7IGzOcwVaY-bDBWT5yN11Zip-ZoKh9nCMAc9dzGOsrbRi9T6OZnNNYRD58w6cvuE_xL_QOenABrDxN3NZbaX5wefF5t0o0rEwI/s400/step12.PNG&quot; width=&quot;392&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;我們想產生一個查詢Master與附屬Detail資料的RESTful Service，回傳的資料以XML的格式做為表示，我們可以在Eclipse中右鍵Project --&amp;gt; RESTful Web Service from Pattern (Java EE 6)，並在對話框中輸入對應的資料：&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ7qbmhGhv7PAcI5EHrT1UobSik9KxhDB-warP1hTecj3vFrL1Tl3DziYtERTkfQygxNvaswWzxk7h4PBX098m23p7Zy3Dif6BQgvyVzyklbj9aI-6c1alxBkpISJU9wyEwhvGJ5Cr34s/s1600/step10.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ7qbmhGhv7PAcI5EHrT1UobSik9KxhDB-warP1hTecj3vFrL1Tl3DziYtERTkfQygxNvaswWzxk7h4PBX098m23p7Zy3Dif6BQgvyVzyklbj9aI-6c1alxBkpISJU9wyEwhvGJ5Cr34s/s400/step10.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;自動產生的程式碼如下：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;package &lt;/span&gt;&lt;/b&gt;blogjee6;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;import &lt;/span&gt;&lt;/b&gt;javax.ws.rs.Consumes;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@Path&lt;/span&gt;(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;generic&quot;&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public class&lt;/span&gt;&lt;/b&gt; MasterResource {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@SuppressWarnings(&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;unused&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;@Context&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;private &lt;/span&gt;&lt;/b&gt;UriInfo context;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;/**&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; * Default constructor.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public &lt;/span&gt;&lt;/b&gt;MasterResource() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// TODO Auto-generated constructor stub&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;/**&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; * Retrieves representation of an instance of MasterResource&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; * @return an instance of String&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;@GET&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;@Produces(&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&quot;application/xml&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public&lt;/span&gt;&lt;/b&gt; String getXml() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// TODO return proper representation object&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;throw new&lt;/span&gt;&lt;/b&gt; UnsupportedOperationException();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;/**&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; * PUT method for updating or creating an instance of MasterResource&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; * @param content representation for the resource&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; * @return an HTTP response with content of the updated or created resource.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;@PUT&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;@Consumes(&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&quot;application/xml&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public void&lt;/span&gt;&lt;/b&gt; putXml(String content) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;我們希望的是其他的應用程式可以透過某特定的URI去查特定Master資料，例如：透過&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/master/1&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;我們可以查到id為1的Master與對應Detail資料。這個資訊我們可以透過&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@Path(&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;/master_old/{masterId}&quot;&lt;/span&gt;)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;，以&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Path&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; annotation指定URI資訊，另外在中間放一個&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{masterId}&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;的&quot;參數&quot;，以方便動態帶入不同的查詢條件。 &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;而在&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;getXml() &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;method之前，有兩個annotation &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@GET&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;與&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Produces&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;，分別代表此method所處理的HTTP request以及回傳的MIME-type。&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;為了我們的需求，我們需要做一些簡單的修改：&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@GET&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@Produces(&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;application/xml&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public &lt;/span&gt;&lt;/b&gt;String getXml(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@PathParam(&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;masterId&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;)&lt;/span&gt; String masterId) {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;這裡&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;getXml() &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;method多了一個masterId input String，我們在這個String之前加了一個annotation &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@PathParam(&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&quot;masterId&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;，代表了這個String資料會來自於&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Path&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;之中&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{masterId}&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&quot;參數&quot;。&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;下來就是填空了，把getXml()的內容透過呼叫MasterFacade &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;EJB完成。一樣的，我們需先宣告一個&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;MasterFacade&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;讓container來inject。&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@EJB&lt;/span&gt;&amp;nbsp;MasterFacade&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;info&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: &#39;Courier New&#39;, Courier, monospace; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;將下列的code加入getXml()之中：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: &#39;Courier New&#39;, Courier, monospace; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;String result = &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Master master = &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;null&lt;/b&gt;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if (masterId != null &amp;amp;&amp;amp; !&quot;&quot;.equals(masterId)) {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;master = info.queryMaster(Long.parseLong(masterId));&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if &lt;/span&gt;&lt;/b&gt;(master != null) {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;result += &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;master&amp;gt;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;result += &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;master_id&amp;gt;&quot;&lt;/span&gt; + master.getMasterId() + &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;/master_id&amp;gt;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;result += &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;col1&amp;gt;&quot;&lt;/span&gt; + master.getCol1() + &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;/col1&amp;gt;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;result += &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;col2&amp;gt;&quot;&lt;/span&gt; + master.getCol2() + &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;/col2&amp;gt;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;if (master.getDetails().size() &amp;gt; 0) {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;result += &quot;&amp;lt;details&amp;gt;&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;for (Detail detail : master.getDetails()) {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;result += &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;detail_id&amp;gt;&quot;&lt;/span&gt; + detail.getDetailId() + &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;/detail_id&amp;gt;&lt;/span&gt;&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;result += &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;col1&amp;gt;&quot;&lt;/span&gt; + detail.getCol1() + &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;/col1&amp;gt;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;result += &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;/details&amp;gt;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;result += &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;/master&amp;gt;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;return&lt;/span&gt;&lt;/b&gt; result;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;最後，有一件事情，你需要在MasterRource&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt; class&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;之前在加上一個&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;annotation&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@Stateless&lt;/span&gt;，用意是讓&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;container 能夠管這個class，也讓你的class呼叫EJB才不會出問題。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;連到http://localhost:8080/BlogJEE6/rest/master/1試試看吧，你應該可以看到XML資料了!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/7323673736179057190/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/7323673736179057190' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/7323673736179057190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/7323673736179057190'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/03/javaee6-eclipseglassfishjee6-part-ii.html' title='[初探JavaEE6] 使用Eclipse與GlassFish開發JEE6應用程式 (Part II -- HttpServlet &amp; RESTful Service)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiukdw9p8eTWtVBJfxbf5okSkTikhiTFCZuPSybSoI9VwFDRyTNgRqxEC_HI7mWOFinPvSbTqVsArI_Vy8fZqT70zoBRblBm1GHpJOlgcv3bZpT0RsjeveW_rOEo50Qd6xhOcqBXNwDMRs/s72-c/step9.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-2058176742493999360</id><published>2011-03-10T17:32:00.002+08:00</published><updated>2011-03-24T09:54:43.001+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GlassFish"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaEE6"/><title type='text'>[初探JavaEE6] 使用Eclipse與GlassFish開發JEE6應用程式 (Part I -- JPA &amp; EJB)</title><content type='html'>JavaEE 6標準已經完成一陣子了，現在JavaEE 7也開始起跑，只是這幾年來似乎JavaEE 6標準的提升似乎並沒有吸引了太多台灣開發人員的注目，畢竟之前J2EE 1.3、J2EE 1.4至JavaEE 5改版對於多數人的開發來說，差異性沒有太大 (EJB導入的比例太小也是其中原因之一)，大部分的開發人員都傾向擁抱比較light-weight的開發framework與平台，導致Spring + Hibernate現在仍舊是主流技術。&lt;br /&gt;
&lt;br /&gt;
為什麼我會突然開始關心起JavaEE 6呢?&lt;br /&gt;
&lt;br /&gt;
實在是因為這次JavaEE 6所包裝的一些技術與標準讓我覺得 -- 也許JavaEE 6會是讓開發人員開始考慮回歸JavaEE 6標準主流的一個轉機。幾個吸引我的主題包括：模組化設計(Web Profile)的設計、CDI的引進、大量使用annotation開發、廢除EntityBean使用JPA以及JAX-RS Restful Service的標準。&lt;br /&gt;
&lt;br /&gt;
我的想法是，試著開發出一個簡單的應用場景，看看使用JavaEE 6對開發人員是否有一些吸引力。我將場景設定為：使用EJB開發一個Business Object，其中應用JPA將資料庫中兩個table的一對多資料抓出；同時，為此EJB提供對外兩種介面：HttpServlet網頁的顯示與Restful Service應用程式查詢介面。&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;開發環境準備&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
這邊我所使用的開發工具與伺服器是Eclipse + GlassFish，如果你想要省事的話，可以到&lt;a href=&quot;http://www.oracle.com/technetwork/developer-tools/eclipse/overview/index.html&quot;&gt;Oracle Enterprise Pack for Eclipse的網站&lt;/a&gt;下載最新版本的開發工具，其中已經將Eclipse與GlassFish Tools plug-in安裝預設安裝好。然後在&lt;a href=&quot;https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=ogs-3.1-oth-JPR@CDS-CDS_Developer&quot;&gt;這邊&lt;/a&gt;下載GlassFish 3.1版。&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;註：這篇不是Eclipse教學，我不會說明怎麼安裝Eclipse、設定Server...等，網路上已經有夠多的文件，有需要的人可以拜一下孤狗大神&lt;/i&gt;&lt;/blockquote&gt;另外，我選用Oracle資料庫做為資料儲存的地方，你可以用下列DDL產生兩個所開發需要的table：&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;CREATE TABLE MASTER (&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;MASTER_ID NUMBER(22 , 0) NOT NULL,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;COL1 VARCHAR2(30),&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;COL2 VARCHAR2(30)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ALTER TABLE MASTER ADD CONSTRAINT PK_MASTER PRIMARY KEY (MASTER_ID);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;CREATE TABLE DETAIL (&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;DETAIL_ID NUMBER(22 , 0) NOT NULL,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;MASTER_ID NUMBER(22 , 0),&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;COL1 VARCHAR2(30)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ALTER TABLE DETAIL ADD CONSTRAINT PK_DETAIL PRIMARY KEY (DETAIL_ID);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ALTER TABLE DETAIL ADD CONSTRAINT FK_MASTER FOREIGN KEY (MASTER_ID)&amp;nbsp;REFERENCES MASTER (MASTER_ID);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Part I --&amp;nbsp;&lt;/b&gt;&lt;b&gt;JPA&lt;/b&gt;&lt;b&gt;開發&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
產生一個Dynamic Web Project -- BlogJEE6。&lt;br /&gt;
&lt;br /&gt;
我們從底層部分開始做起，首先開啟Project Properties，在Project Facet中勾選JPA。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwHeAz8rnIGNDT_o47q8WwjnIKpmED5WygLdgqN5DW2iVALcDACJmsvG2lfRilIH7LhF7HqcI3R2jIdZBbqJqwF2Tk16_c893BjqjscKhdjKo5-1t-pOORuhEa8XZHGOGmAN55Q00EGQs/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwHeAz8rnIGNDT_o47q8WwjnIKpmED5WygLdgqN5DW2iVALcDACJmsvG2lfRilIH7LhF7HqcI3R2jIdZBbqJqwF2Tk16_c893BjqjscKhdjKo5-1t-pOORuhEa8XZHGOGmAN55Q00EGQs/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
在Project上右鍵 --&amp;gt; JPA Tools --&amp;gt; Generate Entities from Tables。會有個對話框讓你指定DB connection、Schema以及Tables。下圖我指定了TimDB的Oracle DB連線，其中我們會用到的就是環境準備時使用DDL所產生的&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;MASTER&lt;/span&gt;與&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;DETAIL&lt;/span&gt;兩個table。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwehmEYPZoLMXXJGfYuZ_S-K8B89JmncYn6XLjeR6g-ulyux-xoLOQ5X7q8cu5Dx2812IXujEfcl4XrMFaHQfN_5o01v7Q9JwBxm10h06MqCpFdMVke1iDAYIINBP6y-wQehLeH7WCxpM/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwehmEYPZoLMXXJGfYuZ_S-K8B89JmncYn6XLjeR6g-ulyux-xoLOQ5X7q8cu5Dx2812IXujEfcl4XrMFaHQfN_5o01v7Q9JwBxm10h06MqCpFdMVke1iDAYIINBP6y-wQehLeH7WCxpM/s400/step2.PNG&quot; width=&quot;366&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
下一步，由於在兩個table之間有foreign key的設定，Eclipse自動幫我們抓出了中間的關係：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBDoqoZJx4IV0MT3TQK8OuhNPKwdOlWLDq8M81qJWQYutgH0262R0vcbRxJICS4Ry-IOynvwDJ9rKcUZcAcNxDZQl-1wYp7_9J_PK7UYJ2ToYNx0gESubKYmqEq7u21C4TPLncwoZYfao/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBDoqoZJx4IV0MT3TQK8OuhNPKwdOlWLDq8M81qJWQYutgH0262R0vcbRxJICS4Ry-IOynvwDJ9rKcUZcAcNxDZQl-1wYp7_9J_PK7UYJ2ToYNx0gESubKYmqEq7u21C4TPLncwoZYfao/s400/step3.PNG&quot; width=&quot;301&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
下一步，指定Entity的一些特性，特別需要注意的是，根據使用情境，我希望抓取Master時一次將Detail的資料也一併取出，因此Associations fetch指定為Eager；反之，可以指定為Lazy。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilAyL_RYYw7KvU05WPFhyphenhyphenDPeUaiMjhZZKEU69rf4OduQHX3a-w9sXnLq40ZwNVZYQFClGebJdcK83f6rx2GNwoiG8CQIBBy_gZ4luw7oVtCR7ZUJQ14uas97oO5w1m1JwginqitkWIC3s/s1600/step4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilAyL_RYYw7KvU05WPFhyphenhyphenDPeUaiMjhZZKEU69rf4OduQHX3a-w9sXnLq40ZwNVZYQFClGebJdcK83f6rx2GNwoiG8CQIBBy_gZ4luw7oVtCR7ZUJQ14uas97oO5w1m1JwginqitkWIC3s/s400/step4.PNG&quot; width=&quot;301&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
下一步，分別為你的兩個Entity個別設定，這裡因為沒有指定使用Oracle DB的SEQUENCE做為PK的值，我的Key generator使用的是 &quot;none&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEFTc75U9xaKpuCw-bn4CHq93dhHWU8YSMx_COfP8azkCI7ZdqJDUWaWTfmJ-CVyvU4JQtx597uvMAJ0-aDxbHv3skSSpbIgzIKGroC73XDD0sc2YcmDGm-MiKlyo9OzlkoXpM6OFXOMA/s1600/step5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEFTc75U9xaKpuCw-bn4CHq93dhHWU8YSMx_COfP8azkCI7ZdqJDUWaWTfmJ-CVyvU4JQtx597uvMAJ0-aDxbHv3skSSpbIgzIKGroC73XDD0sc2YcmDGm-MiKlyo9OzlkoXpM6OFXOMA/s400/step5.PNG&quot; width=&quot;301&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
完成之後，你會發現有兩個class自動被產生 -- &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Master&lt;/span&gt;與&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Detail&lt;/span&gt;，偷看一下內容吧：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Entity&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;public class&lt;/b&gt;&lt;/span&gt; Master &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;implements &lt;/span&gt;&lt;/b&gt;Serializable {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;private static final long&lt;/b&gt;&lt;/span&gt; serialVersionUID = 1L;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@Id&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@Column&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;(name=&quot;MASTER_ID&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;private long&lt;/span&gt;&lt;/b&gt; masterId;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;private &lt;/span&gt;&lt;/b&gt;String col1;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;private &lt;/span&gt;&lt;/b&gt;String col2;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;//bi-directional many-to-one association to Detail&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@OneToMany&lt;/span&gt;(mappedBy=&quot;master&quot;, fetch=FetchType.EAGER)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;private &lt;/span&gt;&lt;/b&gt;List&amp;lt;Detail&amp;gt; details;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public &lt;/span&gt;&lt;/b&gt;Master() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Entity&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public class&lt;/span&gt;&lt;/b&gt; Detail &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;implements &lt;/span&gt;&lt;/b&gt;Serializable {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;private static final long serialVersionUID = 1L;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@Id&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@Column&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;(name=&quot;DETAIL_ID&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;private long&lt;/span&gt;&lt;/b&gt; detailId;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;private &lt;/span&gt;&lt;/b&gt;String col1;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;//bi-directional many-to-one association to Master&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@ManyToOne&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@JoinColumn&lt;/span&gt;(name=&quot;MASTER_ID&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;private &lt;/span&gt;&lt;/b&gt;Master master;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public &lt;/span&gt;&lt;/b&gt;Detail() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
有看到許多的annotation嗎? JPA就是使用這些annotation來指定OR-mapping的方式，不需要額外的XML configuration檔案設計對應。首先，JPA的Entity class定義上，需要先指定&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Entity&lt;/span&gt;代表此class需做OR-mapping，在此class中的property只要不是定義為&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;transient&lt;/b&gt;&lt;/span&gt;的，都會被對應至table的欄位之中，其對應方式用&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Column (name=&quot;&amp;lt;COLUMN_NAME&amp;gt;&quot;)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;。眼尖的你如果發現&lt;/span&gt;上面產生出來的code中，有些properties沒有被定義&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Column&lt;/span&gt;，通常代表這些property的名稱就是和table中欄位名稱一致。&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Id&lt;/span&gt;被用來定義為Primary Key欄位，在我們的例子中，Primary Key是我們自己產生，所以並沒有指定產生的方式，若是有需要用DB內建的SEQUENCE或是自動欄位產生該值的話，可以使用&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@GeneratedValue&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;(strategy=GenerationType.AUTO)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;(其實&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;GenerationType&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;有&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;SEQUENCE&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;、&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;TABLE&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;與&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;IDENTITY&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;可選，你需要根據你所使用的資料庫與Table做相對應的設計)&lt;/span&gt;。&lt;br /&gt;
&lt;br /&gt;
在一對多與多對一的情境則使用&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@OneToMany&lt;/span&gt;與&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@ManyToOne&lt;/span&gt;的方式來指定。當你不是額外使用一個table紀錄master與detail table之間的關係時，&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@OneToMany&lt;/span&gt;與&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@ManyToOne&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;的設定&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;就需要互相呼應，先看在&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@ManyToOne&lt;/span&gt;這邊，需要&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@JoinColumn&lt;/span&gt;(name=&quot;MASTER_ID&quot;)指定在&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Table foreign key所設定的欄位名稱為&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;MASTER_ID&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;；而另外在&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@OneToMany&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;的設定上，需要對應&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mappedBy=&quot;master&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;，用來指定在Detail class中指向Master class的property名稱。&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;接下來，只剩下一個資訊要指定了，我們需要告訴GlassFish這個DB的位置在哪裡，一般來說大家都會利用container本身的data source與connection pool來管理資料庫連線，因此我們只需要指定這個OR-Mapping是使用到哪一個data source即可。&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;打開Project內的JPA Content --&amp;gt; persistence.xml (沒錯，少數我們還需要關心的XML檔案，其餘大部分都給annotation取代了)，在connection tab下指定JTA data source的名稱。&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz_D9rVMR437CKCfQgnuLD0_937xZGFs8eIIP9TeV7TYIGzsmTFpR_YEQ1zTiUpQF_1gHFJpi-mFcce79HoBe_TPfI4YVUINsRMeyUfktHY_jOa-P04G3mGTlhyphenhyphenuFyYWbAqxMXIQEDmm4/s1600/step6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz_D9rVMR437CKCfQgnuLD0_937xZGFs8eIIP9TeV7TYIGzsmTFpR_YEQ1zTiUpQF_1gHFJpi-mFcce79HoBe_TPfI4YVUINsRMeyUfktHY_jOa-P04G3mGTlhyphenhyphenuFyYWbAqxMXIQEDmm4/s400/step6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;記得你需要在GlassFish中設定好對應的data source與connection pool：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhStHlL6UViMzUxQafn7v_QcnPLAuv4iYVscNNYlE9XUhjlisjLRgUmTizGt0I0-DAEsDQ6ci2onX6UfUAcEc4julmUhysvi9D_FE1AtJw7Q2_pl4w-clpBq8fszqS-DPXa9yrUTQrrPDs/s1600/step7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhStHlL6UViMzUxQafn7v_QcnPLAuv4iYVscNNYlE9XUhjlisjLRgUmTizGt0I0-DAEsDQ6ci2onX6UfUAcEc4julmUhysvi9D_FE1AtJw7Q2_pl4w-clpBq8fszqS-DPXa9yrUTQrrPDs/s400/step7.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;到此為止，你已經完成了database OR-Mapping的部分了，接下來，需要個business interface 讓前端的Servlet或Restful WS呼叫執行資料的產生或查詢，這裡我們將開發一個Stateless Session Bean做為此Business Object。&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;在Project中新建一個名稱為InfoBean的EJB 3的Session Bean：&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjF-QACI7B36KzXgBjsQcgMBRkCf7IxEVjMhCgvyRC1Ti2AnZ80ujdnkKH2a7bZr5_8VQuImU90rmlDYoDInptELy0r4sl-p93VDHR196eX6GsWKadStBbTnOphJeknMr3KvbMHH40g24/s1600/step8.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;380&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjF-QACI7B36KzXgBjsQcgMBRkCf7IxEVjMhCgvyRC1Ti2AnZ80ujdnkKH2a7bZr5_8VQuImU90rmlDYoDInptELy0r4sl-p93VDHR196eX6GsWKadStBbTnOphJeknMr3KvbMHH40g24/s400/step8.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;自動產生的程式碼如下：&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;package &lt;/span&gt;&lt;/b&gt;blogjee6;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;import &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;javax.ejb.LocalBean;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;import &lt;/span&gt;&lt;/b&gt;javax.ejb.Stateless;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;* Session Bean implementation class InfoBean&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Stateless&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@LocalBean&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public class&lt;/span&gt;&lt;/b&gt; MasterFacade{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;/**&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; * Default constructor.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public &lt;/span&gt;&lt;/b&gt;InfoBean() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO Auto-generated constructor stub&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;從EJB3開始，我只要用&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@Stateless&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;去指定該POJO為一EJB，夠簡單吧?&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;在EJB中使用JPA做簡單的查詢，我們只需要加入下列的code在class之中：&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;@PersistenceContext&lt;/span&gt; EntityManager &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;em&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;public &lt;/span&gt;&lt;/b&gt;Master queryMaster(&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;long &lt;/span&gt;&lt;/b&gt;id) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;em&lt;/span&gt;.find(Master.&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;, id);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;特別注意的是，這裡使用了Dependency Injection的方式，用&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@PersistenceContext&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;取得&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;EntityManager&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;物件，你可以試著使用&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;em.persist()&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;、&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;em.merge()&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;與&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;em.remove()&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;執行新增刪除與修改的動作。&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;到這裡你已經完成了傳統在business object、data access object所該做的事情了，比比看以前的EntityBean與SessionBean，是不是少了很多東西? EntityBean、value object、home interface... 等等討厭的東西看來都不見囉~&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;下一篇我們再來看看前端的HttpServlet與Restful Service該怎麼做吧!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/2058176742493999360/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/2058176742493999360' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/2058176742493999360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/2058176742493999360'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/03/javaee6-eclipseglassfishjee6-part-i-jpa.html' title='[初探JavaEE6] 使用Eclipse與GlassFish開發JEE6應用程式 (Part I -- JPA &amp; EJB)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwHeAz8rnIGNDT_o47q8WwjnIKpmED5WygLdgqN5DW2iVALcDACJmsvG2lfRilIH7LhF7HqcI3R2jIdZBbqJqwF2Tk16_c893BjqjscKhdjKo5-1t-pOORuhEa8XZHGOGmAN55Q00EGQs/s72-c/step1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-1891560540071221245</id><published>2011-03-01T15:15:00.002+08:00</published><updated>2011-03-01T15:28:54.978+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>[Oracle SOA 應用] 使用Mediator與Event處理content-based routing</title><content type='html'>這幾天剛好有個朋友問到一種在SOA設計上面常遇到的情境，使用SOA (ESB)架構做request 的content-based routing設計，常常設計出下列的composite：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEkOidGfiK7VqTbOTSmdbYMSnrhZ5EwRsoERRWtTAtOzRkKuF0xI2XWaAm0Oy1gj_VNWAwPIGUbyydfysWZAZd25UEsealiDUiKdfffcM4UJ3rEMbUuAERUnnhSvWVMyNK39ekI0ZK8hQ/s1600/arch.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEkOidGfiK7VqTbOTSmdbYMSnrhZ5EwRsoERRWtTAtOzRkKuF0xI2XWaAm0Oy1gj_VNWAwPIGUbyydfysWZAZd25UEsealiDUiKdfffcM4UJ3rEMbUuAERUnnhSvWVMyNK39ekI0ZK8hQ/s400/arch.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
這樣的設計是由SOA平台對外提供單一介面，然後根據傳入訊息內容決定要呼叫哪一個End-Point Web Service。&lt;br /&gt;
&lt;br /&gt;
在SOA 11g的SCA架構中，通常是把相對應的end-point，中間的mediator與對外的web service打包成一個composite，然後一次部署上server。這樣的設計在一般情境下都非常適用，開發人員只要拖拉點選就可以快速完成。只不過，要是需求的end-point有可能有上百個的話，這張圖可能就太大了，而每一次的重新部署都會影響到所有的服務，相對應的在維護上反而造成了小小的不便。&lt;br /&gt;
&lt;br /&gt;
要怎麼樣解決這樣的問題哩?&amp;nbsp;我建議可以從幾種方式下手：&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;使用SOA 11g內建的 EDN (Event Delivery Network)&lt;/li&gt;
&lt;li&gt;使用BPEL Dynamic partner-link&lt;/li&gt;
&lt;li&gt;使用BPEL + EDN + Correlation機制&lt;/li&gt;
&lt;/ol&gt;這篇我們先從簡單的第一種方式開始介紹起，SOA 11g內建了EDN的機制做為各component之間訊息傳遞所用。你可以把它想像成為在SOA內部的一個JMS Server一樣的東西，你可能會問到，JMS Server不是早就有了嗎? 為什麼需要在SOA中另外設計一個EDN呢? 除了方便開發這個原因之外，我想最重要的就是避免了既然已經有一個SOA infrastructure在底層串接所有的元件，這些元件中的溝通何需另外透過JCA-based的JMS Adapter往外送出一個message，然後在另外的composite中又透過JMS Adapter抓出訊息來處理哩? 何不直接就透過SOA infrastructure來溝通就好。&lt;br /&gt;
&lt;br /&gt;
這樣的架構可以供各個composite或component之間不需要【直接連接】，改用訂閱特定的event的方式來做串連，這樣的話，同樣的需求我們就可以把單一個composite拆解成多個獨立的composite：一個負責接收前端web service request，並且發出Event；另外的多個composite就各自負責聽取特定的Event，轉呼叫後端的end-point。設計如下：&lt;br /&gt;
&lt;br /&gt;
1) 收request並轉發Event：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKU6BD3-BdH1x9Llbc3Gs8bKrOqzZno_ZlQcZUbkHDK1TUhDhRZjOctJOb3sE3YnaCfDe49QuA52jWPdnKnUeRFuKYsL0uJznTp-iPhRxuds0E6O-SftPMlSWAb53HG0L1CS9ah6B3e-8/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;146&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKU6BD3-BdH1x9Llbc3Gs8bKrOqzZno_ZlQcZUbkHDK1TUhDhRZjOctJOb3sE3YnaCfDe49QuA52jWPdnKnUeRFuKYsL0uJznTp-iPhRxuds0E6O-SftPMlSWAb53HG0L1CS9ah6B3e-8/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;2) 收Event並轉呼叫 End-point service：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhByigGspFoXXL2aq6qJLGaCJ5gjOmXJpbTxFfjHlhXOF3Z6qywcayrBfBTNEVn4QvFZIxqLTXB8v5o1o_46BQFQ8iTXQgyjLh0EIKUcTiBgJklnVDcvZOhlND-0l5EKxLHiHALyLkbnMc/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;131&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhByigGspFoXXL2aq6qJLGaCJ5gjOmXJpbTxFfjHlhXOF3Z6qywcayrBfBTNEVn4QvFZIxqLTXB8v5o1o_46BQFQ8iTXQgyjLh0EIKUcTiBgJklnVDcvZOhlND-0l5EKxLHiHALyLkbnMc/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;在有上百個Service end-point的情形，你只需訂一個前端的composite，在為每一種end-point設計處理使用的composite即可。這樣的de-couple架構，在特定的應用下非常有用，但是他也有相對應的壞處... &lt;b&gt;只能夠處理 One-way 的呼叫，並沒有辦法支援request-reponse的架構&lt;/b&gt;，要支援request-reponse架構，你可能就會需要使用到前面我們所提的另外兩種做法：dynamic partner link或是EDN + correlation的雙向Event了。&lt;/div&gt;&lt;br /&gt;
先看看怎麼定義一個Event，你會先需要有個XML Schema做為message type：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;?xml version= &#39;1.0&#39; encoding= &#39;UTF-8&#39; ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; xmlns:eventmsg=&quot;http://blogdemo/eventmsg&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; targetNamespace=&quot;http://blogdemo/eventmsg&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; elementFormDefault=&quot;qualified&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;xsd:element name=&quot;EventMsg&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element name=&quot;EventID&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element name=&quot;EventContext&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/xsd:element&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;/xsd:schema&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
這裡我們簡單使用一個EventMsg的Element做為傳遞的訊息，其中EventID供後端判斷是要哪一個end-point來處理，EventContext則定義訊息的內容。&lt;br /&gt;
&lt;br /&gt;
接下來，按下composite editor上方的橘色閃電按鈕，新產生一個Event Definition File。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip79uCFkx5V7t-kC_l2WH_qZ10UebuGS4HO1IOPtP9_YElsQy18_O5nhFMB0bBL7zmUoQWxw2VcpNId_1v-l_3jsnxGC7GsJs6OkcSP1objfcSP_c9E1Q8KEl-37JQgNsaM3KFnQnAqTE/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip79uCFkx5V7t-kC_l2WH_qZ10UebuGS4HO1IOPtP9_YElsQy18_O5nhFMB0bBL7zmUoQWxw2VcpNId_1v-l_3jsnxGC7GsJs6OkcSP1objfcSP_c9E1Q8KEl-37JQgNsaM3KFnQnAqTE/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
定義一下你的Event Definition File名稱以及他的內容的type。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhURawZ-cha7VIjgI1v2v5j-DGLXKNTZJFKSqAukZ9YrJdUovuyk4W64eQAfXzoFAMXv8fl7q0OEDcxqY9gTACXN7-HVuEf79vVqeXGxQRNkV5r-Q4BCeZGk4-N5QuW8eMLUf21aFFvaqs/s1600/step4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhURawZ-cha7VIjgI1v2v5j-DGLXKNTZJFKSqAukZ9YrJdUovuyk4W64eQAfXzoFAMXv8fl7q0OEDcxqY9gTACXN7-HVuEf79vVqeXGxQRNkV5r-Q4BCeZGk4-N5QuW8eMLUf21aFFvaqs/s400/step4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
當你的edl檔案定義完成之後，你就可以在component之中使用到該Event，以mediator為例，我們會需要這個mediator有個static routing rule，將傳入的event message驅動一Event。如下圖所示，你可以選擇Event按鈕之後，選擇該才所定義的Event Definition File以及Event，後續的mapping定義方式就和一般的Mediator一模一樣了。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPf0gk9Qq6LRAHc1dj0JavX4rOqmR0Ym4knzo9iLTzAEnNsLwO7XjuqRmnUTGeKkX8EJtap-YiVNgpJiFToCgqHCU5Whj0OZxS5m409HP8flbv7dX6AaUpNdhA2E8A489wt1_a1LwuhwA/s1600/step5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPf0gk9Qq6LRAHc1dj0JavX4rOqmR0Ym4knzo9iLTzAEnNsLwO7XjuqRmnUTGeKkX8EJtap-YiVNgpJiFToCgqHCU5Whj0OZxS5m409HP8flbv7dX6AaUpNdhA2E8A489wt1_a1LwuhwA/s400/step5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib-u95LC3PuMPa6hApxiVPSDqtYRLiwXeebg3PDFc8Iewy7rDi_FS9FqOGnsBVgmsBeoXPLXx6C42IgGwsPcmNFdlZxvebsdNl36_1wV9bptvUrQ-wkkAKlUZkYjDAy11k_h4UUIf2SLg/s1600/step6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib-u95LC3PuMPa6hApxiVPSDqtYRLiwXeebg3PDFc8Iewy7rDi_FS9FqOGnsBVgmsBeoXPLXx6C42IgGwsPcmNFdlZxvebsdNl36_1wV9bptvUrQ-wkkAKlUZkYjDAy11k_h4UUIf2SLg/s400/step6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
另外，在consume Event的composite端，同樣，拉入一個mediator並double-click編輯內容，此時，在mediator&amp;nbsp;routing rules中新增一個Event subscription，此時，你需要提供之前上個composite中所定義的Event Definition File，並選定你所要註冊的Event名稱。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt_i76Yfd2i0kPJi1vVCZeaGw7-8bTP7gPlDYs8OioO8ehAzNG7hi4b6I4R4rS6mtn0mviqprjW9WeLyVTBIwmlLUCVNZehM_-8r4Vv0GAVnhYG5CQ7ekxads-H9adzJbIWdSGCfCddWg/s1600/step7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt_i76Yfd2i0kPJi1vVCZeaGw7-8bTP7gPlDYs8OioO8ehAzNG7hi4b6I4R4rS6mtn0mviqprjW9WeLyVTBIwmlLUCVNZehM_-8r4Vv0GAVnhYG5CQ7ekxads-H9adzJbIWdSGCfCddWg/s400/step7.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
特別注意的是，由於每一個處理Event的composite會根據EventID判斷是否此Event是自己需要處理的，因此，每一個Event subscription我們需額外定義他的subscription filter，你可以按下上圖中那個漏斗圖案進行編輯。&lt;br /&gt;
&lt;br /&gt;
下圖是一個範例，指定該composite只處理EventID為1的所有事件。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW7MqLSaY-TuVio3P_niZMJrzznGXw3IIq7IXH7iAFvfoWiwVffGcO48rY0dF14kK3ZmQukN1FIzjFVoCWD11noVuu9nZ2-zRIS0VLnetB4LQXqC3-Os3ZFv5AdyHPmey1F9ZrmaaNjHk/s1600/step8.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW7MqLSaY-TuVio3P_niZMJrzznGXw3IIq7IXH7iAFvfoWiwVffGcO48rY0dF14kK3ZmQukN1FIzjFVoCWD11noVuu9nZ2-zRIS0VLnetB4LQXqC3-Os3ZFv5AdyHPmey1F9ZrmaaNjHk/s400/step8.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
相信其他的部分大家都可以自己試試看將它完成!&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;ps. 有興趣參考dynamic partner-link做法的人，可以參考一下&lt;a href=&quot;http://www.oracle.com/technetwork/articles/carey-090553.html&quot;&gt;這篇&lt;/a&gt;，該文章是10g版本的，但是差異性不大，要改成11g的作法請參考&lt;a href=&quot;http://blogs.oracle.com/dasoa/2010/09/11g_dynamic_partnerlink_example.html&quot;&gt;這篇&lt;/a&gt;。&lt;/i&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/1891560540071221245/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/1891560540071221245' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/1891560540071221245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/1891560540071221245'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/03/oracle-soa-mediatorevent.html' title='[Oracle SOA 應用] 使用Mediator與Event處理content-based routing'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEkOidGfiK7VqTbOTSmdbYMSnrhZ5EwRsoERRWtTAtOzRkKuF0xI2XWaAm0Oy1gj_VNWAwPIGUbyydfysWZAZd25UEsealiDUiKdfffcM4UJ3rEMbUuAERUnnhSvWVMyNK39ekI0ZK8hQ/s72-c/arch.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-2408302953361958989</id><published>2011-02-22T15:23:00.000+08:00</published><updated>2011-02-22T15:24:32.014+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPMN"/><title type='text'>[BPMN 2.0] 例外狀況處理</title><content type='html'>這一篇我們來看看在BPMN中怎麼處理例外狀況。&lt;br /&gt;
&lt;br /&gt;
有一個假定的場景：我們設計一個自動處理的流程，在一般情形時都透過系統自動將資料處理並轉發至Message Queue之中，但是在某些情況之下，當自動發送訊息無法正常處理時，系統會發一筆人工作業單給特定例外狀況處理人員，此人員必須在30分鐘之內手動處理，不然系統會通知其管理人員。&lt;br /&gt;
&lt;br /&gt;
這算是一個簡單整合系統自動流程與人工作業流程的範例，我們先看一下BPMN怎麼畫出這樣的流程：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4fH10CtndUZAyusUTB7yzHV9_mj43JS-USpqzwkMvDeAzgpsHL2-KVZp2dL4yV0mBSkpCM6BFGbBF_VGmTJqd2XlEK__4kx4PwybXkTQLzHAStfHzQvleKRPClIX7ug9-U5hmsZN5UWk/s1600/process.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;247&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4fH10CtndUZAyusUTB7yzHV9_mj43JS-USpqzwkMvDeAzgpsHL2-KVZp2dL4yV0mBSkpCM6BFGbBF_VGmTJqd2XlEK__4kx4PwybXkTQLzHAStfHzQvleKRPClIX7ug9-U5hmsZN5UWk/s400/process.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
圖中有三個水道，第一個水道代表了系統自動執行的流程，第二與第三水道分別代表了例外狀況處理人員以及管理人員的角色。我們可以在 &quot;Send Msg&quot; Service Activity 與 &quot;Handle Exception&quot; User Task上面看到了兩個我們用來處理特定事件(Event)的圖示，產生的方式是你可以從Component Palette --&amp;gt; Events --&amp;gt; Catch Events中分別拖拉出 &quot;Error&quot; 與 &quot;Timer&quot; 兩個Event放到Activity之上。&lt;br /&gt;
&lt;br /&gt;
長相像是閃電的 &quot;Catch Error&quot; Event 顧名思義就是用來抓取該 Activity 錯誤發生之時的執行路徑，Double-Click該Event你可以看到如下圖所示的對話框：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr-GzZ3a64tAk8fKBky_x6Em99xpiHXbABDG2vsVJitrxbVoOpvry8P5JkfscyWRu1ii5amKK_RtY5qUH9FWkDO5vlV897vmy4ZsZsGVXpxPAsv6U71S47D9sAnyiKQX79ZFNWNMNQZWg/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr-GzZ3a64tAk8fKBky_x6Em99xpiHXbABDG2vsVJitrxbVoOpvry8P5JkfscyWRu1ii5amKK_RtY5qUH9FWkDO5vlV897vmy4ZsZsGVXpxPAsv6U71S47D9sAnyiKQX79ZFNWNMNQZWg/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
在此對話框之中，你可以選擇其處理哪些種類的例外，概念和一般程式語言的catch很像，可選擇抓取特定的某種Exception，或是所有的Business與System的Exception。在我們設計的例子中，由於此Activity是屬於系統自動處理步驟，我們設計抓取其所發生的所有系統例外。&lt;br /&gt;
&lt;br /&gt;
接下來Double-click長相像是時鐘的Timer Event，其對話框如下所示：&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmTaC7-vnOYKTjlJQEvQIHXOGcMGqfgUdtnunWNwefLRYbq62hF9KoRrHm6lWyG3eNigw0NAlBWbCO3AOto77lDlnExlx74XBC3PwuYY0MWxfmcHeZC_SfqCkTEmPM3-IR6fNQMONq7UU/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmTaC7-vnOYKTjlJQEvQIHXOGcMGqfgUdtnunWNwefLRYbq62hF9KoRrHm6lWyG3eNigw0NAlBWbCO3AOto77lDlnExlx74XBC3PwuYY0MWxfmcHeZC_SfqCkTEmPM3-IR6fNQMONq7UU/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;當Timer Event被放置在某一Activity之上時，代表了此Activity每當特定時間或每隔特定時間會驅動一個事件執行，我們選擇了 &quot;Time Cycle&quot; 並指定 Cycle Time 為 30分鐘，因此，當流程在此Activity上停留超過30分鐘之後，此事件會被驅動。&lt;br /&gt;
&lt;br /&gt;
特別注意的是，你可以根據需求決定需不需勾選 &quot;Interrupting Event&quot;，勾選此選項代表當事件被驅動之後，此Activity會被打斷，直接將流程進入Event驅動執行的流程；但若是不勾選的話，事件仍然會被驅動，只是該流程可由該Activity繼續向下執行。&lt;br /&gt;
&lt;br /&gt;
當然，搭配上subprocess之後，你可以用此處理一連串的 Activity ：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaIXSaE3y4R_nEq6r8cD_Em7vrJzuVYlkjtNr2dGxoVq4vks1wrnfafpgwfh2Ni3n2tZh1BO-A4eadlJbwo-ZPp6RzeHnQqPLBI70VvKXmLYz3DJ-CzDVfj1a6tbE1y2Z3_kg9QsCupGQ/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaIXSaE3y4R_nEq6r8cD_Em7vrJzuVYlkjtNr2dGxoVq4vks1wrnfafpgwfh2Ni3n2tZh1BO-A4eadlJbwo-ZPp6RzeHnQqPLBI70VvKXmLYz3DJ-CzDVfj1a6tbE1y2Z3_kg9QsCupGQ/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
如圖，你可以針對Step1至Step3處理超過時間之時，執行StepN。</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/2408302953361958989/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/2408302953361958989' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/2408302953361958989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/2408302953361958989'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/02/bpmn-20.html' title='[BPMN 2.0] 例外狀況處理'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4fH10CtndUZAyusUTB7yzHV9_mj43JS-USpqzwkMvDeAzgpsHL2-KVZp2dL4yV0mBSkpCM6BFGbBF_VGmTJqd2XlEK__4kx4PwybXkTQLzHAStfHzQvleKRPClIX7ug9-U5hmsZN5UWk/s72-c/process.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-5718173685105520757</id><published>2011-02-18T15:59:00.002+08:00</published><updated>2011-02-18T16:04:56.733+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>[Oracle BPM/SOA 實務] 客製化BPM前端應用程式</title><content type='html'>實務上就台灣客戶的使用習慣而言，幾乎都會要求不管使用任何的BPM軟體作為流程運作平台，前端的應用程式都需要量身打造，以整合進客戶所慣用的應用程式。個人認為，這樣的要求算是合情合理，企業內部的BPM規劃本身就應該走向共用單一平台的設計模式，也就是，理想狀態下可以讓多種的應用系統(無論是.NET或Java或C++所開發的)，有需要內部流程管理，或跨系統流程應用串接時，都可以將流程部署至此平台，前端應用系統可以維持原先介面的操作性，只是在適當時機透過API或特定介面與BPM進行起案、取件...等等的動作即可。&lt;br /&gt;
&lt;br /&gt;
BPM平台與外界系統架構簡單來看是這個樣子：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7RUXuH6Jp9WF49yctOGWxWZnZuZsBdPzjtCfXBLJLhqZ13eZpOZVO5RZra7uHNrVpRcOIZX_rAiEG4UxPry3cOOmcHFIlYDqM3i1doCcZ0O4fnzcD0Qi5Q4tliRJ_HRrOtM3E-6j0Pes/s1600/arch.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7RUXuH6Jp9WF49yctOGWxWZnZuZsBdPzjtCfXBLJLhqZ13eZpOZVO5RZra7uHNrVpRcOIZX_rAiEG4UxPry3cOOmcHFIlYDqM3i1doCcZ0O4fnzcD0Qi5Q4tliRJ_HRrOtM3E-6j0Pes/s400/arch.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;i&gt;注意，Front-end有時也是back-end，反之亦然...&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;也因此，在BPM的架構中，個人覺得除了流程設計的彈性之外，對外的溝通是另外一個非常重要的主題。而對前端應用與後端系統整合的方式，又各有不同的方式，前端的強調在豐富方便的API提供人工作業的互動；後端的就需強調SOA架構下，和現有系統的整合能力了!&lt;br /&gt;
&lt;br /&gt;
這篇的主題我們先注重在前端的API上。服用此主題之前，請先服用&lt;a href=&quot;http://timwu1975.blogspot.com/2011/01/oracle-fusion-middleware-bpm.html&quot;&gt;Oracle BPM基礎&lt;/a&gt;，以免噎到。&lt;br /&gt;
&lt;br /&gt;
假設前端應用系統需要一個簡單的審核流程，如下BPMN所示：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGLnMdv6XuA1Vr0zwKfWpEOX1uv15RHwuagdACu_cSfjkY8HnoNYv9oH_GLfoozrggYzF20mBKUon8OWwQs5_mcUwswa-EtDijH_Ia_4YCr67Ygu44DrHyHqTd7T5Iz0ZtxeOffFV545I/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;297&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGLnMdv6XuA1Vr0zwKfWpEOX1uv15RHwuagdACu_cSfjkY8HnoNYv9oH_GLfoozrggYzF20mBKUon8OWwQs5_mcUwswa-EtDijH_Ia_4YCr67Ygu44DrHyHqTd7T5Iz0ZtxeOffFV545I/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
在BPM平台之中，我們設計了一個流程，其中包含了兩個人工作業關卡，分別是起案所用的 &quot;InitTask&quot;、審核所用的 &quot;ConfirmTask&quot;；個別交給兩種角色 &quot;InitRole&quot; 與 &quot;ComfirmRole&quot; 來負責。此流程之中我們只帶了一個資訊，其XML Schema如下：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xmlns:customhumantask=&quot;http://blogdemo/customhumantask&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;targetNamespace=&quot;http://blogdemo/customhumantask&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elementFormDefault=&quot;qualified&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;xsd:element name=&quot;hello&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element name=&quot;helloString&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/xsd:element&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;/xsd:schema&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
簡單來說，就是帶了一個hello的XML資料，其中內容為helloString的字串。&lt;br /&gt;
&lt;br /&gt;
Oracle BPM提供了Human Workflow Service模組用以處理人工作業，其對外的介面有兩種：1) 如果你使用Java語言做為前端的開發，建議直接使用Java API操作人工作業，Java API底層會透過Local/Remote EJB或SOAP的方式連接BPM Server，也就是你的應用程式並不需要與BPM Server綁定在同一個container之上；2) 如果你使用的不是Java語言，唯一的一條路就是直接透過Web Service以SOAP的方式連接BPM Server，也因為是SOAP，你可以應用各種不同的語言開發前端，不需綁定Java語言。&lt;br /&gt;
&lt;br /&gt;
本篇我們將先介紹使用Java語言開發的方式。&lt;br /&gt;
&lt;br /&gt;
開始之前我們先看一下這樣的流程到底有那些與前端應用程式的互動點：&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;InitRole 起始流程。&lt;/li&gt;
&lt;li&gt;InitRole&amp;nbsp;查詢起案人工單，填入詳細資料，完成關卡。&lt;/li&gt;
&lt;li&gt;ConfirmRole 查詢流到自身的人工單，取出詳細資料，更改審核結果，完成關卡。&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
檢視上述的整合點，我們將會用到Oracle BPM API中的&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;createProcessInstance()&lt;/span&gt;、&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;queryTasks()&lt;/span&gt;、&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;getTaskDetailsByID()&lt;/span&gt;以及&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;updateTaskOutcome()&lt;/span&gt;...等功能。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1) 準備開發環境與library：&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
首先，你會需要如下的JAR file在你的project之中&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/wlserver_10.3/server/lib/wlfullclient.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/oracle_common/webservices/wsclient_extended.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/oracle_common/modules/oracle.xdk_11.1.0/xml.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/oracle_common/modules/oracle.xdk_11.1.0/xmlparserv2.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/Oracle_SOA/soa/modules/oracle.soa.fabric_11.1.1/bpm-infra.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/Oracle_SOA/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/Oracle_SOA/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;MW_HOME&amp;gt;/Oracle_SOA/soa/modules/oracle.bpm.client_11.1.1/oracle.bpm.bpm-services.client.jar&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;其中，熟悉WebLogic的人應該已經知道，wlfullclient.jar需要自己產生，你可以使用下列指令產生：&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt; cd &amp;lt;MW_HOME&amp;gt;/wlserver_10.3/server/lib&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt; java -jar ../../../modules/com.bea.core.jarbuilder_1.3.0.0.jar&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
你可以選用任何熟悉的IDE做為開發環境。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2) 初始化BPM Server連接：&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 指定連線參數與產生context物件&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Map&amp;lt;IWorkflowServiceClientConstants.CONNECTION_PROPERTY, String&amp;gt; properties = new HashMap&amp;lt;IWorkflowServiceClientConstants.CONNECTION_PROPERTY, String&amp;gt;();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.CLIENT_TYPE, WorkflowServiceClientFactory.REMOTE_CLIENT);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_INITIAL_CONTEXT_FACTORY, &quot;weblogic.jndi.WLInitialContextFactory&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL, &quot;t3://&amp;lt;your_hostname&amp;gt;:&amp;lt;your_port&amp;gt;&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_CREDENTIALS, &quot;&amp;lt;admin_password&amp;gt;&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_PRINCIPAL, &quot;&amp;lt;admin_user&amp;gt;&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 產生需要的IBPMServiceClient與IWorkflowServiceClient物件&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;BPMServiceClientFactory bpmServiceClientFactory = BPMServiceClientFactory.getInstance(properties, null, null);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;IBPMServiceClient bpmSc = bpmServiceClientFactory.getBPMServiceClient();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;IWorkflowServiceClient wfSc = bpmServiceClientFactory.getWorkflowServiceClient();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;接下來你會需要取得遠端連線時，對於BPM Server的使用者認證、人工單查詢、人工單內容變更所需的Service物件：&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;IBPMUserAuthenticationService&amp;nbsp;authSvc = bpmServiceClientFactory.getBPMUserAuthenticationService();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ITaskQueryService&amp;nbsp;querySvc = wfSc.getTaskQueryService();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ITaskService&amp;nbsp;taskSvc = wfSc.getTaskService();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;3) 認證使用者&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
認證遠端連線使用者的資訊，並由此取得IBPMContex物件：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;IBPMContext bpmCtx =&amp;nbsp;authSvc.authenticate(&quot;tim&quot;, &quot;welcome1&quot;.toCharArray(), null);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4) 起始流程&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
在起始流程之前，你必須確認該流程已經被成功部署於BPM Server之上，並且透過EM取得該部署流程的Composite相關資訊，如下圖所示，你可以取得該Composite ID為：&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;blogdemo/CustomHumanTask!1.0*soa_87c431bf-7757-46de-8c52-55f4f2aabc11&lt;/span&gt;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimeBVZRCt7rQ5odcKuUMr_2FpBCndFWhdB_fCUNjugyZvTAus55EaVJRBgzbxRhaWqGd_no_FmMtxzVi-76y7ViTZDGPGhfbJs00mqR8pFdBCwmSwIW8_evbiQYoBjZct9gzkyxhBYAmc/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;176&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimeBVZRCt7rQ5odcKuUMr_2FpBCndFWhdB_fCUNjugyZvTAus55EaVJRBgzbxRhaWqGd_no_FmMtxzVi-76y7ViTZDGPGhfbJs00mqR8pFdBCwmSwIW8_evbiQYoBjZct9gzkyxhBYAmc/s640/step2.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
而假設你的流程名稱是CustomHumanTaskProcess，則你產生新instance時所需要送入的ID就是：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;blogdemo/CustomHumanTask!1.0*soa_87c431bf-7757-46de-8c52-55f4f2aabc11/CustomHumanTaskProcess&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;你可以透過下列API起始一個新的流程instance：&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;String instanceID = bpmSc.getInstanceManagementService().createProcessInstance(bpmCtx, &quot;blogdemo/CustomHumanTask!1.0*soa_87c431bf-7757-46de-8c52-55f4f2aabc11/CustomHumanTaskProcess&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;此API會回傳Composite instance的執行處理ID，你可以嘗試看看呼叫此API後，你可以在EM Console之中查詢到該流程的Composite instance ID已經正常出現。&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;5)&amp;nbsp;查詢起案人工單，填入詳細資料，完成關卡&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
現在流程應該是被啟動，並且執行至第一個關卡，等待 InitRole 角色的人將此取得該工作，填入相關資訊，並將工作單送出，讓流程繼續往下走。&lt;br /&gt;
&lt;br /&gt;
首先，可以使用之前產生的querySvc查詢到使用者有權限的人工單基本資料：&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 指定查詢回傳資料&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;List queryColumns = new ArrayList();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;queryColumns.add(&quot;TASKID&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;queryColumns.add(&quot;TASKNUMBER&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;queryColumns.add(&quot;TITLE&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;queryColumns.add(&quot;PRIORITY&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 指定回傳所有可用的ACTION&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;List&amp;lt;ITaskQueryService.OptionalInfo&amp;gt; optionalInfo = new ArrayList&amp;lt;ITaskQueryService.OptionalInfo&amp;gt;();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;optionalInfo.add(ITaskQueryService.OptionalInfo.ALL_ACTIONS);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 指定查詢條件 -- 此處只抓出已經ASSIGNED給特定角色的&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;工作&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Predicate pred = new Predicate(TableConstants.WFTASK_STATE_COLUMN, Predicate.OP_EQ, &quot;ASSIGNED&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 執行查詢&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;result = querySvc.queryTasks(bpmCtx,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queryColumns,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; optionalInfo,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ITaskQueryService.AssignmentFilter.MY_AND_GROUP, &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// 抓出指定給該使用&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //者本人或其所屬群組&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; null, &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// 不使用keywords&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pred,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; null, &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// 沒有指定查詢排序&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0, &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// 不paging查詢結果&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
接下來，我們把所要的Task物件詳細資訊取出，特別注意，Task物件的詳細內容一定要透過下列的API取得，之前queryTask所取出的資料並為包含Task payload等資訊：&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// taskID可以透過前面query出的Task物件，呼叫&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// task.getSystemAttributes().getTaskId()去取出taskId字串&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Task task = querySvc.getTaskDetailsById(bpmCtx, taskId);&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;將我們所需要帶入的hello字串資訊帶入。記得嗎? 在Oracle BPM內部所處理的所有資料都會是XML格式，也因此，在產生hello物件，我們也會需要用標準W3C DOM的API來做 (底層是Oracle XML Parser V2)。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 產生XML Element&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Document document = XMLUtil.createDocument();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Element payload = document.createElementNS(&quot;http://xmlns.oracle.com/bpel/workflow/task&quot;, &quot;payload&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Element hello = document.createElementNS(&quot;http://blogdemo/customhumantask&quot;, &quot;hello&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Element helloString = document.createElementNS(&quot;http://blogdemo/customhumantask&quot;, &quot;helloString&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;helloString.appendChild(document.createTextNode(&quot;HELLO TIM!!&quot;));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;hello.appendChild(helloString);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;payload.appendChild(hello);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;document.appendChild(payload);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// 將XML資料指定給task做為其payload&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;task.setPayloadAsElement(payload);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;接下來，把給這個已經編輯完成的Task送出吧，並起告知流程往下走：&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// &quot;SUBMIT&quot;字串是該HumanTask設計之時所指定可Outcome&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;taskSvc.updateTaskOutcome(bpmCtx, task, &quot;SUBMIT&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;6) &amp;nbsp;於每一個人工作業關卡，重複上述所的步驟&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
一樣的，這時候主管會透過authenticate()認證，連入BPM Server，透過&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;queryTasks()&lt;/span&gt;查詢手頭的人工作業案件，透過&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;getTaskDetailsByID()&lt;/span&gt;取出詳細payload資訊，接下來根據人工作業所設定的Outcome，呼叫&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;updateTaskOutcome()&lt;/span&gt;將其review的結果指定為APPROVE或是REJECT。&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Enjoy your BPM trip!!!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/5718173685105520757/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/5718173685105520757' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/5718173685105520757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/5718173685105520757'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/02/oracle-bpmsoa-bpm.html' title='[Oracle BPM/SOA 實務] 客製化BPM前端應用程式'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7RUXuH6Jp9WF49yctOGWxWZnZuZsBdPzjtCfXBLJLhqZ13eZpOZVO5RZra7uHNrVpRcOIZX_rAiEG4UxPry3cOOmcHFIlYDqM3i1doCcZ0O4fnzcD0Qi5Q4tliRJ_HRrOtM3E-6j0Pes/s72-c/arch.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-673293747611391983</id><published>2011-02-17T09:47:00.000+08:00</published><updated>2011-02-17T09:47:37.359+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPMN"/><title type='text'>[BPMN 2.0] Process平行執行的應用</title><content type='html'>BPMN 本身支援Parallel Gateway讓開發人員能夠平行處理多個Activity，你可以拉出如下圖所示的Process同步處理MyTask1與MyTask2：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKIhWtqnNoOIBWWG9k4B23SzgyjK6D0J2efLdw6fmDgRKulNispUhTWQpc2kDBwuhOkQP2s9uMVL_Wh1GzFWEG_BsRsVC2cu5PgnejwNfvvJsGf612WbImporpC0aJH-LF7flyy7Ki3qU/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;168&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKIhWtqnNoOIBWWG9k4B23SzgyjK6D0J2efLdw6fmDgRKulNispUhTWQpc2kDBwuhOkQP2s9uMVL_Wh1GzFWEG_BsRsVC2cu5PgnejwNfvvJsGf612WbImporpC0aJH-LF7flyy7Ki3qU/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
這樣的表示方式很簡單，但是我們有時候會遇到另外一個需求，要怎麼在run-time動態產生多條平行執行的流程？照上圖的作法，必須在design time就設計好執行路徑的數量。&lt;br /&gt;
&lt;br /&gt;
和Loop的情形一樣，我們還是可以使用subprocess的方式來處理。&lt;br /&gt;
&lt;br /&gt;
使用subprocess activity，我們可以簡單拉出下示流程：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBWtdD4qJFLHakn0-BVKS7XA-cfq_mrg1iwE0nWRhI3axtMm3patem3UYVCWzlgZugjV5hTG06jwVJj7RaIDy8ZzTczTAM_YeVnMdOZ34y-samW0cID55mHJRt_44Dzs9WuT_uNq5EwuM/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;108&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBWtdD4qJFLHakn0-BVKS7XA-cfq_mrg1iwE0nWRhI3axtMm3patem3UYVCWzlgZugjV5hTG06jwVJj7RaIDy8ZzTczTAM_YeVnMdOZ34y-samW0cID55mHJRt_44Dzs9WuT_uNq5EwuM/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Double-click subprocess activity，編輯對話框中的Loop Characteristics Tab&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU5A2RAAohj1vCU43tLFMVBDZJv8POCXzk3M58fnL4jQrE8yZelFvFWRqc2Ovd_BccUCG0V4KkTF6sY6QOaUdoHVQRSkvQL3-3fvidIYcz5P8LS89V-EYhtDxMAvbiJAjJjNZ2rSD0dSU/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU5A2RAAohj1vCU43tLFMVBDZJv8POCXzk3M58fnL4jQrE8yZelFvFWRqc2Ovd_BccUCG0V4KkTF6sY6QOaUdoHVQRSkvQL3-3fvidIYcz5P8LS89V-EYhtDxMAvbiJAjJjNZ2rSD0dSU/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;平行執行的時候，記得在Loop Characteristics中選擇 &quot;MultiInstance&quot;，並且不要勾選最下方的 &quot;Is Sequential&quot; 選項。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;此時的 Loop Cardinality 代表你需要動態幾個平行的instance處理，我在此放入了一個變數parallelCount，你可以自行設計如何取得此數值。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/673293747611391983/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/673293747611391983' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/673293747611391983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/673293747611391983'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/02/bpmn-20-process.html' title='[BPMN 2.0] Process平行執行的應用'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKIhWtqnNoOIBWWG9k4B23SzgyjK6D0J2efLdw6fmDgRKulNispUhTWQpc2kDBwuhOkQP2s9uMVL_Wh1GzFWEG_BsRsVC2cu5PgnejwNfvvJsGf612WbImporpC0aJH-LF7flyy7Ki3qU/s72-c/step1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-1153294816746455024</id><published>2011-02-11T17:55:00.002+08:00</published><updated>2011-02-17T09:49:23.976+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>[Oracle BPM/SOA 實務] Muli-Tier 審核流程的設計</title><content type='html'>來看看在人工簽核作業中常常遇到的情境吧，我們該怎麼設計一個需要兩階層簽核的流程：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiNWE7HRW0IqDtM1UXxYbvQQMQMY4qK6mrg_EL35_qH4wTK8I4OcRdOetMgCy5-8daK2oZ_1k9aDP7rIrKRIV44F7R0pZUcSVWbd6kSAVVLHNK7YH4m_mpgpbICNToyoNvo5UF5feAqv0/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;183&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiNWE7HRW0IqDtM1UXxYbvQQMQMY4qK6mrg_EL35_qH4wTK8I4OcRdOetMgCy5-8daK2oZ_1k9aDP7rIrKRIV44F7R0pZUcSVWbd6kSAVVLHNK7YH4m_mpgpbICNToyoNvo5UF5feAqv0/s200/step1.PNG&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
假設有上圖所示的組織架構，Tim與Leon的直屬長官是Kenneth；而Kenneth的直屬長官是Gary，由Tim所完成的工作在流程中需要由上面兩層的長官審核才能繼續往下走。首先，你的BPM使用者要有這樣的組織架構在內，你可以參考這篇&lt;a href=&quot;http://timwu1975.blogspot.com/2011/01/oracle-fusion-middleware-bpm-server.html&quot;&gt;【如何增加使用者至BPM Server中】&lt;/a&gt;先把你所需要的使用者建立起來。&lt;br /&gt;
&lt;br /&gt;
但是，明眼的你應該會發現，在這裡LDAP tree中的使用者是看不出階層關係的，我們該怎麼指定上圖那樣的關係哩?&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
其實在LDAP tree中每一個使用者都會存在一個attribute叫做&quot;manager&quot;，你可以在此attribute中填入該使用者主管的DN，例如：Tim的manager attribute中，你應該要填入：uid=kenneth,ou=people,ou=myrealm,dc=bpm_domain (請注意：你的dc會根據domain name不同而改變，基本上你如果是用JXplorer的話，你可以右鍵該使用者主管並選取 &quot;複製DN&quot;，再把它貼到manager attribute之中即可)。藉由上述步驟，你可以在BPM Server的使用者中建立起你的組織架構關係。&lt;br /&gt;
&lt;br /&gt;
請使用JDeveloper開一個新的BPM Project -- &quot;MultiTierApproval&quot;，並指定一個Asynchronous BPMN Process叫做 &quot;MultiTierApproval&quot;。&lt;br /&gt;
&lt;br /&gt;
首先，最簡單的方式是使用一種叫做Management的Interactive Activity，你可以在右邊的Component Palette中找到他，就常用的User Activity上方。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMw021qmSa44MoNT1KVSc1iSFv3KWRn9fUn4kUQb1Qf5NHnXaqW2cFQ-Ezl93usWzt4n80tz9KoLJlwWaILiZM6rCwXCZW_CWQEpb5-RYoD10WoxvTGqEThIFPz9SvMRufNDKDfvy94iA/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;125&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMw021qmSa44MoNT1KVSc1iSFv3KWRn9fUn4kUQb1Qf5NHnXaqW2cFQ-Ezl93usWzt4n80tz9KoLJlwWaILiZM6rCwXCZW_CWQEpb5-RYoD10WoxvTGqEThIFPz9SvMRufNDKDfvy94iA/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
這種方是你可以用&quot;一個&quot;Activity來實踐多層的審核，特別注意的是，在產生Human Task的時候，請一定要將Pattern選項選為&quot;Management&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil5jnvknqFfk0VtmUuvBlu-OxyMahKhyUhE7g3arVvyUoI9HGP6vTeL2zQ38uzLmkXaOZUOmm_QM-byyNMqV7dOvlyT6lXm5uC-qyzM_qTWVUP9OkD3fv6Ujw44bkxuFFog4D23IZh5YY/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil5jnvknqFfk0VtmUuvBlu-OxyMahKhyUhE7g3arVvyUoI9HGP6vTeL2zQ38uzLmkXaOZUOmm_QM-byyNMqV7dOvlyT6lXm5uC-qyzM_qTWVUP9OkD3fv6Ujw44bkxuFFog4D23IZh5YY/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
打開你的MultiTierTask.task檔案，現在你的assignment頁應該是長成這樣：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixkvBreUon4ZXikf5ux_xJkZfZZgnB549RImoijMHjG4sne8NUxj0n04kLzKhwy0H63D1uE3VXLGFwqxi4m1bR1gQKHrVokVIdin5o8XZeXIdrrbRDTBCsmVZ3DLDM9cJR_qWQlBmcn-4/s1600/step4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixkvBreUon4ZXikf5ux_xJkZfZZgnB549RImoijMHjG4sne8NUxj0n04kLzKhwy0H63D1uE3VXLGFwqxi4m1bR1gQKHrVokVIdin5o8XZeXIdrrbRDTBCsmVZ3DLDM9cJR_qWQlBmcn-4/s400/step4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
請double-click圖中的default.DefaultPerformer，打開對話框：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiSDWP64oj0pqtSPCvMkmYKV0aIQSan-yyBwsB_nJavYQYEO0lmRy-4oyKFt2vYC2l1zZnGDRtShOpqNF79H5yUH03VxQs0m13U_v9DM_su_QKEQLEFcFZX6wmA-28kcYAoVv4BFtNOBg/s1600/step5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiSDWP64oj0pqtSPCvMkmYKV0aIQSan-yyBwsB_nJavYQYEO0lmRy-4oyKFt2vYC2l1zZnGDRtShOpqNF79H5yUH03VxQs0m13U_v9DM_su_QKEQLEFcFZX6wmA-28kcYAoVv4BFtNOBg/s400/step5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
這裡有許多重要的資訊：&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Starting Participant：這是代表這個human task的第一個執行者，預設你可以看到Identification Type為Application Role且Value為bpm:getPerformer()的一行，這代表了第一個使用者將是根據你swim lane所指定的角色人員。&lt;/li&gt;
&lt;li&gt;Top Participant：指定最高層級人員，你可以指定這個向上escalation的步驟最高到哪一位使用者就會停止，例如，我們可以手動指定最高層級到gary就停止。&lt;/li&gt;
&lt;li&gt;Number of Levels：指定向上escalation層級數，代表往上走幾層之後會停止。&lt;/li&gt;
&lt;/ul&gt;注意：Top Participant與Number of Levels是 &quot;OR&quot; 的關係，其中一個條件達成就會停止往上走。&lt;br /&gt;
&lt;br /&gt;
將流程部署測試看看吧，你會需要透過BPM WorkSpace先後由tim、kenneth與gary來登入並且核可人工作業。接下來在Enterprise Manager的Audit Trail中，點選MultiTierTask，你會看到下列得資訊，仔細看看內容，你會發現這單一Task中經過了三個作業：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLhAKrS7epdEpJ9_1utSFbPAbbpq4RzNEaw8vhpEUh_dkWdg8c2EXWe8HrUrSjH1AC5mj3wqW-QklKTU0pNjXWN_M6Id1POQGclUuvvJLuXm4MEybj6_zjgu0NkwL2uJ4IqRx52QC15x0/s1600/step6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLhAKrS7epdEpJ9_1utSFbPAbbpq4RzNEaw8vhpEUh_dkWdg8c2EXWe8HrUrSjH1AC5mj3wqW-QklKTU0pNjXWN_M6Id1POQGclUuvvJLuXm4MEybj6_zjgu0NkwL2uJ4IqRx52QC15x0/s400/step6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
到這裡一定會有人問到，要是我要的是這樣的流程：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_VpPbaEzI7NhNUmQA7hcVsRsG6uF73jN8qKunlKUtbr-vKD2-PD9d6TaAHio561VluBE_tYzI-4gYiUgwBdrfhho6YEOC1DPTrf4ASgCbivPqvcxCgBDA9_f6u2yxkmL5Mei8KzIOI08/s1600/step7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;137&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_VpPbaEzI7NhNUmQA7hcVsRsG6uF73jN8qKunlKUtbr-vKD2-PD9d6TaAHio561VluBE_tYzI-4gYiUgwBdrfhho6YEOC1DPTrf4ASgCbivPqvcxCgBDA9_f6u2yxkmL5Mei8KzIOI08/s640/step7.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;在第一個人工作業完成後，需要執行一個自動作業才能交給主管去覆核，這種流程我們便不能夠使用Management Human Task在單一一個Task中完成所有作業。&lt;br /&gt;
&lt;br /&gt;
來介紹第二種作法：&lt;br /&gt;
&lt;br /&gt;
這種作法中，我們將需要在流程中動些手腳，第一，在流程中需要新增一個String變數，用來紀錄第一個人工作業UserTask到底是誰完成的；第二，在MgrTask中，需要指定一個payload，並將流程變數中所記錄第一個作業完成的人帶入，並且assignment中找到該使用者的直屬長官。&lt;br /&gt;
&lt;br /&gt;
指定一個type為String的Process Data Object，叫做 &quot;taskUser&quot;。&lt;br /&gt;
&lt;br /&gt;
在 &quot;UserTask&quot; --&amp;gt; &quot;Implementation&quot; --&amp;gt; &quot;Data Association&quot; 中，將 &quot;execData&quot; --&amp;gt; &quot;systemAttributes&quot; --&amp;gt; &quot;updatedBy&quot; --&amp;gt; &quot;id&quot;&amp;nbsp;指定為&quot;taskUser&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi96JpLYhOOrukQ9mgGuHS-1jRlux5UvqY_rc6mnujhR8M7MwN83fiRxMGslAwS59hLLvibEVcoxdMBrrh8vlgIkH1hxOviGgedksZW52DzKK8fQYCjNPj4e1Tr7w2_ad0OiImrCRonmdg/s1600/step8.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;221&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi96JpLYhOOrukQ9mgGuHS-1jRlux5UvqY_rc6mnujhR8M7MwN83fiRxMGslAwS59hLLvibEVcoxdMBrrh8vlgIkH1hxOviGgedksZW52DzKK8fQYCjNPj4e1Tr7w2_ad0OiImrCRonmdg/s400/step8.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
指定此Data Association將會把完成該&quot;UserTask&quot;的使用者ID寫入&quot;taskUser&quot;變數。&lt;br /&gt;
&lt;br /&gt;
在產生 &quot;MgrTask&quot; 時，記得給一個String payload，我這邊也叫他taskUser吧：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi28O7CruhhoJaA94kzGJGclAJSm_bXuy-00AxZ7l8L65AoR0QE-9VEsojF0c2sr6-ApRsBzOvKkkJ1KiNKmXlmkl6hNMjgbrhyGTaM_rKO5Qwx1uz_b4tfsbx4v0tMY1Ze1aDIefbGEW8/s1600/step8-2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;161&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi28O7CruhhoJaA94kzGJGclAJSm_bXuy-00AxZ7l8L65AoR0QE-9VEsojF0c2sr6-ApRsBzOvKkkJ1KiNKmXlmkl6hNMjgbrhyGTaM_rKO5Qwx1uz_b4tfsbx4v0tMY1Ze1aDIefbGEW8/s400/step8-2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
記得也把在 &quot;MgrTask&quot; --&amp;gt; &quot;Implementation&quot; --&amp;gt; &quot;Data Association&quot; 中，將 &quot;taskUser&quot; 指定為&quot;taskUser&quot;，如此會把第一關的執行人員ID存放在task payload中，以便於等一下我們要找到他的主管。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJU_IFtejP0HfPMSuuhSEDrZpgFO7TjvKUengbpWbNv6CeEJHwx3D5Sn7dmRjHf61H8HscWNKGxpAWtDjp9w-ROSOIPGLx1OJZCY0uHEUz_MFoKpFDjc6en9th9wfiEnaM_0GCMwl71ag/s1600/step8-1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;221&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJU_IFtejP0HfPMSuuhSEDrZpgFO7TjvKUengbpWbNv6CeEJHwx3D5Sn7dmRjHf61H8HscWNKGxpAWtDjp9w-ROSOIPGLx1OJZCY0uHEUz_MFoKpFDjc6en9th9wfiEnaM_0GCMwl71ag/s400/step8-1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
打開 &quot;MgrTask.task&quot;檔案，並double-click assignment中的default.DefaultPerformer，打開對話框，這次會比較tricky一點，我們將指定&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Identification Type：User&lt;/li&gt;
&lt;li&gt;Data Type：By Expression&lt;/li&gt;
&lt;li&gt;Value：ids:getManager(/task:task/task:payload/task:taskUser)&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2Udr9rt7u6siZZtN472qGfAv2pq_7JCD2DAyQ7FcGkeJS9w7iJUSymllcyOaBJdprqhJQbqPLAu_r7SFuno0eMOCfboQ3DjYFhAjVmFTRQQ5lepimmlCGmDEsBgiJBT8mhsTOFCbaIzE/s1600/step8-3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2Udr9rt7u6siZZtN472qGfAv2pq_7JCD2DAyQ7FcGkeJS9w7iJUSymllcyOaBJdprqhJQbqPLAu_r7SFuno0eMOCfboQ3DjYFhAjVmFTRQQ5lepimmlCGmDEsBgiJBT8mhsTOFCbaIzE/s400/step8-3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
特別要注意的是Value，這是一個標準的XPath表示式，你不需要手動編輯此資料，你可以按下旁邊的按鍵打開Expression Builder用對話框來選取資料。嘗試看看，我們是要找到Schema中 &quot;task&quot; --&amp;gt; &quot;payload&quot; --&amp;gt; &quot;taskUser&quot; 的資料，並且透過 &quot;Identity Service Function&quot; --&amp;gt; &quot;getManager()&quot; 此function取找到其主管資料。&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;完成之後部署測試看看吧!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/1153294816746455024/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/1153294816746455024' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/1153294816746455024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/1153294816746455024'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/02/oracle-bpmsoa-muli-tier.html' title='[Oracle BPM/SOA 實務] Muli-Tier 審核流程的設計'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiNWE7HRW0IqDtM1UXxYbvQQMQMY4qK6mrg_EL35_qH4wTK8I4OcRdOetMgCy5-8daK2oZ_1k9aDP7rIrKRIV44F7R0pZUcSVWbd6kSAVVLHNK7YH4m_mpgpbICNToyoNvo5UF5feAqv0/s72-c/step1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-6464758830309175180</id><published>2011-02-07T14:57:00.000+08:00</published><updated>2011-02-07T14:57:36.950+08:00</updated><title type='text'>隨筆</title><content type='html'>寫了幾篇技術文章才知道寫這些東西多花時間... &amp;nbsp;(汗..)&lt;br /&gt;
&lt;br /&gt;
有幾個想法和大家分享：&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;這是個不負責任的部落格：我所發表的所有技術文章只代表我個人的經驗與產品使用方式，一切的一切都請以原廠技術文件為主 &lt;s&gt;(即使可能會有錯...)&lt;/s&gt;。&lt;/li&gt;
&lt;li&gt;這是個文筆不好的部落格：自論文以後，我應該沒有寫過那麼多字的文章了吧...&amp;nbsp;請見諒所有的文字不通暢與用語粗俗。&lt;/li&gt;
&lt;li&gt;這是個沒啥組織的部落格：各文章與相關產品的發表順序並不一定，基本上都是小弟想到甚麼就寫甚麼，也有可能是剛好測試或專案用到的功能記錄，若是從頭開始學習的人，建議你可以先參考小弟的&quot;第一個&quot;系列，並配合其他的文件或書籍服用。&lt;/li&gt;
&lt;li&gt;這是個期待溝通的部落格：有任何的疑問與幹譙或是希望能看到的文章，請歡迎留言或透過我的email：yenting.wu@gmail.com反應。&lt;/li&gt;
&lt;/ul&gt;感恩!</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/6464758830309175180/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/6464758830309175180' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/6464758830309175180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/6464758830309175180'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/02/blog-post.html' title='隨筆'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-6182894816334364259</id><published>2011-02-07T14:06:00.001+08:00</published><updated>2011-02-12T09:31:12.079+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>[Oracle SOA 應用] 呼叫外部Java類別</title><content type='html'>開春第一砲，來看看我們在流程中怎麼呼叫一個已經寫好的Java Class。&lt;br /&gt;
&lt;br /&gt;
我就不step-by-step的描述每一個步驟，請你自己新增一個新的SOA專案，並且產生一個Empty Composite。&lt;br /&gt;
&lt;br /&gt;
由於呼叫Java元件屬於系統流程整合的部分，因此，我們使用BPEL流程做為整合的範例。請在Component Palette中托放一個BPEL Process進入Composite中央。再彈出的對話視窗中指定此流程的採用BPEL 1.1或2.0、名稱、同步與非同步、Service名以及是否對外提供SOAP服務：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivf68eSFMdgtg2ijmOmYrHcKR9ea2MBed2XwPdjFfmouE_0AT2iXQQFc2hf-bDZQzmvUZ7gcR5dUTJ-GmcsG4HmTS0OYvuIKHQxPHQP255v3VpyETbnBSzi3X8RBV1ATA3gfLUZ-JM53w/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;272&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivf68eSFMdgtg2ijmOmYrHcKR9ea2MBed2XwPdjFfmouE_0AT2iXQQFc2hf-bDZQzmvUZ7gcR5dUTJ-GmcsG4HmTS0OYvuIKHQxPHQP255v3VpyETbnBSzi3X8RBV1ATA3gfLUZ-JM53w/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;當回到你的composite editor，你可以看到現在你有個BPEL的Process，並且有個對外的service介面：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPbDmkLI-Xd0hhckaAz5afyjqZtnuoLxwcTeFCTtrT91-_YOPyXNDYF7ZwnI78Mxrc1NLIqobab2Bq0mvIT6DD7yzzCn0Pyo4vE3zjzjqW4mjNs3uWc3cwePHiVuKs4SC6BPFZp378rAQ/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPbDmkLI-Xd0hhckaAz5afyjqZtnuoLxwcTeFCTtrT91-_YOPyXNDYF7ZwnI78Mxrc1NLIqobab2Bq0mvIT6DD7yzzCn0Pyo4vE3zjzjqW4mjNs3uWc3cwePHiVuKs4SC6BPFZp378rAQ/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Oracle BPM/SOA Suite在呼叫外部Java Class時候所使用的方式是Spring Framework的整合，這代表了兩件事：1) 如果你有現有的專案使用Spring作為開發架構，你將可以很容易的將你所開發完成的元件整合入BPM/SOA專案之中； 2) 如果你只是需要整合現有或新開發的Java Class，你將需要為此Java Class給定他的Spring Context。接下來的範例我會使用一個全新開發的Java Class並介紹你如何在composite中應用到它。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;首先，看看我們將使用到的Java Class，很簡單的Java Class，我們只是要呼叫它的&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;hello &lt;/span&gt;method：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;package blogdemo;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public class SayHello {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;public SayHello() {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;super();&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;public String hello(String input) {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return (&quot;Hello &quot; + input);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;請在JDeveloper裡面產生這個Java Class。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;接下來，回到Composite Editor之中，在右手邊的Component Palette中，把一個叫做&quot;Spring Context&quot;的Service Component托放至中央的Component處，你會看到一個彈出的對話窗，用以指定要新產生Spring Context或是延用你現存的Context檔案，在此我們會產生一個新的檔案。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjCCQGrr3G6WEp8M8O6FQbK91E7yCVqdpV-YRRBaoKNeN2uZeeMCCUIMxXxLpljq6d97JKI3f48FkoNKHDSb5yGh5lw-4Af9gGWCypypkxCQ9gTLf46L9eo1CcTgRWrJWGdbW2faMdFOI/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;293&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjCCQGrr3G6WEp8M8O6FQbK91E7yCVqdpV-YRRBaoKNeN2uZeeMCCUIMxXxLpljq6d97JKI3f48FkoNKHDSb5yGh5lw-4Af9gGWCypypkxCQ9gTLf46L9eo1CcTgRWrJWGdbW2faMdFOI/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;你的composite現在應該長成這樣了：&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEnXihDGd3Zg1mlphRQOioV60gN0zHd9hWBsice58GI-lWTKpObgx401B6AsGc6Tby7_ai0fjqDqgJc_Lv2pA1_FXFo8TB7vJ05DJmFvfbpLMLQ6WlT3qT1yo8NoV3Xi64Kuel_SVS4fk/s1600/step4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;182&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEnXihDGd3Zg1mlphRQOioV60gN0zHd9hWBsice58GI-lWTKpObgx401B6AsGc6Tby7_ai0fjqDqgJc_Lv2pA1_FXFo8TB7vJ05DJmFvfbpLMLQ6WlT3qT1yo8NoV3Xi64Kuel_SVS4fk/s400/step4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;當你double-click &quot;SayHelloSpring&quot;這個Spring Context之後，你會直接進入source code，內容就和一般Spring Framework的beans.xml一樣，在此，你可以手動自行編輯此檔案，也可以利用右手邊的Component Palette拉入你所需要的元件。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;我使用了兩種元件：1) 在 &quot;Spring 2.5 Core&quot; 下拉選單中，我托放了一個bean元件進來，並且指定了它的class為我們剛才產生的&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;blogdemo.SayHello&lt;/span&gt;、id與name為&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sayHello&lt;/span&gt;； 2) 在 &quot;WebLogic SCA&quot; 下拉選單中，托放一個Service元件進來，指定他的name為&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sayHelloService&lt;/span&gt;、target為&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sayHelloBean&lt;/span&gt;、type為&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;blogdemo.SayHello&lt;/span&gt;，完成後的context檔會長成這個樣子：&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;!--Spring Bean definitions go here--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;lt;bean class=&quot;blogdemo.SayHello&quot; name=&quot;sayHelloBean&quot; id&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;=&quot;sayHelloBean&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;lt;sca:service name=&quot;sayHelloService&quot; target=&quot;sayHelloBean&quot; type=&quot;blogdemo.SayHello&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;/beans&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;接下來，回到你的Composite Editor，來作連連看的動作將你的Composite拉成下圖：&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhroogsyN7RmMKu-UfmJJ3DcgQUhvTZotEof_fktuhUat_fOuPCvZTxuPsob3vOirAXMQGehrXkCXqqoOS0NYAuzdrESTZvXu7OB9sJDviayOQbMxiOtMPdV3kVWt7slxJSpjoqkSJeefU/s1600/step5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;143&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhroogsyN7RmMKu-UfmJJ3DcgQUhvTZotEof_fktuhUat_fOuPCvZTxuPsob3vOirAXMQGehrXkCXqqoOS0NYAuzdrESTZvXu7OB9sJDviayOQbMxiOtMPdV3kVWt7slxJSpjoqkSJeefU/s400/step5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div&gt;Double-click你的BPEL process吧!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;(這裡我假設各位已經有BPEL基礎，會另外撰文介紹BPEL元件的開發方式)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;基本上，在BPEL內部呼叫Java/Spring元件的方式就和之前你所熟悉的呼叫外部web service一模一樣，你將透過Invoke activity呼叫一個Java/Spring元件的Partner Link，此Partner Link在我們在剛才的連連看中已經自動被產生了，因此，你只需要製作一個Invoke Activity連向此Partner Link，同時產生兩個Assign Activity用以指定input與output變數。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAbNrI6qQUnz9J5_Q2m8txY31EtYAGMkJ-Rb3zCLOL4At6JC20lZah-X2PiTL0e0esd7YNWZozHaFpam5CKjY0A6rxwuklBi53nt4OEJHHaNj4TJM2tI1xxDc9baI2Vn53yFpGAFu-j78/s1600/step6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;258&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAbNrI6qQUnz9J5_Q2m8txY31EtYAGMkJ-Rb3zCLOL4At6JC20lZah-X2PiTL0e0esd7YNWZozHaFpam5CKjY0A6rxwuklBi53nt4OEJHHaNj4TJM2tI1xxDc9baI2Vn53yFpGAFu-j78/s400/step6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;部署你的composite，並且使用Enterprise Manager測試看看吧!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit33ac0_PSlLfHtytqbbSL4ICHK_83VVxkxfEX5gS23rqiIqoz4oEVuWBhYevsEPREQnJx2wNJmUdycWpmSQ9uPFnOaQint-lCVx6nHIWOOm4dgi-JEle-ShY6Hp48rAtlqPIbvD91RnM/s1600/step7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit33ac0_PSlLfHtytqbbSL4ICHK_83VVxkxfEX5gS23rqiIqoz4oEVuWBhYevsEPREQnJx2wNJmUdycWpmSQ9uPFnOaQint-lCVx6nHIWOOm4dgi-JEle-ShY6Hp48rAtlqPIbvD91RnM/s400/step7.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;ps. 相信很多人會遇到一種情形，你要使用到的是JAR library中的某個Java Class，而你沒有它的source code可以放進JDeveloper，這種情形你將需要兩個動作：1) 指定此JAR檔於Project Property --&amp;gt; Libraries and Classpath中； 2) 在部署此composite之前，將此JAR檔複製一份到 &amp;lt;project_dir&amp;gt;\SCA-INF\lib目錄之中。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Enjoy your SOA ride!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/6182894816334364259/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/6182894816334364259' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/6182894816334364259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/6182894816334364259'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/02/oracle-soa-java.html' title='[Oracle SOA 應用] 呼叫外部Java類別'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivf68eSFMdgtg2ijmOmYrHcKR9ea2MBed2XwPdjFfmouE_0AT2iXQQFc2hf-bDZQzmvUZ7gcR5dUTJ-GmcsG4HmTS0OYvuIKHQxPHQP255v3VpyETbnBSzi3X8RBV1ATA3gfLUZ-JM53w/s72-c/step1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-2274422385137831745</id><published>2011-01-28T14:23:00.001+08:00</published><updated>2011-01-28T14:25:21.030+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPMN"/><title type='text'>[BPMN 2.0] 迴圈的使用</title><content type='html'>一般來說，由於BPMN Notation是unstructure的表示法，因此不像是BPEL語言，會需要像是While這樣的語法來implement迴圈，通常都是用直接拉回去配合上Exclusive OR的Gateway就可以做到效果：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzQt8-_FgV6OUcnPAMxM5DXgfMwzS0h_nI7g2uuxqPCF2Qu1OgxOCfyZKMYvuIgOo-XIEm5ujJgGwQ1h7Owdx8b9njF2k0qOCodZKikwGlinLyfkX9Et8fMTh9V9U_GI4PLdnrUN1OzyE/s1600/img1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;126&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzQt8-_FgV6OUcnPAMxM5DXgfMwzS0h_nI7g2uuxqPCF2Qu1OgxOCfyZKMYvuIgOo-XIEm5ujJgGwQ1h7Owdx8b9njF2k0qOCodZKikwGlinLyfkX9Et8fMTh9V9U_GI4PLdnrUN1OzyE/s400/img1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;如上圖所示，就是最基本的迴圈。&lt;br /&gt;
&lt;br /&gt;
BPMN也支援Subprocess Loop的方式來執行迴圈，你可以將需要重複多次執行動作的Activity放在一個subprocess之中，就可以不需要自己去implement上面那些變數的初始化或者是Exclusive OR Gateway了。&lt;br /&gt;
&lt;br /&gt;
下面是個範例：&lt;br /&gt;
&lt;br /&gt;
Subprocess展開前&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZzoLz4jM9uBk4Jo5ClUPqSv1Z316X0K76GBtq1-JPQGLoQxrEnY5zjqRGN4SEgw1G1XKOgHNI24VRBn6SZZJJjcmppsXLsSaz3KQ4ZYckhph7uG1V5AwPbFYyu5LUwnOn4TxTfT5vRDc/s1600/img3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;128&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZzoLz4jM9uBk4Jo5ClUPqSv1Z316X0K76GBtq1-JPQGLoQxrEnY5zjqRGN4SEgw1G1XKOgHNI24VRBn6SZZJJjcmppsXLsSaz3KQ4ZYckhph7uG1V5AwPbFYyu5LUwnOn4TxTfT5vRDc/s320/img3.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Subprocess展開後&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO1Vb58BJSKziewlR26DFzM_3xTYUgZ1aH4FxpEFwyQjevrgCCHGnxjYNyaA8ke8AOJ4_XgG8pNXIAb4UZ1Ml8YcbKNbyxD3FjC-3MhSIkEsfFXUXL0qmy0SFW7ywezq3LiS8vC16huuw/s1600/img2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO1Vb58BJSKziewlR26DFzM_3xTYUgZ1aH4FxpEFwyQjevrgCCHGnxjYNyaA8ke8AOJ4_XgG8pNXIAb4UZ1Ml8YcbKNbyxD3FjC-3MhSIkEsfFXUXL0qmy0SFW7ywezq3LiS8vC16huuw/s400/img2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;看起來應該比較簡單了吧?&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;該怎麼設定迴圈的執行次數，內部變數...等資料呢?&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Double-click Subprocess，選擇Loop Characteristics的tab，點選Loop&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi63rnJhAWYSvyWFt7zXN-RbYUBr98ePWiE9CZ3Y6b1Qf2-BWZVPWUTwinBJtXu3rc75ig3Nt-BpWhNl0OwbMSuzCK-AcuJdfC2_j6vRmfu_m0N0YOtuoRnUBDuqJpUAve72VBQsNPF_Qk/s1600/img4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi63rnJhAWYSvyWFt7zXN-RbYUBr98ePWiE9CZ3Y6b1Qf2-BWZVPWUTwinBJtXu3rc75ig3Nt-BpWhNl0OwbMSuzCK-AcuJdfC2_j6vRmfu_m0N0YOtuoRnUBDuqJpUAve72VBQsNPF_Qk/s400/img4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;選擇Loop Condition右手邊的那個小icon打開Express Builder&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbV3U2FmivCzJ9lPDTpktWQ5wYIGYdcO5ASRN1LSeUZLtLZkqNsoYKadtzK5sLe4mzb3we5WNKWAhOSniK-mb1zlk538cmxrgo5Xov3Nrn61kSGoAcSz29KaDQD_M2fqZYXz1O7omoMOA/s1600/img5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;346&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbV3U2FmivCzJ9lPDTpktWQ5wYIGYdcO5ASRN1LSeUZLtLZkqNsoYKadtzK5sLe4mzb3we5WNKWAhOSniK-mb1zlk538cmxrgo5Xov3Nrn61kSGoAcSz29KaDQD_M2fqZYXz1O7omoMOA/s400/img5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;看一下左邊的Variable區，你會發現你的Subprocess &quot;Loop Demo&quot; 中自動有一個loopCounter的變數，簡單的說，這個變數是扮演一般我們 for-loop 中間的 &quot;i&quot; 的角色。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;你就可以和寫for-loop迴圈一樣去指定 loopCounter &amp;lt;= count，來定義迴圈的執行條件了!&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/2274422385137831745/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/2274422385137831745' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/2274422385137831745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/2274422385137831745'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/01/bpmn-20_28.html' title='[BPMN 2.0] 迴圈的使用'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzQt8-_FgV6OUcnPAMxM5DXgfMwzS0h_nI7g2uuxqPCF2Qu1OgxOCfyZKMYvuIgOo-XIEm5ujJgGwQ1h7Owdx8b9njF2k0qOCodZKikwGlinLyfkX9Et8fMTh9V9U_GI4PLdnrUN1OzyE/s72-c/img1.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-8064554366068372872</id><published>2011-01-28T11:17:00.001+08:00</published><updated>2011-02-12T09:32:39.286+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>[Oracle BPM/SOA 基礎] 第一個BPM流程</title><content type='html'>現在，我們來做一個簡單的BPM流程吧!&lt;br /&gt;
&lt;br /&gt;
背景設定為一個很簡單的採購流程，使用者上網提出採購申請，之後經過主管同意後，流程會將此採購資料寫入檔案供採購系統抓取，夠簡單吧? 這個簡單流程可以提供各位在一個BPM平台上面的開發是如何進行。&lt;br /&gt;
&lt;br /&gt;
開始之前，請先確定你的BPM開發環境已經完成安裝與設定，你可以參考小弟先前&lt;a href=&quot;http://timwu1975.blogspot.com/2011/01/oracle-fusion-middleware-bpmsoa-suite.html&quot;&gt;文章&lt;/a&gt;完成此步驟。&lt;br /&gt;
&lt;br /&gt;
啟動你的JDeveloper，&lt;s&gt;不管你喜歡與否，&lt;/s&gt;這個IDE是Oracle BPM產品流程設計現在唯一的工具，試著熟悉他吧!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;新增應用程式專案&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
選擇 &quot;New Application&quot;，會有一彈出的對話框讓你輸入包括Application Name、Directory、package prefix等資訊，特別注意的是JDeveloper是一個general purpose的IDE，所有Oracle產品應用都是透過這IDE開發，所以在BPM專案的開發上面，Application Template記得要選&quot;BPM Applicaiton&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJBaUSy6axJ3XLcgW-pOKbnNVNX0Go2kssP5gDXkXzWU45K79gn32Wttr1wj4SBrG484yks09wg-Jn6q2zTunrexypxP5NTDsF8W1SHF6rhCd6jw3DZ-Qnq8ZuC4p2o1zmhdxRBUfZ8ak/s1600/step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;247&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJBaUSy6axJ3XLcgW-pOKbnNVNX0Go2kssP5gDXkXzWU45K79gn32Wttr1wj4SBrG484yks09wg-Jn6q2zTunrexypxP5NTDsF8W1SHF6rhCd6jw3DZ-Qnq8ZuC4p2o1zmhdxRBUfZ8ak/s400/step1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
下一步後建立一個Project，你只需要給定Project名即可&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGEd1axdaDxh7BQIuzc1hhW3GJ6wlkXoX6qcb2CygMozAaXijU08zfGEpoa7FcvFScrp3miWkWnWQkn8Ko1vunxna7UgSpttDpTFC-JOdduTsQmtjKsekPIstjviafvp-IuJjI4MIiIiY/s1600/step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGEd1axdaDxh7BQIuzc1hhW3GJ6wlkXoX6qcb2CygMozAaXijU08zfGEpoa7FcvFScrp3miWkWnWQkn8Ko1vunxna7UgSpttDpTFC-JOdduTsQmtjKsekPIstjviafvp-IuJjI4MIiIiY/s400/step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
下一步請選擇 &quot;Composite with BPMN Process&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtaupKew6XwriTjW6iZslvbvj1nChaNuEfCbtZ-p_lUZ-_f1_GPVEV9P_LPjkic0X4G0XVNwxKzQ77jZ_54a_tvoiXyy22e5QxOsRNjAedwPVvQinbWjR9n0ftVkx3w5pePN5R_em76Os/s1600/step3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtaupKew6XwriTjW6iZslvbvj1nChaNuEfCbtZ-p_lUZ-_f1_GPVEV9P_LPjkic0X4G0XVNwxKzQ77jZ_54a_tvoiXyy22e5QxOsRNjAedwPVvQinbWjR9n0ftVkx3w5pePN5R_em76Os/s400/step3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;接下來會有BPMN Process產生的選擇，你可以給定自己喜歡的Process名稱與描述，但下面的Type則會根據流程特性的不同產生不同的流程基本元件，這邊Oracle提供了四種類別：Asynchronous Service、Synchronous Service、Manual Process與Reusable Process。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;基本上Asynchronous Service與Synchronous Service兩種的Process本身都會提供Web Service的介面給外部系統或程式呼叫啟動，唯一的差別只有流程本身是同步或非同步；至於Reusable Process，你可以把他想成是一個工具流程，或是一個常被不同流程中引用的子流程，讓你之後可以再利用。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Manual Process則是如同我們現在所預設的流程，由人工啟動，並在流程完成後自己結束。我們的範例就採用這種流程，選好之後直接按下&quot;Finish&quot;即可。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs3h-mTMG8IYlQpFWKdXfpH47ITdtzkApPqLhZ00CDJDmM45U3zhlMt1mZabriyCrfg1EI23hXes-lUZyILwSigihvwkQHI8Mmaa5NspVffZSpblTa9T8unJZEFqrQEi8Tvyvsf5zMLy0/s1600/step4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs3h-mTMG8IYlQpFWKdXfpH47ITdtzkApPqLhZ00CDJDmM45U3zhlMt1mZabriyCrfg1EI23hXes-lUZyILwSigihvwkQHI8Mmaa5NspVffZSpblTa9T8unJZEFqrQEi8Tvyvsf5zMLy0/s400/step4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;基本流程設計&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;產生完成的BPM流程就如下圖所示，Oracle BPM流程設計是採用BPMN標準notation，BPMN會將整個流程劃分為一到多個&quot;水道(swim lane)&quot;，每一條水道代表的是不同角色的工作範圍，流程內包含了許多的Activity與Transition，原則上，每一個Activity你可以把它視為一個【動作】，這個動作有可能是人工處理的，也有可能是呼叫系統自動作業的，Transition就是協助串連起多個動作，以完成一個完整流程。當然BPMN本身還另外支援了Event與Gateway的概念，這些部份我們在第一個流程中不會用到，留待以後再提。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;下圖所示，流程的開始點是&quot;Start&quot;，結束點是&quot;End&quot;，我們現在只有一個水道 -- &quot;Role&quot;、一個Activity -- &quot;UserTask&quot;，這樣代表&quot;UserTask&quot;這個工作是由叫做&quot;Role&quot;的角色負責執行。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0OAg5tGy53hppDUn_Y_Wh8ckqQIFLyJtWyv32zQvc3oX0eE7JRXdN5aQe-Cqy-cw4dlmpD2hSpgFxIOhC9dZj23RGDTJs3mP9P-kBbzDnJ_-z5k0GZTxhYJetyo0NiTHnQSrxsLUvshw/s1600/step5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0OAg5tGy53hppDUn_Y_Wh8ckqQIFLyJtWyv32zQvc3oX0eE7JRXdN5aQe-Cqy-cw4dlmpD2hSpgFxIOhC9dZj23RGDTJs3mP9P-kBbzDnJ_-z5k0GZTxhYJetyo0NiTHnQSrxsLUvshw/s400/step5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
根據我們採購流程的劇本，基本上我們需要兩種角色出現，一種是一般使用者，一種是管理階層，使用者負責提出申請，管理人員負責審核。也因此我們會需要兩個水道，分別指定為User與Manager兩種角色。&lt;br /&gt;
&lt;br /&gt;
同時，我們會需要兩個User Activity -- &quot;Request Procurement&quot; 以及 &quot;Approve Procurement&quot;，這兩個Activity分別會被放置到User與Manager的水道之中；我們還需要一個Service Activity -- &quot;Save Procurement&quot;，這個Activity是一個系統的自動作業，負責的是我們劇本之中最後一個步驟，將採購資料寫入檔案之中。&lt;br /&gt;
&lt;br /&gt;
來看看怎麼樣做出這樣的流程吧!&lt;br /&gt;
&lt;br /&gt;
首先你可以double-click &quot;Role&quot;的位置，會有一對話視窗出現讓你指定角色，請按下&quot;New&quot;按鈕並給定我們的需要的第一個角色 -- &quot;User&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoWmiPIZZsEiquCnjymQ0NaHovt2Fk59d49IFRVxKEbLnn1tEm5f-byVRUccqrGZslyWZg0yout0erfzwYn2fG6Gp__MRmwGsYqoeZ1ZNTg2-VCHpKXFbEvA0MJT5zgGYEUzQALyEIFDo/s1600/step6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoWmiPIZZsEiquCnjymQ0NaHovt2Fk59d49IFRVxKEbLnn1tEm5f-byVRUccqrGZslyWZg0yout0erfzwYn2fG6Gp__MRmwGsYqoeZ1ZNTg2-VCHpKXFbEvA0MJT5zgGYEUzQALyEIFDo/s400/step6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
接下來，請在&quot;User&quot;水道下方空白處按右鍵選擇&quot;Add Role&quot;，並重複上面的步驟以產生說們所需要的第二個角色 -- &quot;Manager&quot;。&lt;br /&gt;
&lt;br /&gt;
Double-click &quot;UserTask&quot;，將他的名稱改為劇本之中的第一個Activity -- &quot;Request Procurement&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnEdr7YUYaOo6XvYgMHf6dV7HByCoybHmG6YbvPmaj1vUlEt3qf0CyiJHgr0XhHXJ1ETD9bvSYWLA_XTPcsEMacQI5Tlbo1OUohjI8QKXRvz8QMpoVZhEwAfidhJD-EztKTOvbxahD5MU/s1600/step7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnEdr7YUYaOo6XvYgMHf6dV7HByCoybHmG6YbvPmaj1vUlEt3qf0CyiJHgr0XhHXJ1ETD9bvSYWLA_XTPcsEMacQI5Tlbo1OUohjI8QKXRvz8QMpoVZhEwAfidhJD-EztKTOvbxahD5MU/s400/step7.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
試試看，你可以在水道之間任意托放現有的Activity，我們可以先把&quot;End&quot;托放到&quot;Manager&quot;水道之上。接下來，找一下在你右手方的Component Palette，將User元件托放至 &quot;Request Procurement&quot; 與 &quot;End&quot; 之間的Transition上(記得要放在線中間，看到線變成藍色之後放下)，你又會看到對話視窗，把名稱改為劇本之中的第二個Activity -- &quot;Approve Procurement&quot;吧。&lt;br /&gt;
&lt;br /&gt;
調整一下流程的layout，你應該會看到如下面所示的畫面：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkbd3Ezn6A_IIRWKuGShLc0xqAOsPdGPG8DmmqjUzg-it8THrpz7-_lL_aFTX0DWXHLDdWlJe-xmrAXAgJSj2d6pCNvfBK7oEDwEESSHjJdPjlMZ2G-znyiB9WAxkypYD90BzwJgUcAMM/s1600/step8.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkbd3Ezn6A_IIRWKuGShLc0xqAOsPdGPG8DmmqjUzg-it8THrpz7-_lL_aFTX0DWXHLDdWlJe-xmrAXAgJSj2d6pCNvfBK7oEDwEESSHjJdPjlMZ2G-znyiB9WAxkypYD90BzwJgUcAMM/s400/step8.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;同樣的做法，請再把Component Palette中的Service Activity托放到 &quot;Approve Procurement&quot; 和 &quot;End&quot; 之間的Transition上，給他個名稱&quot;Save Procurement&quot;，這就是最基本我們流程的長相了!&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguSTyUvkyIihyphenhyphenHkjXdkEMq-OeP0uk8EPswuXoeJENcUlabTwabWe4CdsWQ7V3PhJq2wrVBjp986BhnSJ797JKagFI3gmPL2eOM1GEqJWOq4zzwLtr-grVDPRIlVvpPC-mpM686HVlW7C0/s1600/step9.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguSTyUvkyIihyphenhyphenHkjXdkEMq-OeP0uk8EPswuXoeJENcUlabTwabWe4CdsWQ7V3PhJq2wrVBjp986BhnSJ797JKagFI3gmPL2eOM1GEqJWOq4zzwLtr-grVDPRIlVvpPC-mpM686HVlW7C0/s400/step9.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;各位不難發現，到目前為止的流程充其量只是個&quot;皮&quot;，基本定義了流程中間有那些關卡與角色，欠缺了詳細每個Activity內容的定義，也沒有設計流程中所夾帶的變數資料。接下來的步驟我們就先來定義流程的詳細內容吧!&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;指定流程變數&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
在BPM平台中，設計並部署好的流程(Process)可以同時會有許多的流程實例(Process Instance)在平台上執行，每一個instance都會夾帶著各自的資料，以我們的例子來說，採購申請流程的每一個instance應該夾帶著採購申請的內容，這個內容在設計時需要被定義為一個流程的變數，每一個流程實例都會有一個變數資料。以Java的概念來說，這就像是class中的property，每一個class instance都會保有一份自己的instance variable一樣。&lt;br /&gt;
&lt;br /&gt;
而Oracle BPM平台是基於SOA架構所設計的，SOA又是基於XML相關的一些標準所堆疊，因此，Oracle BPM變數設計的第一步驟，就是要定義變數的&quot;長相&quot;，而在XML世界裡，變數的長相就是定義在XML Schema之中了。接下來我們就來使用JDeveloper定義出我們所要的procurement變數。&lt;br /&gt;
&lt;br /&gt;
首先，在你的Project之中，會有一個資料夾叫做 &quot;SOA Content&quot;，裡面有一個資料夾叫 &quot;xsd&quot; 的，這是我們Project中預設XML Schema存放的位置，在此資料夾上右鍵選擇 &quot;New&quot; ，在New Gallery的搜尋列中打上 &quot;XML Schema&quot;，你可以看到一個XML Schema的item供你選擇。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGRQ-kdfEu1lcX6csqY-IWPcNolup4T_YMgFjMMauNY1xSfXjI4jFiUJWcGv-vUcI2i85hp0QEOU96ypSbJLPJb40ShI5ZeNAjErWsOTT7u44kSYnSWFEMke5eI3-6IjE7m78d53FUk_8/s1600/step10.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGRQ-kdfEu1lcX6csqY-IWPcNolup4T_YMgFjMMauNY1xSfXjI4jFiUJWcGv-vUcI2i85hp0QEOU96ypSbJLPJb40ShI5ZeNAjErWsOTT7u44kSYnSWFEMke5eI3-6IjE7m78d53FUk_8/s400/step10.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
接下來給這個schema檔案名稱、Target Name Space以及Prefix，我們分別使用procurement.xsd、http://blogdemo/procurement與procurement。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhluMDZzVVE_ztft2CWyJx0fERlDXdMyWXG_SOXpfSicYPPiZ6LQ8RqsVpFnxmIrqvtPypkNWUHCUD8v-MPXXJ3DLoRHG0ET44Yhu9IVmhmsPOe0LJDW4sSBrDpBRWH6mHu0MC2WA40FVY/s1600/step11.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhluMDZzVVE_ztft2CWyJx0fERlDXdMyWXG_SOXpfSicYPPiZ6LQ8RqsVpFnxmIrqvtPypkNWUHCUD8v-MPXXJ3DLoRHG0ET44Yhu9IVmhmsPOe0LJDW4sSBrDpBRWH6mHu0MC2WA40FVY/s400/step11.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;你可以看到GUI介面的XML Schema編輯器，當然如果你很熟悉XML Schema的撰寫，你也可以切換到source view自己編輯，或者是使用現成的XML Schema檔做為變數的長相。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfkhfQWiAc3diQR9K1xPMv9jYm16os8_6k6lVx9gB2zoDjRyVuqIo380Mq7ea1ULATSSa0nPgL9MSLVdKoHw1zyyWeNakUpSAZFxj_KujjR_Ny12Q8SSP9n0fvcwuhxi3WWtQjbTkBYuA/s1600/step12.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfkhfQWiAc3diQR9K1xPMv9jYm16os8_6k6lVx9gB2zoDjRyVuqIo380Mq7ea1ULATSSa0nPgL9MSLVdKoHw1zyyWeNakUpSAZFxj_KujjR_Ny12Q8SSP9n0fvcwuhxi3WWtQjbTkBYuA/s400/step12.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;在XML Schema編輯器中，你可以點選任何一個element，為每個element加上sequence與子element，並且可以定義每個element的型別(字串、數字或日期...等)。我們需要的是一個procurement element，裡面有四個子element分別為：user_id (字串 xsd:string)、procurement_date (日期 xsd:date)、item (字串 xsd:string)與item_count (整數 xsd:integer)。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;做法是點選一個現在的&quot;exampleElement&quot;，在畫面右下角的Property Inspector中將name改為procurement。&lt;/li&gt;
&lt;li&gt;右鍵此element，選擇&quot;Insert inside element - procurement&quot; --&amp;gt; &quot;sequence&quot;，產生一個sequence。&lt;/li&gt;
&lt;li&gt;再右鍵剛才所產生的sequence，選擇 &quot;Insert inside sequence&quot; --&amp;gt; &quot;element&quot;，產生新的element。&lt;/li&gt;
&lt;li&gt;點選此element並將其name改為user_id，type改為xsd:string。&lt;/li&gt;
&lt;li&gt;重複上面兩個步驟，產生procurement_date、item與item_count三個element&lt;/li&gt;
&lt;/ul&gt;完成之後你的XML Schema應該看起來像是這樣：&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzmQ3IDMWE7-oMZC_KGnJ521wXSLjKjs7aTy1Obp-sAfl1q-HE5N1n0tzh84Gkedra59ibBC43OQXyEEl1FTyp6yxkekaVNLt93LtUU3FzR5iUa_kOGEKWwZfrQV1SUIj3u8sIcYi92Ow/s1600/step13.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzmQ3IDMWE7-oMZC_KGnJ521wXSLjKjs7aTy1Obp-sAfl1q-HE5N1n0tzh84Gkedra59ibBC43OQXyEEl1FTyp6yxkekaVNLt93LtUU3FzR5iUa_kOGEKWwZfrQV1SUIj3u8sIcYi92Ow/s400/step13.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;接下來，我們來把這個XML Schema當作BPM變數的&quot;型別&quot;吧! 首先先把開發介面左上角的切換到BPM Project Navigator頁簽之上(看得出差別嗎? 左上角長得不太一樣了!)。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOCjYMA7ETNHlOM_jqtw7ViXv8SadHr1fUSxXV-MHBATWUwXz8ncZNmXHUcUchG-yEnJAskvbfcpVCXR8bjmGQPzofRR387u_Z13f2jABWkF_rhBE7P5IZb3S9Xrtj9wkUWYqr_5B1gZc/s1600/step14.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOCjYMA7ETNHlOM_jqtw7ViXv8SadHr1fUSxXV-MHBATWUwXz8ncZNmXHUcUchG-yEnJAskvbfcpVCXR8bjmGQPzofRR387u_Z13f2jABWkF_rhBE7P5IZb3S9Xrtj9wkUWYqr_5B1gZc/s400/step14.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
接下來右鍵&quot;Business Catalog&quot; --&amp;gt; &quot;New&quot; --&amp;gt; &quot;Business Object&quot;，給定 &quot;Procurement&quot; 為名稱、&quot;Data&quot;為Destination Module。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzAXxXcZqczMFDX3rzlvdWYi7VQnFx76rRThR3vRrEMMkn6P3Lqah_z0t54OxTRvLqW-1sngyAPdy8bwc45YBIlVpab0f0pqvG5JBVXpOjTcWFa3pnlMSF_uYFmivmOFUJWlVjmWhErNo/s1600/step15.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzAXxXcZqczMFDX3rzlvdWYi7VQnFx76rRThR3vRrEMMkn6P3Lqah_z0t54OxTRvLqW-1sngyAPdy8bwc45YBIlVpab0f0pqvG5JBVXpOjTcWFa3pnlMSF_uYFmivmOFUJWlVjmWhErNo/s400/step15.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
選取 &quot;Based on External Schema&quot; Checkbox，並按下旁邊的放大鏡，你可以從Type explorer中一路選取到procurement.xsd裡面的procurement element。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIXHYtrk0lr1Bu2qytWPAJna69PRddqwUXJMaz2bzUnGxIuEHFRrJEcbX9YL-WS221PBRPTakqnGxU1NL58muXCWVzAN2DzNnM5r7ME-MxwVpcqgbj2qzo8A7119A32_0q7sIts7IHO8g/s1600/step16.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIXHYtrk0lr1Bu2qytWPAJna69PRddqwUXJMaz2bzUnGxIuEHFRrJEcbX9YL-WS221PBRPTakqnGxU1NL58muXCWVzAN2DzNnM5r7ME-MxwVpcqgbj2qzo8A7119A32_0q7sIts7IHO8g/s400/step16.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
一路OK到底，你將可以在Business Catalog下面看到一個新的Module叫&quot;Data&quot;，裡面有一個Business Object是&quot;Procurement&quot;。現在你就可以開始在流程之中加入Procurement資料物件了!&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;切回流程(ProcurementProcess)的頁面，你可以看到左下角的Structure Panel裡面有個叫做 &quot;Process Data Objects&quot;的地方，右鍵他，選&quot;New&quot;，在彈出的對話框中給定如下圖所示的資料。&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn7L0p7KwWPSWT2BYkkA7Dn-xtGFRHxSGryGdXQnfUKNCEvPHrj4X8qQMEoiIOcjtH5SaG7qS04NxkTUbcjJAuMzPR8Q2no5rQVOmRZ8n4xOg2sWhbkNyDD_DiFuFdLQtB1q6xC2RKwTM/s1600/step17.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn7L0p7KwWPSWT2BYkkA7Dn-xtGFRHxSGryGdXQnfUKNCEvPHrj4X8qQMEoiIOcjtH5SaG7qS04NxkTUbcjJAuMzPR8Q2no5rQVOmRZ8n4xOg2sWhbkNyDD_DiFuFdLQtB1q6xC2RKwTM/s400/step17.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
現在，流程中所要攜帶的資料已經有變數可以儲存了，我們只要在流程細部設計中指定這變數何時被使用還有如何使用了。&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;定義人工作業&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
在定義人工作業內容之前，有一個問題需要先被解決，到底剛才所定義的User與Manager兩個角色各自有那些人呢? 要完成這一步驟，首先你至紹需要有兩個使用者存在於你的BPM server之中，你可以參考我&lt;a href=&quot;http://timwu1975.blogspot.com/2011/01/oracle-fusion-middleware-bpm-server.html&quot;&gt;這篇文章&lt;/a&gt;預先加入所需的使用者。&lt;br /&gt;
&lt;br /&gt;
在你的BPM Navigator中，double-click Organization：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvTxSoaYDt-nCcj37U1PxiuxRBuh29ocddsREUg_xYua_R4UKjgK7PrLcTiejM0s-G5SDv8Q-8Qfu2f8mKYbNW70TDc2tjtwypRGUNBpGFhuCxHInqFR9PU-v1pavKeb8EffTtzLyW0os/s1600/step17-1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvTxSoaYDt-nCcj37U1PxiuxRBuh29ocddsREUg_xYua_R4UKjgK7PrLcTiejM0s-G5SDv8Q-8Qfu2f8mKYbNW70TDc2tjtwypRGUNBpGFhuCxHInqFR9PU-v1pavKeb8EffTtzLyW0os/s400/step17-1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
選擇 &quot;User&quot; 角色，並在下面Role Members中選擇Type為User，並按下綠色的加號按鍵，產生一行User，你可以在Name的地方直接改為你所設定的使用者名稱，這邊我指定為&quot;tim&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTPPMNmxFZZBm1hXaAue1zjFlSUjtRYl1WTlbhtWPS_fmV5Rq68Nkr-oRtxTKhQ6taordkYdpmuM8TypCPrD8LzXkv7AiKc7ZuRPEeD32mLBXUDjJ24vEbpzLvv4nJVS7WHqGqFcX60XA/s1600/step17-2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTPPMNmxFZZBm1hXaAue1zjFlSUjtRYl1WTlbhtWPS_fmV5Rq68Nkr-oRtxTKhQ6taordkYdpmuM8TypCPrD8LzXkv7AiKc7ZuRPEeD32mLBXUDjJ24vEbpzLvv4nJVS7WHqGqFcX60XA/s400/step17-2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
重複上述步驟，選擇&quot;Manager&quot; 角色，指定使用者為&quot;kenneth&quot;。完成之後，儲存內容。&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;ps. 你也可以不要自行輸入，你可以按下放大鏡圖示，接下來會有對話框讓你連接進入BPM Server之中，查詢並選擇你所指定的使用者。&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;
接下來我們來定義詳細的人工作業內容，先double-click &quot;Request&amp;nbsp;Procurement&quot;這個Activity，在對話框中切換到&quot;Implementation&quot;頁簽。給定Title為&quot;申請採購&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLx_WadIbtfCt6yUsNay0UQ0wuA_yBpyKsvEfE3gRe7ywDgD9geAwXDtkPJNHBSIvo6x3b_G3LQNhl_RhALp4dd8PB0zzwRAqHk6oU8zHcXHrgzPaorp1nU5hRcT7evRtq2mLDrJci89E/s1600/step18.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLx_WadIbtfCt6yUsNay0UQ0wuA_yBpyKsvEfE3gRe7ywDgD9geAwXDtkPJNHBSIvo6x3b_G3LQNhl_RhALp4dd8PB0zzwRAqHk6oU8zHcXHrgzPaorp1nU5hRcT7evRtq2mLDrJci89E/s400/step18.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
按下中間的綠色加號圖案，會跳產生人工作業的對話框，給定下來資訊：&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Name：Request&lt;/li&gt;
&lt;li&gt;Pattern：選擇Initiator&lt;/li&gt;
&lt;li&gt;Title：申請採購&lt;/li&gt;
&lt;/ul&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvGq36xUv3y28Sk8LMQkX1W26lL5BzPpqlNvazxoA9HzsgVSb8qFZ-cvOjDehwAjQoctNwLbyNEJIQWXaqhZomMEdbUZOpFglmF3Z2BwRsBtWJmnFpwkLc6J9t-Icx1SjoJQYAxeee4cU/s1600/step19.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;247&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvGq36xUv3y28Sk8LMQkX1W26lL5BzPpqlNvazxoA9HzsgVSb8qFZ-cvOjDehwAjQoctNwLbyNEJIQWXaqhZomMEdbUZOpFglmF3Z2BwRsBtWJmnFpwkLc6J9t-Icx1SjoJQYAxeee4cU/s400/step19.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
這一個對話框中包含許多重要的資訊，我們需特別說明一下每個部分：&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Pattern&lt;br /&gt;
Pattern會指定此人工作業的執行模式，通常我們都會使用Simple，Simple會將工作指派給該水道角色的人員。但是若我們希望流程的啟動是由人工啟動，則在此流程的第一個User Task我們需要選擇Initiator Pattern，這樣的話，負責此人工作業腳色的人員將可以手動透過網頁啟動這個流程。針對採購流程，我們希望一般使用者可以自行提出申請，因此在 &quot;Request&amp;nbsp;Procurement&quot; 中選定Initiator Pattern。在接下來系列中我會額外再針對其他不同的Pattern進行說明。&lt;/li&gt;
&lt;li&gt;Outcome&lt;br /&gt;
代表此人工作業完成後使用者可以選擇的結果，你可以透過旁邊的放大鏡來選擇(可複選)，常用的有幾種Outcome，像是送出(SUBMIT)、核准(ACCEPT)、拒絕(REJECT)...等等，你可以針對不同的情境去指定每一個人工作業完成之時，使用者可以選擇的結果選項。以採購流程來說，&quot;Request&amp;nbsp;Procurement&quot;本身是提出採購申請，當使用者填完成購申請之後只應該有一種選項 -- SUBMIT；但是在管理階層所使用的 &quot;Approve&amp;nbsp;Procurement&amp;nbsp;&quot;，其Outcome就有可能是ACCEPT或是REJECT了! 記得，這些結果系統有給幾個預設值供你使用，但是你也可以根據需求自行增加不同的Outcome值在流程中使用。&lt;/li&gt;
&lt;li&gt;Parameters&lt;br /&gt;
流程中的每一個人工作業關卡會根據其工作內容，使用到流程中的某些變數。此處便是提供你指定哪些流程變數會被傳給此人工作業使用，並且指定傳入的變數內容是否在此作業中可以被修改。&quot;Request&amp;nbsp;Procurement&quot; 此作業需提供使用者輸入採購的項目與資訊，因此需要將procurement變數傳入，並且允許被編輯。做法是按下綠色的加號圖形，將右手邊&quot;Browse Data Objects&quot;中的procurement托放至Parameter之中，並且將Editable選項勾選。&lt;/li&gt;
&lt;/ul&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxOiN7ogGsyFxutx0fjbUQDpoP29a_kffRmQUw319Qe_E0fkYyk29tyZboVcS9asxVo5ja4GjTQv_XWF3y3KWwwiAj679rf1dZyS3tIxl_ryHzw_-DEIbDCedCXpdGrzM09fXYL7mFUWA/s1600/step20.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;247&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxOiN7ogGsyFxutx0fjbUQDpoP29a_kffRmQUw319Qe_E0fkYyk29tyZboVcS9asxVo5ja4GjTQv_XWF3y3KWwwiAj679rf1dZyS3tIxl_ryHzw_-DEIbDCedCXpdGrzM09fXYL7mFUWA/s400/step20.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
一路OK到關閉所有對話框，你會發現，現在 &quot;Request Procurement&quot; Activity上面已經不再出現黃色驚嘆號警告了，代表他的詳細定義已經完成。&lt;br /&gt;
&lt;br /&gt;
重複上述步驟完成 &quot;Approve Procurement&quot; Activity的詳細0定義，特別注意，&quot;Approve Procurement&quot; 與 &quot;Request Procurement&quot; 有一些的不同：&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&quot;Approve Procurement&quot; 並不是起始流程實例的步驟，所以他應該選擇Simple Pattern而非Initiator Pattern。&lt;/li&gt;
&lt;li&gt;&quot;Approve Procurement&quot; 的Outcome可能有兩種，分別是APPROVE與REJECT，代表管理人員可以同意或拒絕此採購。&lt;/li&gt;
&lt;li&gt;&quot;Approve Procurement&quot; 同樣使用procurement變數，但是他們不應該可以編輯變數內容，記得不需要勾選Editable。&lt;/li&gt;
&lt;/ol&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiel_27a-lfFAcxEXB1EQcZCnwp1-rRI4wJPmtf6cETkBrgvhqrJhWwzti_Aaajyg7zznqz_euyC9cZFb2spFqAPYEE8NXxPgdHEOjyyf4BLVxlJZXYZ1LWlMgg7cLZXAJtBqHhSu3NLtc/s1600/step21.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiel_27a-lfFAcxEXB1EQcZCnwp1-rRI4wJPmtf6cETkBrgvhqrJhWwzti_Aaajyg7zznqz_euyC9cZFb2spFqAPYEE8NXxPgdHEOjyyf4BLVxlJZXYZ1LWlMgg7cLZXAJtBqHhSu3NLtc/s400/step21.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
恭喜你! 你已經將流程的人工作業部分完成了! 好像還差了甚麼東西? 對了，最重要的使用者介面還沒設計哩!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;定義使用者介面&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
雖然Oracle BPM提供了一套自動產生UI的功能，但是先天上的設計似乎有些... &quot;功能龐大&quot;。簡單來說，他會幫你流程中的每一個HumanTask單獨產生一個UI Project，此UI Project是採用了Oracle ADF的架構，最後整個流程在部署的時候，JDeveloper再將你的每一個UI Project包裝成WAR，然後統整所有的WAR打包成一個EAR。想想看，要是你有個流程內部有十幾個人工作業步驟，每個都會包了所有ADF的library變成一個WAR，最後再打包成一大包的EAR，這樣的做法會對你的server與部署時間造成 &quot;小小的負擔&quot;。&lt;br /&gt;
&lt;br /&gt;
因此，我這邊直接跳過預設的做法，提供各位平時我會使用的UI產生方式。&lt;br /&gt;
&lt;br /&gt;
首先，產生一個新的專案，&quot;New Project&quot; --&amp;gt; &quot;Generic Project&quot;，給定專案名稱叫 &quot;FirstBPMUI&quot;。&lt;br /&gt;
&lt;br /&gt;
右鍵此FirstBPMUI專案，選擇 &quot;New&quot;，在New Gallery的搜尋列之中打上human，你可以在Items內部看到一個選項叫做 &quot;ADF Task Flow Based on Human Task (JSF)&quot;，按下OK。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPteA_SoHGaawR64xMQORFNNQnTPTh35qFdQlrbmfRX3ikNd5HOYgtAJmUupqGaXB04qjJs2dWq_PJ2HwgJOo184KI4xuqRldPY3l0zDzaEkStIIttH6YFFp6UgvPn1pRU5t9WRnYwBvA/s1600/patch1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPteA_SoHGaawR64xMQORFNNQnTPTh35qFdQlrbmfRX3ikNd5HOYgtAJmUupqGaXB04qjJs2dWq_PJ2HwgJOo184KI4xuqRldPY3l0zDzaEkStIIttH6YFFp6UgvPn1pRU5t9WRnYwBvA/s400/patch1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;接下來會有對話框彈出，請你選擇你現在需要製作的UI是針對哪一個Task，選取在FirstBPM裡面的Request.task。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCGLYLDR4CBaEXxydd3l0W9GZZdHmL59ypzK0kt4Rh_ACkPT0MwVeWXxagYXyPJsgCi27Qi2zxRKyS0L8cWDKUei98sOt4W0Yw7Z1G6WgMwvLD5HDjEGiacCZchkOHpNwQVdJsKkaX57M/s1600/patch2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCGLYLDR4CBaEXxydd3l0W9GZZdHmL59ypzK0kt4Rh_ACkPT0MwVeWXxagYXyPJsgCi27Qi2zxRKyS0L8cWDKUei98sOt4W0Yw7Z1G6WgMwvLD5HDjEGiacCZchkOHpNwQVdJsKkaX57M/s400/patch2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;接受所有Create Task Flow的預設值&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHRLlYMoPo2krJsQu7awUbglYBFrcvcjqFz6Doxg26sKJsUxOcXjmPIwrsxLzHqVv_cLcEiOIbO_xFwQbwYRZghEe8jJdYejFbgY5ZV07zGR0b78geGIVv4QmFXqMCna_GZ-4uSk4w3mg/s1600/patch3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHRLlYMoPo2krJsQu7awUbglYBFrcvcjqFz6Doxg26sKJsUxOcXjmPIwrsxLzHqVv_cLcEiOIbO_xFwQbwYRZghEe8jJdYejFbgY5ZV07zGR0b78geGIVv4QmFXqMCna_GZ-4uSk4w3mg/s400/patch3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;你會看到像是這樣的畫面&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglbNVqqVnScZq2zfvH8ujLjuUXzSG6maEOIYFsHY-QGycfSu6LwS5A4_DHeewTM8Ytoe8tmvfZQOdBE7y9Mh_z5eSvDHDp2EzsHmPeHMwZ10MOhCmjDE8XT6iHfKIfjfc_fF9hyG7SpRI/s1600/patch4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglbNVqqVnScZq2zfvH8ujLjuUXzSG6maEOIYFsHY-QGycfSu6LwS5A4_DHeewTM8Ytoe8tmvfZQOdBE7y9Mh_z5eSvDHDp2EzsHmPeHMwZ10MOhCmjDE8XT6iHfKIfjfc_fF9hyG7SpRI/s400/patch4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;現在你所看到的 &quot;taskDetails1_jspx&quot; 就是等一下會產生的UI JSF，你可以點選此icon並在右下角的view中給他一個你喜歡的Activity ID與Page，這裡我把他們分別設定為&quot;request&quot;以及&quot;/request.jspx&quot; (Page就是待會產生的JSF檔案名，因此你最好給他一個有意義且不要和其他網頁重複的名稱)。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjirwFGz1aY0LehR3g2wVPLYAku2Crv6Xs3pEx42If_KwudJgiNoFlQgjsMa0hyphenhyphenacXqp2SxiFGkAHUU0RXUZ9AR7ygjKiq1g1vuGC4_5dwMSzrM3N6asSin0uf939vxnfdG1QjC8sCOM_0/s1600/patch5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjirwFGz1aY0LehR3g2wVPLYAku2Crv6Xs3pEx42If_KwudJgiNoFlQgjsMa0hyphenhyphenacXqp2SxiFGkAHUU0RXUZ9AR7ygjKiq1g1vuGC4_5dwMSzrM3N6asSin0uf939vxnfdG1QjC8sCOM_0/s400/patch5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;現在可以做網頁了，double-click圖上面的request，你會看到一個Create JSF的對話窗，接受所有的預設值，直接OK即可，你會看到自動產生了一個空白的JSF檔案。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_OMseRWAcg3B2gY-6ADODAj9fwji9ZcfxoSeVpUkSyJ3-NMcWo1taHosVhNhCBR-r3NFd14Ppmp5pcFNy0ddWpgPyj-7MBOJgTqWl8OZFk-dXahS4GhJRGfsN3SgNtnKF496X1tz9ciQ/s1600/patch6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_OMseRWAcg3B2gY-6ADODAj9fwji9ZcfxoSeVpUkSyJ3-NMcWo1taHosVhNhCBR-r3NFd14Ppmp5pcFNy0ddWpgPyj-7MBOJgTqWl8OZFk-dXahS4GhJRGfsN3SgNtnKF496X1tz9ciQ/s400/patch6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
接下來就要展現ADF Data Control的功能了，在JDevelop介面左邊中間，你會看到一個Data Control的地方，點一下它把它展開，你會看到一個剛才ADF幫你自動產生的Data Control，點選 &quot;FirstBPMUI_Request&quot; --&amp;gt; &quot;getTaskDetails (String, String, String) --&amp;gt; Return，你會看到Task的icon出現。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWwCdSkXT-rvfAyOHrDYuGjdQy2RlZdh3OuELfRuOPaItte-xrcbdAEsEoP-kLRq3QneJ5CqPnlldvqALBQ_WKaC-mq8R_vfdXL8c-KHHyIGK8mt23qhFdf55WSQV4r5ipAAC1wnJBKYM/s1600/patch7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWwCdSkXT-rvfAyOHrDYuGjdQy2RlZdh3OuELfRuOPaItte-xrcbdAEsEoP-kLRq3QneJ5CqPnlldvqALBQ_WKaC-mq8R_vfdXL8c-KHHyIGK8mt23qhFdf55WSQV4r5ipAAC1wnJBKYM/s400/patch7.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
這時候將&quot;Task&quot;從左手邊托拉至你的空白JSF網頁之中，此時JDeveloper會自動彈跳出一個選單，請選擇 &quot;Human Task&quot; --&amp;gt; &quot;Complete Human Task with Payload&quot;，接下來會連續出現兩個對話框，暫時不要理他，都接受預設值按下OK。&lt;br /&gt;
&lt;br /&gt;
噹噹，你的UI JSF網頁已經自動被產生出來了!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnxVzNhCDAhRfHRxVuRgC_RIsHgCKRHryimCve7X4r20crRT-KzAUANfGpeWzfADii-DNgkoefVk8My_hbJkIM7NJhn08CvmygTPW0cYm6LTgrPyIaVOqyfqFHW0iR1ZsVFVtIwcQUcWY/s1600/patch8.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnxVzNhCDAhRfHRxVuRgC_RIsHgCKRHryimCve7X4r20crRT-KzAUANfGpeWzfADii-DNgkoefVk8My_hbJkIM7NJhn08CvmygTPW0cYm6LTgrPyIaVOqyfqFHW0iR1ZsVFVtIwcQUcWY/s400/patch8.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
趕快Save All一下吧!&lt;br /&gt;
&lt;br /&gt;
接下來你會需要再做出&quot;Approve Procurement&quot;的使用者介面，請重複上面的步驟 (記得，不用重新產生一個Project，你可以從&quot;右鍵FirstBPMUI&quot; 這個步驟開始做)，要特別注意的是，你之後會產生一個新的TaskFlow以及Data Control，在選取的時候不要選到之前做過的了，並且在網頁命名上不要重複即可。&lt;br /&gt;
&lt;br /&gt;
用這樣的做法可以讓你即使有多個人工作業存在於流程中，你始終還是只有一個UI Project，這會保持你的部署EAR檔案不要太過龐大。&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;ps. 這個版本的JDeveloper有個小問題需要手動修正，各位請在FirstBPMUI Project之中，找到位於&quot;Web Content&quot; --&amp;gt; &quot;WEB-INF&quot; --&amp;gt; &quot;adfc-config.xml&quot;，double-click此檔案後，你會在畫面中央的Unbounded Task Flow中看到有一個紅色叉叉在Empty1_jspx上面，請double-click此元件以自動產生對應的JSF檔案。&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;定義非人工系統自動作業&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
記得嗎? 我們在採購流程的最後一步驟是要將採購資料寫入檔案，此步驟應該是一自動作業，由BPM平台將採購procurement變數資料寫入指定的目錄與檔案。此部分就是BPM架構在SOA整合平台的好處，我們將使用SOA平台所提供的File Adapter功能，讓開發人員不需要寫code即可完成這件事情。&lt;br /&gt;
&lt;br /&gt;
首先，double-click &quot;FirstBPM&quot; --&amp;gt; &quot;SOA Content&quot; --&amp;gt; &quot;composite.xml&quot; 檔案，你可以看到一SCA (Service Component Architecture) 的composite圖，這張圖代表了整包專案之中，各種不同元件之間的關聯，現在可以看到的是我們專案之中有一個 &quot;ProcurementProcess&quot; BPMN流程，這流程之中有到兩個人工作業 -- &quot;Request&quot; 與 &quot;Approve&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUy-To39ekAmQ-SwlOrwVqHiGxhkMO_v2PIAISAiqrxc8fIKvvSelO7ytuknCRCAsHMYlekVcj9S-5VxmF4tCowNADo2coIMvTHmZQt23Psw_xcv3nKXDYrdHTay2g1KNlaWqbjdDX7sM/s1600/step25.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUy-To39ekAmQ-SwlOrwVqHiGxhkMO_v2PIAISAiqrxc8fIKvvSelO7ytuknCRCAsHMYlekVcj9S-5VxmF4tCowNADo2coIMvTHmZQt23Psw_xcv3nKXDYrdHTay2g1KNlaWqbjdDX7sM/s400/step25.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;接下來我們還需要產生一個External Reference，讓我們可以將資料寫到檔案之中，請從右手邊的Component Palette中托放一個File Adapter至External References區域之中。JDeveloper接著會自動啟動File Adapter Wizard，第一步驟是指定此服務名稱，我們姑且叫他 &quot;ProcureService&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiikUYukWv-i5LgSwNouVFW6NYiqwVIaHfBCzAHncjTlf2B_1rbmK2nKB0fC3i5TIFfS_ZHu6rcD6cMFrYzsCINJL14PzkranDH-CrDkEYoMN3tO4pt73a7AJWqcbHIoYbh76tes0TN0Ls/s1600/step26.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiikUYukWv-i5LgSwNouVFW6NYiqwVIaHfBCzAHncjTlf2B_1rbmK2nKB0fC3i5TIFfS_ZHu6rcD6cMFrYzsCINJL14PzkranDH-CrDkEYoMN3tO4pt73a7AJWqcbHIoYbh76tes0TN0Ls/s400/step26.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;連按兩個Next，來到Operation步驟，此步驟是指定此File Adapter是做讀檔、寫檔還是等待檔案的動作，根據我們的需求，選擇Write File，並按下Next。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikwhG-h2IS7n2GObfeK0ncaDWcq0d4wOmKzlENYgt0w8CLv5ZZ70r11Hf78v6UUqTYiSQlFRjIv8HM4y0BzxcJST91acMt61XMZtEIrx_qNfr7U00ABu-m2XejbMH_KdEZD5BSphBxJsk/s1600/step27.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikwhG-h2IS7n2GObfeK0ncaDWcq0d4wOmKzlENYgt0w8CLv5ZZ70r11Hf78v6UUqTYiSQlFRjIv8HM4y0BzxcJST91acMt61XMZtEIrx_qNfr7U00ABu-m2XejbMH_KdEZD5BSphBxJsk/s400/step27.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;指定你所希望檔案被寫出的目錄，以及檔案名稱，在這我是指定檔案輸出到&quot;f:\tmp&quot;目錄之下，並指定檔案名稱為&quot;procure_%SEQ%.xml&quot; (注意：這裡的%SEQ%代表的系統會自動產生序號，你也可以指定檔名根據時間來產生，如：procure_%yyMMddHHmmss%.xml)，按下Next。&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj22qRjS61PzPjlAaDSEFC9th2mM6LTVcVRiEPB3NoLQSKH0IzMfoJIirg4CS79E-cUSY4memWS0wcQD0RxORxvZNPoapbl4xY5I2CPEYD4fClC9Xg9CCAU-ZOLMG_Vc3TaCbdnyHLNLWU/s1600/step28.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj22qRjS61PzPjlAaDSEFC9th2mM6LTVcVRiEPB3NoLQSKH0IzMfoJIirg4CS79E-cUSY4memWS0wcQD0RxORxvZNPoapbl4xY5I2CPEYD4fClC9Xg9CCAU-ZOLMG_Vc3TaCbdnyHLNLWU/s400/step28.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;此步驟可指定檔案寫出的格式，我們希望直接寫出XML格式的檔案，因此請直接按下旁邊的放大鏡按鍵，並在Type explorer中選出 &quot;procurement.xsd&quot; --&amp;gt; &quot;procurement&quot;。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1bBV2W_QIYYssKxkCMaH9R3E9O7gSHPksLk7ZGjkHUJrWytfgG0LAlSYGFTOmAvEzg94tztUmh6Vwi_-r_JOdablWByPiko3MAcQ_9AJY0fklfsCTSVmfw3I_IkQtFv7apjooCIfELkY/s1600/step29.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1bBV2W_QIYYssKxkCMaH9R3E9O7gSHPksLk7ZGjkHUJrWytfgG0LAlSYGFTOmAvEzg94tztUmh6Vwi_-r_JOdablWByPiko3MAcQ_9AJY0fklfsCTSVmfw3I_IkQtFv7apjooCIfELkY/s400/step29.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Next之後就可以Finish了! 完成之後，你在Composite中可以看到這樣的圖形，多了一個ProcureService的File Adapter在External References之中。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_0HSPiFzj7JuBH1ENsaoq6_wqFILKwBRyfwEOh1qLr2gCaj4t3Us5a5oQcg0Iq6sY3bR_mJXruTMMBiYqaAwkuSJbMwRCCiJaS4UF0mdRutfp110-UTB8QnQ-ber8UArSSHnlsreo5l8/s1600/step30.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_0HSPiFzj7JuBH1ENsaoq6_wqFILKwBRyfwEOh1qLr2gCaj4t3Us5a5oQcg0Iq6sY3bR_mJXruTMMBiYqaAwkuSJbMwRCCiJaS4UF0mdRutfp110-UTB8QnQ-ber8UArSSHnlsreo5l8/s400/step30.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Double-click Composite中的ProcurementProcess，進入ProcurementProcess的BPMN流程圖，double-click &quot;Save Procurement&quot; 這個Service Activity，選擇Implementation頁簽，在Service Task的Implementation下拉選單中，選擇Service Call。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxom8scFkIWNKX5KfOteAws16banRyl0zA9sqSckkYBDetNyXy5Qza51-BZZ7fHwm-i0D6C80cPR5VxF60yr2fPCMm5ZLDzbua5ixHwBlOHIdlej-wOjO41PfGeYue_P9Tu-sOAcdOxzM/s1600/step31.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxom8scFkIWNKX5KfOteAws16banRyl0zA9sqSckkYBDetNyXy5Qza51-BZZ7fHwm-i0D6C80cPR5VxF60yr2fPCMm5ZLDzbua5ixHwBlOHIdlej-wOjO41PfGeYue_P9Tu-sOAcdOxzM/s400/step31.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
按下放大鏡，並選擇剛才所產生的ProcureService，並按下OK。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLtADPl-Cz5JXjpPBXOkH0bhF4vf2wv3eaGLA_vEDbM4DAnXY9Wp46WlyomlD04vvw2tJiTwFbuWSBgbL7kZQV3dJXP8W6QojbPyM7E9h6UUEU5_r6GyUqQPtUhZC4SjaiNQg5-Uyq-Q4/s1600/step32.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLtADPl-Cz5JXjpPBXOkH0bhF4vf2wv3eaGLA_vEDbM4DAnXY9Wp46WlyomlD04vvw2tJiTwFbuWSBgbL7kZQV3dJXP8W6QojbPyM7E9h6UUEU5_r6GyUqQPtUhZC4SjaiNQg5-Uyq-Q4/s400/step32.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;選取Data Association中Use Associations旁邊的鉛筆按鍵，這步驟會定義流程變數如何被傳遞至ProcureService中，如下圖，你只需要將右手邊ProcurementProcess裡面的procurement變數托放到左手邊的Input欄位即可。接著就是一路OK到看到BPMN流程，這時，你會發現&quot;Save Procurement&quot; Activity上面的黃色驚嘆號也不見了。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjswzOLeOSJ91PYXqXbtotwbFruvxcAuMfSBzgC5bbpruNQ6UiTmYes_cHJibJQEIlT9ddUI4YMgWvZBp0bbzfLxH965KnEUO8t3v8JMaHdaMZ9XsVOSZn2-U2ElUsk99cIeZkquAelAaw/s1600/step33.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjswzOLeOSJ91PYXqXbtotwbFruvxcAuMfSBzgC5bbpruNQ6UiTmYes_cHJibJQEIlT9ddUI4YMgWvZBp0bbzfLxH965KnEUO8t3v8JMaHdaMZ9XsVOSZn2-U2ElUsk99cIeZkquAelAaw/s400/step33.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;恭喜你! 你的流程已經開發完成了!&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;部署流程&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
右鍵FirstBPM目錄 --&amp;gt; Deploy --&amp;gt; FirstBPM，選擇Deploy to Application Server。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwwi35-q9oZ5MvJxt45p1TfvGfJnAYi7shcRSzo7E8-UP14hnBDXVnv65YgcSIJEjGWjvHSOjiEsWDGEXZht47Z6tSIOKo5cXjULCERMXAJAQeqfmk_kLvRxQFOew9vbKgWv0MMU9RgpY/s1600/step34.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwwi35-q9oZ5MvJxt45p1TfvGfJnAYi7shcRSzo7E8-UP14hnBDXVnv65YgcSIJEjGWjvHSOjiEsWDGEXZht47Z6tSIOKo5cXjULCERMXAJAQeqfmk_kLvRxQFOew9vbKgWv0MMU9RgpY/s400/step34.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
此處，你可以於Revision ID處指定部署的流程版本資訊，並記得，如果你不是第一次部署此版本的流程(此版本的流程已經被部署過，現在需要覆蓋過去)的情形，請勾選 &quot;Overwrite any existing composites with the same revision ID&quot;，按下Next。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAQUhhoTzd7v0QDi6i6gmYGjvn3sDs4vaNGFsNnruBCZNTEYgRZC1mtTkf03OMJohwwxDj2YgtNFs0-VrgXaZ9Tw63uhvLeHbCMlXbs4q1oAc5GYyKcAL8Q8XfOv5ydzMG5jvZZKxUtyo/s1600/step35.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAQUhhoTzd7v0QDi6i6gmYGjvn3sDs4vaNGFsNnruBCZNTEYgRZC1mtTkf03OMJohwwxDj2YgtNFs0-VrgXaZ9Tw63uhvLeHbCMlXbs4q1oAc5GYyKcAL8Q8XfOv5ydzMG5jvZZKxUtyo/s400/step35.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;選好所有之前所產生的FirstBPMUI Project，指定Application Name為 &quot;FirstBPMUI&amp;nbsp;&quot;，並勾選 &quot;Overwrite existing application&quot; (同樣的，這是為了覆蓋過之前產生過的UI Application)，按下Next。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ2bLQZUi4KWjH_BalzG5E0fM0bwnvlIrdgdSIItdC4S_sq8mJEIbeDWJBjzOrKZcWGvgJPqjG_lopOkryStj_JK_dRqM1RVsbMTKrQLWlHFzXdOa5-p6qeYSO1Txam45e2PgAVI8KXKE/s1600/patch9.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ2bLQZUi4KWjH_BalzG5E0fM0bwnvlIrdgdSIItdC4S_sq8mJEIbeDWJBjzOrKZcWGvgJPqjG_lopOkryStj_JK_dRqM1RVsbMTKrQLWlHFzXdOa5-p6qeYSO1Txam45e2PgAVI8KXKE/s400/patch9.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;接下來會選擇你所欲部署的BPM server位置，按下綠色加號按鍵，給定連接名稱、帳號密碼、WebLogic hostname、port與domain名稱之後你就完成了BPM server的連線 (懶得貼畫面了，相信大家能夠搞定這部分，哈哈)，這步驟只需要做一次，下一次的部署或其他專案的開發都可以再利用這個BPM server連線。選擇你剛才所建立的連線，並按下Next。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaMmQcSmOVH02PLzrilZGN5cqspBtxBKBafW0zV7mY6CEbrS9mdQN2yGpUKPm2TxMrJ7v_zs1y181a3oB86zqU1nYttopqyobFQc2IgIZJXGkb7FSSDouEs9mPiWVmQPTVKF3oBV1aDyk/s1600/step37.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaMmQcSmOVH02PLzrilZGN5cqspBtxBKBafW0zV7mY6CEbrS9mdQN2yGpUKPm2TxMrJ7v_zs1y181a3oB86zqU1nYttopqyobFQc2IgIZJXGkb7FSSDouEs9mPiWVmQPTVKF3oBV1aDyk/s400/step37.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;選擇default partition，按下Finish，此時JDeveloper會開始部署流程以及他相關的UI Project，請耐心等候。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifSvXdnQcuU7zx79CFT0HEPvm8EUQgBCvorsXSiTuAc-rzoWL6oxrRJFKGhYLjoBAJVZ6nGiiHTddRS7R918uDYrsjIaVQeWQzZiHhF21Bg_H3Wk3wC66mpiLq_EtdzGO1BRlK793C3SM/s1600/step38.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifSvXdnQcuU7zx79CFT0HEPvm8EUQgBCvorsXSiTuAc-rzoWL6oxrRJFKGhYLjoBAJVZ6nGiiHTddRS7R918uDYrsjIaVQeWQzZiHhF21Bg_H3Wk3wC66mpiLq_EtdzGO1BRlK793C3SM/s400/step38.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;流程測試&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;這一個範例我們是使用Oracle BPM Workspace做為使用者介面，先連上你的BPM Workspace來看看吧! BPM Workspace的URL是: &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;http://&amp;lt;your_hostname&amp;gt;:&amp;lt;your_port&amp;gt;/bpm/workspace&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;首先，使用你的User角色的使用者登入，你可以看到像是這樣的畫面&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJxZtYBfsNYmpZL5WWtz2gMyRL8KUOBUhiRGF_LwQNz4b9UFdcE0jjbloy7fDLrwjTT28PiITmeMcEKQRfV3PBtWBJiMW7vvC9eJPnQ3b12_EOOH3I5OGVyzLZiTbrYfkgxdyJOMIj9iA/s1600/step39.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;287&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJxZtYBfsNYmpZL5WWtz2gMyRL8KUOBUhiRGF_LwQNz4b9UFdcE0jjbloy7fDLrwjTT28PiITmeMcEKQRfV3PBtWBJiMW7vvC9eJPnQ3b12_EOOH3I5OGVyzLZiTbrYfkgxdyJOMIj9iA/s400/step39.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;有注意到嗎? 在左上角應用程式的部分，你可以看到你剛才所部署的ProcurementProcess v.10版，只要是屬於這個User角色的人登入都會可以看到這個Link，按下去之後會跳出剛才我們透過JDeveloper所自動產生的UI介面供使用者輸入資料：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdu_gHoudvUwRA2Pc8TWBhslPuM-YmsVWWUsU15WtxVRG5ij6hE_lQ5OdKnvFCtQH-t9B6h9YpkP4FHAJZm0DO4JvzU6icExBYxy7GpJ7FSs_-mldQE6xRATuJedZBLtGn8EenJzijR5U/s1600/step40.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;323&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdu_gHoudvUwRA2Pc8TWBhslPuM-YmsVWWUsU15WtxVRG5ij6hE_lQ5OdKnvFCtQH-t9B6h9YpkP4FHAJZm0DO4JvzU6icExBYxy7GpJ7FSs_-mldQE6xRATuJedZBLtGn8EenJzijR5U/s400/step40.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;輸入完畢之後按下SUBMIT就完成了這一關卡的動作了，請特別注意，上面所列出來的SUBMIT按鈕就是之前我們在定義此人工作業所指定的Outcome。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;趁這個機會我們也看一下管理介面吧，Oracle BPM提供管理人頭透過管理介面看到每一個Process Instance的執行狀況與歷程。管理介面登入的URL是：&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;http://&amp;lt;your_hostname&amp;gt;:&amp;lt;your_port&amp;gt;/em&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;開啟一個新的browser連接此URL，並以管理人員登入 (e.g. weblogic)，依序點開在左手邊的 &quot;Farm_bpm_domain&quot; --&amp;gt; &quot;SOA&quot; --&amp;gt; &quot;soa-infra&quot; --&amp;gt; &quot;default&quot; --&amp;gt; &quot;FirstBPM&quot;，你應該可以看到系列的畫面，正中央就會有顯示你剛才執行的Process Instance，標示為執行中。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjArkpRbM_Jo97i9gLbk5hxXCjXlsCNS_pqBbtplmTfts9SsxgzgUiFQtJB3xkgq508Rl4VYXNMA-UXYOND1foF0l5gh-qQmrz_b2_Hy4GvixAV7j5XnaMw_d0FNFQsIEkbd0HU6mjsbhE/s1600/patch10.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;287&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjArkpRbM_Jo97i9gLbk5hxXCjXlsCNS_pqBbtplmTfts9SsxgzgUiFQtJB3xkgq508Rl4VYXNMA-UXYOND1foF0l5gh-qQmrz_b2_Hy4GvixAV7j5XnaMw_d0FNFQsIEkbd0HU6mjsbhE/s400/patch10.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;選取該執行中Process Instance的執行處理ID，你可以看到Process Instance的內容component，要細看流程的話，請選取 &quot;ProcurementProcess&quot;。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLMzDijbjeW37qdi19T_4omgtKowbdny1XoTx_kRzCojncP0POy-LkZDt9vNO2bwM3vqirEFYQ12gTHz6nVuacpGfcjt8bYNPV5ESV4-NRfmmO0zg6_9n1Vvl-aU1R_ZSHtsgQZ_MGdN8/s1600/patch11.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;275&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLMzDijbjeW37qdi19T_4omgtKowbdny1XoTx_kRzCojncP0POy-LkZDt9vNO2bwM3vqirEFYQ12gTHz6nVuacpGfcjt8bYNPV5ESV4-NRfmmO0zg6_9n1Vvl-aU1R_ZSHtsgQZ_MGdN8/s400/patch11.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;管理人員可以依照表單式的與圖形式的歷程紀錄看到流程執行的情形，注意，你會發現流程現在停在 &quot;Approve Procurement&quot; 的步驟。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVNFEteDLFCd2e6x9tMFH2wQDDtZJn-JVWFlg7uItbhiSVJgGKGn7PfIdBQ-XTGqeRcYaZA-kEwQTWlieP5DX1tNI3d6j5tLlT1i2p_BSJkXhTyd9BAdBq6Qt2M7S9rHpvAtEUi1jFIfw/s1600/patch12.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;275&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVNFEteDLFCd2e6x9tMFH2wQDDtZJn-JVWFlg7uItbhiSVJgGKGn7PfIdBQ-XTGqeRcYaZA-kEwQTWlieP5DX1tNI3d6j5tLlT1i2p_BSJkXhTyd9BAdBq6Qt2M7S9rHpvAtEUi1jFIfw/s400/patch12.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP-2I5RLdFEJQHljQ2jHwBAiJ_mQQMA8SGkpmapsDb3hnngpHZE3HmtngqPrVSy6nDiM3jGij1FpNrhRGKUlI2KvPnTBJg2YuEhJvdL_BcMpnXpaT6d4dYYcbz54OT4LmVQ3m3skxy6tw/s1600/patch13.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;275&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP-2I5RLdFEJQHljQ2jHwBAiJ_mQQMA8SGkpmapsDb3hnngpHZE3HmtngqPrVSy6nDiM3jGij1FpNrhRGKUlI2KvPnTBJg2YuEhJvdL_BcMpnXpaT6d4dYYcbz54OT4LmVQ3m3skxy6tw/s400/patch13.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;接下來，你可以用Manager角色再登入BPM Workspace，完成流程!&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs8he6j7hUAYfhj69UstNqmnaOFabJQ_r4HZ5TwC8niCDsmW1CYVSPuTsAMvmCvYZAzy44CdSiYSntcB4OtGSeqHqkpERTTygoLptww3GFXgpmuWnb-gQYoaB-0ILwx3aLQBy-ihyphenhyphengSJI/s1600/patch14.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;287&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs8he6j7hUAYfhj69UstNqmnaOFabJQ_r4HZ5TwC8niCDsmW1CYVSPuTsAMvmCvYZAzy44CdSiYSntcB4OtGSeqHqkpERTTygoLptww3GFXgpmuWnb-gQYoaB-0ILwx3aLQBy-ihyphenhyphengSJI/s400/patch14.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;再次恭喜你! 你已經完成流程的設計了!&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/8064554366068372872/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/8064554366068372872' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/8064554366068372872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/8064554366068372872'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/01/oracle-fusion-middleware-bpm.html' title='[Oracle BPM/SOA 基礎] 第一個BPM流程'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJBaUSy6axJ3XLcgW-pOKbnNVNX0Go2kssP5gDXkXzWU45K79gn32Wttr1wj4SBrG484yks09wg-Jn6q2zTunrexypxP5NTDsF8W1SHF6rhCd6jw3DZ-Qnq8ZuC4p2o1zmhdxRBUfZ8ak/s72-c/step1.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-3845543137117023505</id><published>2011-01-27T16:29:00.000+08:00</published><updated>2011-01-28T09:38:19.965+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>[Oracle BPM/SOA 基礎] 如何增加使用者至BPM Server中</title><content type='html'>在Oracle BPM中，參與流程的使用者需先被定義於BPM Server之中，而BPM的使用者資料來源為何哩? 來自於底層的WebLogic Server的security realm!!&lt;br /&gt;
&lt;br /&gt;
WebLogic security realm中使用者資料可以來自很多地方，預設是使用WebLogic本身所embbed的一個LDAP server，當然你也可以config WebLogic讓他連到外面的LDAP Server或是特定Schema的database之中，但這不在我們的討論範圍之中，此文章我要介紹你如何在自己的開發環境之中，使用WebLogic embbed LDAP server，並新增測試所需要的使用者在此server之中。&lt;br /&gt;
&lt;br /&gt;
首先，先把使用者給產生出來。連入WebLogic console，新增你所需要的使用者。(不知道怎麼做嗎? 提示一下：&quot;安全範圍&quot; --&amp;gt; &quot;myrealm&quot; --&amp;gt; 使用者與群組 --&amp;gt; &quot;使用者&quot; --&amp;gt; &quot;新建&quot;)&lt;br /&gt;
&lt;br /&gt;
接下來，這個使用者有些BPM所需要的資訊是存放在LDAP tree之中的(如：工作通知時的使用者email帳號、使用者顯示的名稱、使用者的直屬上司是誰...等)，既然他是LDAP Server，我們就應該可以透過標準的LDAP連進去修改他囉? 沒錯! 這是可以的，只是要解除預設的封印!&lt;br /&gt;
&lt;br /&gt;
首先你需要連接到WebLogic Console，在網域結構中按下你的bpm_domain，在右方的頁簽中選擇 &quot;安全性&quot; --&amp;gt; &quot;嵌入式LDAP&quot;。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdxpZqiY7lnA1n6ZdsiOA777xoR55Mxoy-YLyf3iS4p_zPuFYGG4H9O0ayTUDIvMwRFY2ZdQr1Kk1kj5WB-xxUS3yl49sLk38yuEEsCg26VifJSSSKeoLYFYPR4amrZGwLD2cPVKuty6s/s1600/WLSconsole.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;287&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdxpZqiY7lnA1n6ZdsiOA777xoR55Mxoy-YLyf3iS4p_zPuFYGG4H9O0ayTUDIvMwRFY2ZdQr1Kk1kj5WB-xxUS3yl49sLk38yuEEsCg26VifJSSSKeoLYFYPR4amrZGwLD2cPVKuty6s/s400/WLSconsole.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;將你喜歡的密碼打入【證明資料】與【確認證明資料】，儲存之後重新開啟server。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;接下來，你需要一個LDAP browser讓你連接進WebLogic embbed LDAP server，我個人是使用JXplorer，你可以從&lt;a href=&quot;http://jxplorer.org/&quot;&gt;這裡&lt;/a&gt;下載免費的版本。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;WebLogic embbed LDAP server連接的方式是走標準的WebLogic Server的IP與port，預設7001(請根據你的環境修改)，連接的DN為cn=Admin，密碼是你剛才所設定在【證明資料】的值。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbaE8lNfZoAiIkK37mwqbtRAzlyuMDUhBdaFZsqzJOuMb7j9WCBV0vujuzDncaOqGInxZ2LTw9cZ9BsCv6kQX_bTtyhoRmQVrg9iWMrhi9QrQNKGf7GutgcDY4dVDxOBmfnaVccxQsh9Q/s1600/jxplorer1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbaE8lNfZoAiIkK37mwqbtRAzlyuMDUhBdaFZsqzJOuMb7j9WCBV0vujuzDncaOqGInxZ2LTw9cZ9BsCv6kQX_bTtyhoRmQVrg9iWMrhi9QrQNKGf7GutgcDY4dVDxOBmfnaVccxQsh9Q/s400/jxplorer1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;接下來，你就可以針對你剛才所新增的使用者，另外增加其他的必要資訊了!&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK1yVVQfejQ5sBhoIZePH5HFXvskRaC4wg4FUC7zbf4i5d_pVjPk4a6E9uJkVb_ynSKwrsG3kOR9vnZ8Y4Tq8CesXNn1wTcd9kuCEwBQC-tdgfk4dbE2nqTmXfd9aU7R3-90X23hF9wCo/s1600/jxplorer2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK1yVVQfejQ5sBhoIZePH5HFXvskRaC4wg4FUC7zbf4i5d_pVjPk4a6E9uJkVb_ynSKwrsG3kOR9vnZ8Y4Tq8CesXNn1wTcd9kuCEwBQC-tdgfk4dbE2nqTmXfd9aU7R3-90X23hF9wCo/s400/jxplorer2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/3845543137117023505/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/3845543137117023505' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/3845543137117023505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/3845543137117023505'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/01/oracle-fusion-middleware-bpm-server.html' title='[Oracle BPM/SOA 基礎] 如何增加使用者至BPM Server中'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdxpZqiY7lnA1n6ZdsiOA777xoR55Mxoy-YLyf3iS4p_zPuFYGG4H9O0ayTUDIvMwRFY2ZdQr1Kk1kj5WB-xxUS3yl49sLk38yuEEsCg26VifJSSSKeoLYFYPR4amrZGwLD2cPVKuty6s/s72-c/WLSconsole.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-7755230217050048555</id><published>2011-01-26T17:03:00.000+08:00</published><updated>2011-01-28T09:37:53.816+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>[Oracle BPM/SOA 基礎] BPM/SOA Server JVM參數設定</title><content type='html'>由於Oracle BPM/SOA對於記憶體的需求若渴，因此JVM參數的設定會相當程度影響server執行的效能。&lt;br /&gt;
&lt;br /&gt;
對於64-bit JVM, 我會建議如果可以的話，將Heap size設定至少大於2048m，PerGen Space設定為512m~768m。&lt;br /&gt;
&lt;br /&gt;
要更動SOA啟動的JVM參數，你可以修改&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;Domain&amp;gt;\bin\setSOADomainEnv.cmd&lt;/span&gt;檔案。&lt;br /&gt;
&lt;br /&gt;
64-bit JVM需找出&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;PORT_MEM_ARGS&lt;/span&gt;，32-bit則修改&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;DEFAULT_MEM_ARGS&lt;/span&gt;參數，下面是我的8G RAM Windows 7的BPM環境設定，提供給各位參考：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;set JAVA_OPTIONS=%JAVA_OPTIONS%&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;set DEFAULT_MEM_ARGS=-Xms512m -Xmx1024m&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;set PORT_MEM_ARGS=-Xms3200m -Xmx3200m&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if &quot;%JAVA_VENDOR%&quot; == &quot;Oracle&quot; goto OracleJVM&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;set DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=128m -XX:MaxPermSize=512m&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;set PORT_MEM_ARGS=%PORT_MEM_ARGS% -XX:PermSize=512m -XX:MaxPermSize=768m&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
另外，如果你開發的過程中遇到JDeveloper太慢或complain記憶體問題，你也可以透過修改編輯&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;Middleware_Home&amp;gt;\jdeveloper\ide\bin\ide.conf&lt;/span&gt;檔案，以變更JDeveloper所使用的JVM參數：&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;AddVMOption &amp;nbsp;-Xmx1280M&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;AddVMOption &amp;nbsp;-Xms512M&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/7755230217050048555/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/7755230217050048555' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/7755230217050048555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/7755230217050048555'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/01/oracle-fusion-middleware-bpmsoa-server.html' title='[Oracle BPM/SOA 基礎] BPM/SOA Server JVM參數設定'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8252421586595387612.post-4623378004400411941</id><published>2011-01-26T16:38:00.001+08:00</published><updated>2011-02-12T09:33:48.095+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>[Oracle BPM/SOA 基礎] 安裝BPM/SOA Suite 11gR1PS3</title><content type='html'>這是小弟一系列Oracle Fusion Middleware教學文件的第一站，有鑑於網路上面鮮有繁體中文版本的Fusion Middleware技術資料，本系列文章將會針對整個Fusion Middleware各種不同產品提供說明。&lt;br /&gt;
&lt;br /&gt;
本文先針對Business Process Management (BPM) 與Service-Oriented Architecture (SOA)這部分產品安裝進行說明。在安裝之前，各位請先花一點時間看一下簡單的產品架構說明，這會幫助各位了解產品安裝過程的各個步驟。&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;架構說明&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
首先，Oracle Fusion Middleware產品線的主要使用Java做為核心語言，也因此，幾乎所有的產品底層都會需要一個application server(OSGi或非集中化架構的除外)，Oracle採用的是WebLogic Server做為此底層JEE Container，這也是待會在執行安裝步驟之時，你會需要先進行WebLogic Server安裝的主要原因。&lt;br /&gt;
&lt;br /&gt;
而針對【整合】這個主題，Oracle的核心產品就是SOA Suite，如下圖所示，簡單來說他是一個套餐產品，內容包含了企業內部在整合多個現存系統所需要的元件：BPEL、Mediator、Service Bus、Rule Engine、人工流程、B2B與BAM... 等等。這些元件在跨系統整合過程中各自扮演了不同的角色，我也將在這一系列的之後技術文章簡單介紹各主要元件的使用。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgff4WB6kKGpcr42enC_Lq9cyXn8fp3Xobj09r25dASyeJcwBDC13SaZcuzWpGTQ9J3FvlZhJmOJNyyWxW-RvdWka5IR4SU6xV-KD8yl6wEa1IYNGpWU2x8lwKYvL9mmLVSRWTEh_iAwyA/s1600/SOASuite.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgff4WB6kKGpcr42enC_Lq9cyXn8fp3Xobj09r25dASyeJcwBDC13SaZcuzWpGTQ9J3FvlZhJmOJNyyWxW-RvdWka5IR4SU6xV-KD8yl6wEa1IYNGpWU2x8lwKYvL9mmLVSRWTEh_iAwyA/s400/SOASuite.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;那SOA又怎麼會和BPM扯在一起呢?&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Oracle對於BPM產品的概念是：商業流程本身除了人工作業之外，也存在了許多現有系統的作業整合，也因此，BPM基本上與SOA算是互補的概念：SOA需要在企業中找到一個清楚的需求定位，在這部分BPM可以做為一清晰的需求與藍圖；相對的，BPM在落實的階段需要一個現存系統作業整合的實踐，在這部分SOA提供了完整的協助。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;因此，Oracle的BPM產品採用了基於SOA產品做為底層的一種設計架構，你可以看到這張架構圖中，中間核心的部分是由SOA架構那邊偷來的：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi41A4LVR6JeWC15hAtJsDY5rv5wTFCMpxrPjh1anNK_SCo_Y9vLKIgEnc5cr-YtTPI1LiXdIfdHnJ90obLK4qRSyFliqXRj5eGw6WCGoVBAjAzG8800iupMgJac1zCS9_TXdFiBd8l1zc/s1600/BPM.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;216&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi41A4LVR6JeWC15hAtJsDY5rv5wTFCMpxrPjh1anNK_SCo_Y9vLKIgEnc5cr-YtTPI1LiXdIfdHnJ90obLK4qRSyFliqXRj5eGw6WCGoVBAjAzG8800iupMgJac1zCS9_TXdFiBd8l1zc/s400/BPM.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;開始安裝吧!&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;安裝之前，請先確認你的系統環境，由上面所提供的架構圖中你不難猜到，這個產品本身的memory footprint應該不小，基本上我會強烈建議各位採用&lt;b&gt;64-bit的OS環境&lt;/b&gt;，配合&lt;b&gt;最少4GB記憶體&lt;/b&gt;做為你的開發用環境。開發過程中你將會需要一個IDE -- JDeveloper(開發用... 廢話!)，一個database(紀錄流程執行與歷史資料所需)，以及一個開發server(SOA/BPM Suite 的instance，沒錯... 現在的版本你沒辦法在IDE上面直接測試，一定要一個server作部署與測試)。你可以在&lt;a href=&quot;http://www.oracle.com/technetwork/middleware/ias/downloads/fusion-certification-100350.html&quot;&gt;這邊&lt;/a&gt;找到Oracle的system configuration certification。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;我的安裝步驟範例將會以Windows 7 + Oracle DB 11gR2作為基準，並且按照下列步驟安裝產品：下載所有產品 --&amp;gt; JDK安裝 --&amp;gt; 資料庫儲存庫設定 --&amp;gt; 開發server安裝 --&amp;gt; IDE安裝 --&amp;gt; 驗證安裝&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;下載所有產品&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;你需要下載下列的軟體已執行安裝。(請注意：Oracle所有產品你都可以在OTN網站免費下載測試使用，你可以在&lt;a href=&quot;http://www.oracle.com/technetwork/middleware/bpm/downloads/index.html&quot;&gt;這邊&lt;/a&gt;找到BPM11gR1PS3版本產品下載的連接，&lt;a href=&quot;http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html&quot;&gt;這裡&lt;/a&gt;找到Oracle DB的產品下載)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;JDK 64-bit：到&lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/index.html&quot;&gt;這邊&lt;/a&gt;找個最新的版本吧。&lt;/li&gt;
&lt;li&gt;RCU (Repository Creation Utility)：GUI應用程式，安裝BPM/SOA所需schema到你的資料庫之中，你會需要到Window 32bit JVM的選項之下才看得到下載的位置。&lt;/li&gt;
&lt;li&gt;WebLogic Server generic版：64bit Windows的安裝檔。&lt;/li&gt;
&lt;li&gt;SOA Suite：有兩個大檔案...&lt;/li&gt;
&lt;li&gt;JDeveloper：IDE.... again... 廢話....&lt;/li&gt;
&lt;li&gt;JDeveloper extension：你需要兩個extension來開發BPM/SOA流程，SOA extension與BPM extension。&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;JDK安裝&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;這部分不用說明吧...&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;資料庫儲存庫設定：&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;基本上Oracle SOA/BPM Suite現在支援Oracle DB、MS SQL與IBM DB2做為後端的資料庫主機，在此我不描述資料庫的安裝步驟，你可以選擇任何一個你習慣的資料庫來安裝，也可以沿用你現有的資料庫，省掉資料庫安裝的步驟，只是請注意，你的資料庫需要符合特定Oracle BPM/SOA產品所需的版本。&lt;/div&gt;&lt;ol&gt;&lt;li&gt;解壓縮&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ofm_rcu_win_11.1.1.4.0_disk1_1of1.zip&lt;/span&gt;檔至&amp;lt;rcuHome&amp;gt;目錄之中。&lt;/li&gt;
&lt;li&gt;執行&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;rucHome&amp;gt;\BIN\rcu.bat&lt;/span&gt;，你會看到一個圖形化執行介面，執行下一步吧!&lt;/li&gt;
&lt;li&gt;選擇建立儲存領域，下一步。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg68I-qfWkpLqAl6lq8ugkfKMI0c_VTHnsdeCeMUQ8Jm_G5U6p7Kfw-ntBncL0yaO9tWWYHZZWDP4FfJgQgJNHY3j5aaV338Sk0sIak3PnEOa-9yNCKb_twBmxDw8LCt_epZh3KWEK_qnQ/s1600/rcu1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg68I-qfWkpLqAl6lq8ugkfKMI0c_VTHnsdeCeMUQ8Jm_G5U6p7Kfw-ntBncL0yaO9tWWYHZZWDP4FfJgQgJNHY3j5aaV338Sk0sIak3PnEOa-9yNCKb_twBmxDw8LCt_epZh3KWEK_qnQ/s400/rcu1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;根據你資料庫的類型設定對應的連線資訊，下一步。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE6Gjoy48PZwrjZSOtVmfeYsy9oOWOTcHLoViH9Nkk4cWJotjxa6gSTM_4KZ3LHHsSLEbaS787tOBuAnE4TqrvDFXKTLjMvWukell9tMYxG78VAGyg4WpHqQKzlqPPudVNGHZrejs9ZpY/s1600/rcu2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE6Gjoy48PZwrjZSOtVmfeYsy9oOWOTcHLoViH9Nkk4cWJotjxa6gSTM_4KZ3LHHsSLEbaS787tOBuAnE4TqrvDFXKTLjMvWukell9tMYxG78VAGyg4WpHqQKzlqPPudVNGHZrejs9ZpY/s400/rcu2.PNG&quot; style=&quot;cursor: move;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;選擇元件：你只需要打勾起&quot;SOA與BPM Infrastrature&quot;，有一些其他必需的部分會被自動選取，RCU接下來會在你的資料庫中產生四個schema，分別是DEV_ORABAM、DEV_SOAINFRA、DEV_ORASDPM與DEV_MDS，開頭的&quot;DEV&quot;就是你所選定的前置碼。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhimj-uKj7bV0hwVdnFbKrPgbc9FuM8eV72dr7AOAZ-yD-t65VjtDQNQ4XhCU4533LL1vAOdhODhr87m_fo6PStw70EccOsp3GGfd5iRHxPUsSmCiZa6zf4QJqWzSUovTpI0QPebS0nZTg/s1600/rcu3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhimj-uKj7bV0hwVdnFbKrPgbc9FuM8eV72dr7AOAZ-yD-t65VjtDQNQ4XhCU4533LL1vAOdhODhr87m_fo6PStw70EccOsp3GGfd5iRHxPUsSmCiZa6zf4QJqWzSUovTpI0QPebS0nZTg/s400/rcu3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;提供密碼並設定表格空間：這兩個步驟請給定連接schema的密碼，下一步之後，接受所有預設的表格空間設定，再下一步RCU就會自動幫你產生所有的schema。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipgIbArPXxxXku4oRJzJSNvokweUkX1LWkRII0aNiwpnjkX0eeFyf2eDMkTQO5B79DoJX_FL0Yk-UfavXC6o7fIAc8jrNfAuxtAV5NbArceqvP18jl8O06_F-g9NZSqrTaK1bbVvEzhZU/s1600/rcu4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipgIbArPXxxXku4oRJzJSNvokweUkX1LWkRII0aNiwpnjkX0eeFyf2eDMkTQO5B79DoJX_FL0Yk-UfavXC6o7fIAc8jrNfAuxtAV5NbArceqvP18jl8O06_F-g9NZSqrTaK1bbVvEzhZU/s400/rcu4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;開發server安裝:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;如先前架構部分所提到的，BPM/SOA Suite底層是架構在WebLogic Server之上，所以在安裝開發server時需要有三個主要步驟：首先須先把WebLogic Server安裝完成；其次將BPM/SOA Suite安裝至此WebLogic之上；最後一個步驟就是執行configuration wizard產生BPM/SOA執行所需的WebLogic domain，我們一步一步來看看安裝的方式：&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;安裝WebLogic Server&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;執行WebLogic Generic安裝檔&lt;br /&gt;
在command prompt之下執行 &amp;gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; java -jar&amp;nbsp;wls1034_generic.jar&lt;/span&gt;&lt;br /&gt;
在GUI介面出現後選擇&quot;建立新的Middleware本位目錄&quot;，並指定你所要安裝的目錄位置，未來你所延伸安裝的其他Fusion Middleware元件，如BPM/SOA和WebCenter... 等等，都會被放置在此目錄之下&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgkJxrCXML8J-rtJmoeoLPliD9vFSw5CEJhN34DKGPREIqQR8J6Nb9_4fDVmpHf385nfWM6pFnhb6NKQalg9XRtb5OO8yCaKxMealu_FXRlI1FVImz-_Ffs0qKHgY_wABJvRjQTN2kbzY/s1600/soa1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgkJxrCXML8J-rtJmoeoLPliD9vFSw5CEJhN34DKGPREIqQR8J6Nb9_4fDVmpHf385nfWM6pFnhb6NKQalg9XRtb5OO8yCaKxMealu_FXRlI1FVImz-_Ffs0qKHgY_wABJvRjQTN2kbzY/s400/soa1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;註冊安全更新&lt;br /&gt;
既然是測試所用，你可以跳過這一步，不要勾選接受安全更新&lt;/li&gt;
&lt;li&gt;選擇安裝類型&lt;br /&gt;
選一般即可，這樣會安裝WebLogic Server還有Coherence元件(都是SOA必要元件)&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzkGIW3bj9wSommHwTFswY49BrHnmzAuQocqx5TRg8L32eTl86i0DIfGpPhGZme2ohZHxQfyf1me1fBhGFn4f_uxVmGZGXw40wXmZuSKIKFA4ARii9t9XQCYueMe-Sn4sJCwGJ_AI-gDc/s1600/soa2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzkGIW3bj9wSommHwTFswY49BrHnmzAuQocqx5TRg8L32eTl86i0DIfGpPhGZme2ohZHxQfyf1me1fBhGFn4f_uxVmGZGXw40wXmZuSKIKFA4ARii9t9XQCYueMe-Sn4sJCwGJ_AI-gDc/s400/soa2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;JDK選擇&lt;br /&gt;
按下&quot;瀏覽&quot;按鍵，選一下你在一開始所安裝的JDK目錄，此目錄會出現在本地JDK欄位之中&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg815_r6BRK84ETmCgCIHsTBrp1hRTZkJsewvEUOwYWqBcEkDbbZyFVViMdsxJQdd11324vQMxdC6pzVzITrS4JNXi8ceXZEQjv-ofsNgBUdyfalXfnJ92wk9vE4x_I1SA4igMrO58q9pw/s1600/soa3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg815_r6BRK84ETmCgCIHsTBrp1hRTZkJsewvEUOwYWqBcEkDbbZyFVViMdsxJQdd11324vQMxdC6pzVzITrS4JNXi8ceXZEQjv-ofsNgBUdyfalXfnJ92wk9vE4x_I1SA4igMrO58q9pw/s400/soa3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;選擇產品安裝目錄、選擇捷徑位置與安裝摘要&lt;br /&gt;
接下來的這三個步驟，只要接受預設值，按下一步即可。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKOXmsEwQlo6YVIphDq73uIEpBqcJ7lPH7QQvZzRa_W-Hp8FM_-IfU6MKfwgjI-JNv2BqTvz79uFUmNklG2uEZXmRJce8_YrrUYipKDsmp2w9vFG6QX77AXqpBowv60QOTMTVuIOWCit4/s1600/soa4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKOXmsEwQlo6YVIphDq73uIEpBqcJ7lPH7QQvZzRa_W-Hp8FM_-IfU6MKfwgjI-JNv2BqTvz79uFUmNklG2uEZXmRJce8_YrrUYipKDsmp2w9vFG6QX77AXqpBowv60QOTMTVuIOWCit4/s400/soa4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;安裝開始執行，等待囉...&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;安裝BPM/SOA server&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;解壓縮&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ofm_soa_generic_11.1.1.4.0_disk1_1of2.zip&lt;/span&gt;與&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ofm_soa_generic_11.1.1.4.0_disk1_2of2.zip&lt;/span&gt;兩個壓縮檔至同一個目錄，你會在該目錄之下看到Disk1 ~ Disk5五個子目錄。&lt;/li&gt;
&lt;li&gt;執行&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Disk1\setup.exe，此時安裝程式會提問你的&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;JDK/JRE目錄位置，指定為你所安裝的JDK路徑吧!&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;略過【歡迎】與【安裝軟體更新】步驟&lt;br /&gt;
選擇略過軟體更新，並按下一步，在系統通過先決條件檢查之後進入【指定安裝位置】選項。&lt;br /&gt;
如果你之前WebLogic Server有成功備安裝的話，你將可以在Oracle Middleware本位目錄的下拉選單之中選到之前所安裝的middleware本位目錄。下面的Oracle本位目錄代表的就是你SOA Suite將在middleware本位目錄之下所被安裝的目錄位置。以下列畫面為例：我的middleware本位目錄是指定在&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;e:\ofm11gr1ps3&lt;/span&gt;，Oracle本位目錄是在&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Oracle_SOA1&lt;/span&gt;，代表我的BPM/SOA Suite的binary執行檔與library都會被存放在&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;e:\ofm11gr1ps3\Oracle_SOA1&lt;/span&gt;之下 (註：其實還是會有一些其他的目錄會在安裝過程中產生於middleware本位目錄之下，如&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;oracle_common&lt;/span&gt;。但是通常是存放不同元件所共用的檔案，SOA特定資料都會存放在&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Oracle_SOA1&lt;/span&gt;之下)&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyqZm-8SflcmyGyZR0zZ2e62nrq4eMqvq3kPAQrohp8Gazc2Lt__QvO5UwjcWCk6EqTlf7QQQbnlmRf-XD6h8Z0VwiHRawslBs0pG8vaH0ZB7ReDouOGwwzV3pm_quvtAXXxF1XG6DJos/s1600/soa5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;321&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyqZm-8SflcmyGyZR0zZ2e62nrq4eMqvq3kPAQrohp8Gazc2Lt__QvO5UwjcWCk6EqTlf7QQQbnlmRf-XD6h8Z0VwiHRawslBs0pG8vaH0ZB7ReDouOGwwzV3pm_quvtAXXxF1XG6DJos/s400/soa5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;應用程式伺服器&lt;br /&gt;
此步驟將會偵測Middleware本位目錄之中的應用程式伺服器安裝。由於從PS3版本之後，Oracle BPM/SOA開始支援其他廠商的application server做為底層的JEE container (例如：IBM WebSphere)，所以你可以看到畫面之中，安裝程式抓出Middleware本位目錄之中有WebLogic Server安裝於此，若你使用IBM WebSphere做為底層的container，在此畫面之中你將看到WebSphere供你選擇。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilpitJ1Mf762LQiRQBrEKmaGJBzeeQFZ8HOicWCCrAuuXih5EmBiqlKaEKGvS7rO9eufsHHoUxhfA07uOzqJVWWkM0CtiQA9HuDIH6ZxzJKY0NPR5EXRnvKIdU8fvO8actxCSgeZSv3q8/s1600/soa6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;321&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilpitJ1Mf762LQiRQBrEKmaGJBzeeQFZ8HOicWCCrAuuXih5EmBiqlKaEKGvS7rO9eufsHHoUxhfA07uOzqJVWWkM0CtiQA9HuDIH6ZxzJKY0NPR5EXRnvKIdU8fvO8actxCSgeZSv3q8/s400/soa6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;安裝摘要&lt;br /&gt;
就看一下，按下安裝就可以開始等待了...&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYgcsMd3j79DsJYpHf4w4dzkeXgLBnoRPbCtfK_vhbSLGpNO6jksxGtocS49-27wJpei8ZUo_-nhdSYLPSHyzhgtYX5hwDx35HzWCbi28AwxiI5wHLGkvInEYyUaXtQGILrjrdGdCXkK8/s1600/soa7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;321&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYgcsMd3j79DsJYpHf4w4dzkeXgLBnoRPbCtfK_vhbSLGpNO6jksxGtocS49-27wJpei8ZUo_-nhdSYLPSHyzhgtYX5hwDx35HzWCbi28AwxiI5wHLGkvInEYyUaXtQGILrjrdGdCXkK8/s400/soa7.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;b&gt;產生BPM/SOA所需的domain&lt;/b&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;執行configuration wizard&lt;br /&gt;
在command prompt中執行&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;Middleware_Home&amp;gt;\wlserver_10.3\common\bin\config.cmd&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;選擇新增WebLogic網域&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbzFaa0X4K95A376tBZQfumkkslLswKku8-O82stvTrKxlELZjd3U393wUDVUfH8MmjyOllUpHA1MBhbsDm4c0SGHfs7poObyz-d1xwUN3qTzxPyI_soOlOKaf65bn44NX5p25wDlB3Cg/s1600/config1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbzFaa0X4K95A376tBZQfumkkslLswKku8-O82stvTrKxlELZjd3U393wUDVUfH8MmjyOllUpHA1MBhbsDm4c0SGHfs7poObyz-d1xwUN3qTzxPyI_soOlOKaf65bn44NX5p25wDlB3Cg/s400/config1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;選取網域來源&lt;br /&gt;
記得勾選 &quot;Oracle BPM Suite for developers - 11.1.1.0 [Oracle_SOA1]&quot; 以及 &quot;Oracle Enterprise Manager - 11.1.1.0 [oracle_common]&quot;，其他必須的componet將會被自動勾選。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQUdrIeMT8xFOsfu5EfNDA1xI7ojAHfW4UmVBn2Doy6N1eynyBFDPMugMIY0O_spshyOZkGTuvMbjzgvIHkY6Xba4HWSymeZRIUMRiwLkBWAY56qJ6bQo2SikBDOlSVF8gExVdKUsZqpo/s1600/config2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQUdrIeMT8xFOsfu5EfNDA1xI7ojAHfW4UmVBn2Doy6N1eynyBFDPMugMIY0O_spshyOZkGTuvMbjzgvIHkY6Xba4HWSymeZRIUMRiwLkBWAY56qJ6bQo2SikBDOlSVF8gExVdKUsZqpo/s400/config2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;指定網域名稱與位置&lt;br /&gt;
給一個你喜歡的網域名，這邊我所使用的是bpm_domain，預設的網域位置將被放在你的&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;Middleware_Home&amp;gt;\user_projects\domains&lt;/span&gt;之下。這邊特別說明一下，Oracle BPM/SOA Suite的網域概念是沿用WebLogic Server的，也就是前面的WebLogic Server與SOA Suite Server的安裝步驟都是安裝執行所需要的binary data，但是你可以在任何一台有安裝此binary data的機器上面產生一至多個domain，執行多個server(有些是跑SOA，有些是跑JEE Container only)，各自使用不同的configuration (如listen不同的port或有不同的JDBC設定)。&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVXYou0g-tEfq7ST1H5g6Zusd2LAv9fbVutnJGCwKMKcH_wVcmjH9gfmiersiPDpRTc6xUc0JtBaRd1_it2R-BZYTZZz9DHSK_m-Npt5KBun5VbkyDW-q_DGT7nwZUriaoEXcLn9ZG75k/s1600/config3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVXYou0g-tEfq7ST1H5g6Zusd2LAv9fbVutnJGCwKMKcH_wVcmjH9gfmiersiPDpRTc6xUc0JtBaRd1_it2R-BZYTZZz9DHSK_m-Npt5KBun5VbkyDW-q_DGT7nwZUriaoEXcLn9ZG75k/s400/config3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;下一步，給定密碼&lt;br /&gt;
給一個你管理所需的使用者帳號與密碼。&lt;/li&gt;
&lt;li&gt;設定伺服器啟動模式與JDK&lt;br /&gt;
選擇&quot;開發模式&quot;，並使用預設所選擇的JDK。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZqmtz66vknNviiJyCRsDHKxiNiSm8Cxb2LhYnKV6mbE3DD2BYFAwRqgMS9iROhAqkCTIlVAb42A857qEHIgyUlXPyfP-Ty3zSUIAgFL82w2lE4SmJFVS1flA0CeWotCkDcouQUBPb5Hk/s1600/config4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZqmtz66vknNviiJyCRsDHKxiNiSm8Cxb2LhYnKV6mbE3DD2BYFAwRqgMS9iROhAqkCTIlVAb42A857qEHIgyUlXPyfP-Ty3zSUIAgFL82w2lE4SmJFVS1flA0CeWotCkDcouQUBPb5Hk/s400/config4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;設定JDBC元件綱要&lt;br /&gt;
此步驟將使用之前RCU所產生的database schema，你可以選擇介面下面所列出來的四個元件綱要，各自指定之前已經產生的DEV_SOAINFRA、DEV_ORASDPM與DEV_MDS schema的資料庫連接方式&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWWv9BpYytqzXYVmjwNbPyHg1gmcdKA9OF0ngnUyH-HxfZF3GQ8N3x0P6Rjt0Dzo9QWa6XQu6yxgGcJAuWpFINMRqTPa_MTKnRbUAd6nG9BsMRL16IKo1LRCf69aLZGWPVziJZZGqeFOg/s1600/config5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWWv9BpYytqzXYVmjwNbPyHg1gmcdKA9OF0ngnUyH-HxfZF3GQ8N3x0P6Rjt0Dzo9QWa6XQu6yxgGcJAuWpFINMRqTPa_MTKnRbUAd6nG9BsMRL16IKo1LRCf69aLZGWPVziJZZGqeFOg/s400/config5.PNG&quot; style=&quot;cursor: move;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
等待測試元件綱要完成&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvrf8kwG4RnhPzSS2Q1DxsKoFCOSPbf4-zxefiNa57ODmcLs4T1Eg_ju5w9HMAhYQiFnQyBmIxzw1Dy2mOyRfYdnwD7TbCKwTG1yo71CEqejrsuTJhABzCM41cZqiOdJQHOpN1SayUxhc/s1600/config6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvrf8kwG4RnhPzSS2Q1DxsKoFCOSPbf4-zxefiNa57ODmcLs4T1Eg_ju5w9HMAhYQiFnQyBmIxzw1Dy2mOyRfYdnwD7TbCKwTG1yo71CEqejrsuTJhABzCM41cZqiOdJQHOpN1SayUxhc/s400/config6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;選取選擇性組態&lt;br /&gt;
在開發server的架構之下，我們當然希望環境越單純越好，因此，我們希望只有一台JVM被啟動即可以完成所有的開發動作。當然，若是在未來建置上線系統的時候，你可能會考慮有多台的server，分開管理server、SOA server、與一般WebLogic server至不同的JVM，甚至還會考慮建立叢集環境。&lt;br /&gt;
你只需要選擇&quot;管理伺服器&quot;即可，我們會將所有的component塞到這個server之中。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguGa0fvZwwtZ61KTsQhR9q_mQ9zT8Gdx_WBmFCZEutwqv821asj-zXopATctZpBWjo1Oa37KflV2mKuD6q66gkNeLg3qeN_0Ybqtzhj5CmnjpW3dS9JmzE_etoxsG5KTuv65_QgXi1AD4/s1600/config7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguGa0fvZwwtZ61KTsQhR9q_mQ9zT8Gdx_WBmFCZEutwqv821asj-zXopATctZpBWjo1Oa37KflV2mKuD6q66gkNeLg3qeN_0Ybqtzhj5CmnjpW3dS9JmzE_etoxsG5KTuv65_QgXi1AD4/s400/config7.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;設定管理伺服器&lt;br /&gt;
你可以指定你的server所聽的TCP port，預設值是7001&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtY5xWewjQ9Lz_MbK3WIF5ykJWzLTj-c9KucYJvjzknbjIlKFr5BPtIRDOb6_A3BFhVX0BuAev705rYbBfW2yGl0HaVyqschNcqzzMrF2bb4zWSY5Ey0TBPdLMHamFTn08ag1mJ4yOaGA/s1600/config8.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtY5xWewjQ9Lz_MbK3WIF5ykJWzLTj-c9KucYJvjzknbjIlKFr5BPtIRDOb6_A3BFhVX0BuAev705rYbBfW2yGl0HaVyqschNcqzzMrF2bb4zWSY5Ey0TBPdLMHamFTn08ag1mJ4yOaGA/s400/config8.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;確定組態摘要，OK的話就開始建立domain了!&lt;/li&gt;
&lt;/ol&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;IDE安裝:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;&lt;ol&gt;&lt;li&gt;執行&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;jdevstudio11114install.exe&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;選擇先前安裝WebLogic Server與BPM/SOA Suite的Middleware本位目錄。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj85DDDhGDYMdavEk69qMePwMoHShibPcn6qgNRKstBha5g0cQVbaXTJ3XuchsduQzqRI10Ei5pLbWyhWeyvEp8B8zdPVVy-J9lfbgRNxQkQBU7fkxytUQw8TB3dQ_I902ikoxJoAKo_4/s1600/jdev1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj85DDDhGDYMdavEk69qMePwMoHShibPcn6qgNRKstBha5g0cQVbaXTJ3XuchsduQzqRI10Ei5pLbWyhWeyvEp8B8zdPVVy-J9lfbgRNxQkQBU7fkxytUQw8TB3dQ_I902ikoxJoAKo_4/s400/jdev1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;選擇產品與元件&lt;br /&gt;
選擇產品與元件時，記得將JDeveloper Studio與Application Development Framework Runtime都要選起來。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4sVHmeq4zWx8Ud1hYAcPWQe5vR1_PSG3sTC7FOZcutCEZwU_SkRCZH7ma_HGNe6tOyrsLle2rTXARe4_Y4wQger3quiSO8iDsaOGWEWDnolsaLKcQI9cOlmnjbiSm4aNmYKskvzqeMN4/s1600/jdev2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4sVHmeq4zWx8Ud1hYAcPWQe5vR1_PSG3sTC7FOZcutCEZwU_SkRCZH7ma_HGNe6tOyrsLle2rTXARe4_Y4wQger3quiSO8iDsaOGWEWDnolsaLKcQI9cOlmnjbiSm4aNmYKskvzqeMN4/s400/jdev2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;選擇JDK&lt;br /&gt;
這一步驟你應該會想要按下&quot;瀏覽&quot;，選擇之前所安裝的JDK 64-bit版本吧... 但是，不知為什麼，那個按鈕是裝飾用的，按不下去，你一定得要使用JDeveloper所包綑的JDK...#@%$^%&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaOmxEIh1dhPdUMzp6QULgrx6A5K29P-vXl4xmhBhxYA7qtRkbKlFrJbVG608zrtWOmgqaG_RKdNfjfOYDP61VE10G3CDgGuZpaL1haTlhyo5Cs6D_3oYPGR6O1Rj7fiaaiBwpaokW9BM/s1600/jdev3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaOmxEIh1dhPdUMzp6QULgrx6A5K29P-vXl4xmhBhxYA7qtRkbKlFrJbVG608zrtWOmgqaG_RKdNfjfOYDP61VE10G3CDgGuZpaL1haTlhyo5Cs6D_3oYPGR6O1Rj7fiaaiBwpaokW9BM/s400/jdev3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
不過沒關係，等安裝結束之後，我會告訴你怎麼切換JDeveloper使用64-bit JDK。&lt;/li&gt;
&lt;li&gt;確認產品安裝目錄，並確認安裝概要&lt;br /&gt;
基本上，就是一直下一步，直到看到開始安裝就可以開始等待囉!&lt;/li&gt;
&lt;li&gt;切換使用64-bit JDK&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;完成安裝之後，你的JDeveloper會被安裝至&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;Middleware_home&amp;gt;\jdeveloper&lt;/span&gt;目錄之下。&lt;/li&gt;
&lt;li&gt;使用你的文字編輯器打開&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;Middleware_home&amp;gt;\jdeveloper\jdev\bin\jdev.conf&lt;/span&gt;檔。&lt;/li&gt;
&lt;li&gt;找到一行類似：&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;SetJavaHome e:\ofm11gr1ps3\jdk160_21，&lt;/span&gt;你只要將&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;e:\ofm11gr1ps3\jdk160_21&lt;/span&gt;換成你64-bit JDK目錄位置即可。&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;安裝JDeveloper SOA extension&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;啟動JDeveloper：&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;Middleware_home&amp;gt;\jdeveloper\jdeveloper.exe&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;在&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Menu中選擇Help --&amp;gt; Check For Updates&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbO5w0eADKMIknujsWv4e4g_JAq-OtlKPUuuURVcX_nv4kZdIvJ-RRDmSnXLWb692JtN83w_K-gtXlP6glCmte7gIyT6l986YuJXnwMvAs25jqqpskf96cUU9f6G3JTzG_lVWFKd05XfQ/s1600/jdev4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbO5w0eADKMIknujsWv4e4g_JAq-OtlKPUuuURVcX_nv4kZdIvJ-RRDmSnXLWb692JtN83w_K-gtXlP6glCmte7gIyT6l986YuJXnwMvAs25jqqpskf96cUU9f6G3JTzG_lVWFKd05XfQ/s400/jdev4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;在搜尋列中打入SOA，你會發現SOA Composite Editor的選項，選擇他並選Next開始下載，下載完成之後，JDeveloper會要求關閉，當重新開啟之後，SOA Composite Editor便已安裝完成了。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8S9Iftd33XirYUd32U22DdYolUlKYG1X1Jz81jg1NqG8WeyV1lpu2qtnmPAEYmZHEax5wP_pNw9B3Up7rNYObNZ81aT4rlNACuoP2LB5PPmGSTJ01C34MhqpFwnSqIYr2_reaDGAgyJ0/s1600/jdev5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8S9Iftd33XirYUd32U22DdYolUlKYG1X1Jz81jg1NqG8WeyV1lpu2qtnmPAEYmZHEax5wP_pNw9B3Up7rNYObNZ81aT4rlNACuoP2LB5PPmGSTJ01C34MhqpFwnSqIYr2_reaDGAgyJ0/s400/jdev5.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;安裝JDeveloper BPM extension&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;重複上一步驟，到搜尋列時打入BPM，你會發現BPM Studio 11g的選項，重複下載與重開JDeveloper的過程，當重新開啟之後，BPM Studio便已安裝完成了。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEoUwcCgBwc-L15S0QVW0Vwm0Dm3ET1bdzogPWjbux4n0i04QHFagRVP-zwKaDHaIReI6J7hQ321fC2LzGUJDi_Vwth2gQpbBpcGamR8_cNJIz8teUQqYgg8JwxnrfrqJR5MbZPRsy6ho/s1600/jdev6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEoUwcCgBwc-L15S0QVW0Vwm0Dm3ET1bdzogPWjbux4n0i04QHFagRVP-zwKaDHaIReI6J7hQ321fC2LzGUJDi_Vwth2gQpbBpcGamR8_cNJIz8teUQqYgg8JwxnrfrqJR5MbZPRsy6ho/s400/jdev6.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;驗證安裝&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
現在我們該啟動剛才安裝的所有軟體，試試看是否正常運作了!&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;首先，先確認你的資料庫正常啟動執行&lt;/li&gt;
&lt;li&gt;啟動BPM/SOA server&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;使用command prompt執行下列指令：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt; cd &amp;lt;Middleware_Home&amp;gt;\user_projects\domains\bpm_domain&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt; startWebLogic.cmd&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;正常啟動時間會花4分鐘左右，請耐心等到出現下列字串於螢幕上即代表server已經啟動完成&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;資訊: FabricProviderServlet.stateChanged SOA Platform is running and accepting requests&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;連接server管理介面&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;使用browser連接URL: http://&amp;lt;your_soa_host&amp;gt;:7001/em&lt;/li&gt;
&lt;li&gt;使用產生domain所指定的帳號與密碼登入&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh1niRQq8cyaUcicEJwr_2_CgsehVpQYQ4ZoNe8hk4odm_HhCZ8AEK-dHeVYUhnITLhfrLNOQavhlV0Cz4QagWnIojIHr-8YH96GN446ktFHuqakL47YujkK1DaGbBojKA7T8WW5vznBI/s1600/em1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;287&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh1niRQq8cyaUcicEJwr_2_CgsehVpQYQ4ZoNe8hk4odm_HhCZ8AEK-dHeVYUhnITLhfrLNOQavhlV0Cz4QagWnIojIHr-8YH96GN446ktFHuqakL47YujkK1DaGbBojKA7T8WW5vznBI/s400/em1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;當你見到此畫面時，恭喜! 你已經完成server安裝了!&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCViE1E9gtbKP0pes5VrgXwQfy1NiWNc_m4hexYYUCTJqB3bEaXAi6V2fDvIY7CzeBtHxzocHnUPeizpwW9ze4V2yoPn_5VOUXcLu8i-oYPu-QHpw3fguWjcGOJmQ5ksHaWA_3Xf9YJoM/s1600/em2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;287&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCViE1E9gtbKP0pes5VrgXwQfy1NiWNc_m4hexYYUCTJqB3bEaXAi6V2fDvIY7CzeBtHxzocHnUPeizpwW9ze4V2yoPn_5VOUXcLu8i-oYPu-QHpw3fguWjcGOJmQ5ksHaWA_3Xf9YJoM/s400/em2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://timwu1975.blogspot.com/feeds/4623378004400411941/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8252421586595387612/4623378004400411941' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/4623378004400411941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8252421586595387612/posts/default/4623378004400411941'/><link rel='alternate' type='text/html' href='http://timwu1975.blogspot.com/2011/01/oracle-fusion-middleware-bpmsoa-suite.html' title='[Oracle BPM/SOA 基礎] 安裝BPM/SOA Suite 11gR1PS3'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01508022158865646458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgff4WB6kKGpcr42enC_Lq9cyXn8fp3Xobj09r25dASyeJcwBDC13SaZcuzWpGTQ9J3FvlZhJmOJNyyWxW-RvdWka5IR4SU6xV-KD8yl6wEa1IYNGpWU2x8lwKYvL9mmLVSRWTEh_iAwyA/s72-c/SOASuite.PNG" height="72" width="72"/><thr:total>0</thr:total></entry></feed>