锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲三级在线观看,亚洲国产成人精品激情,亚洲的天堂av无码http://m.tkk7.com/Ericzhang5231/category/29308.htmlzh-cnMon, 04 Feb 2008 08:38:13 GMTMon, 04 Feb 2008 08:38:13 GMT60Chapter 1. Introductionhttp://m.tkk7.com/Ericzhang5231/articles/JBPMJPDL.htmlEric5231Eric5231Sun, 03 Feb 2008 06:33:00 GMThttp://m.tkk7.com/Ericzhang5231/articles/JBPMJPDL.htmlhttp://m.tkk7.com/Ericzhang5231/comments/179150.htmlhttp://m.tkk7.com/Ericzhang5231/articles/JBPMJPDL.html#Feedback0http://m.tkk7.com/Ericzhang5231/comments/commentRss/179150.htmlhttp://m.tkk7.com/Ericzhang5231/services/trackbacks/179150.html1.Overview
    JBoss jBPM is a flexible, extensible framework for process languages.
    jPDL is one process language that is build on top of that common framework. It has serval advantages:
        1.It is an intuitive process language to express business processes graphically in terms of tasks, wait states for asynchronous communication, timers, automated actions,... To         bind these operations together;
        2.jPDL has minimal dependencies and can be used as easy as using a java library;
        3.it can also be used in environments where extreme throughput is crucial by deploying it on a J2EE clustered application server;

2.The jPDL Kits

   

The starter kit is a download that contains all the jBPM components bundled in one easy download. The download includes:

  • runtime, the core jbpm component including the libs and this userguide.
  • server, a preconfigured jboss application server.
  • designer, the eclipse plugin for authoring jBPM processes graphically.
  • db, the jBPM database compatibility package (see below).
  • bpel, a reference to the JBoss jBPM BPEL extension.


3. Advantages of JBOSS JBPM

    3.1   The JBOSS jBPM has a graphical process designer, which can as a n eclipse plugin;
    3.2   The JBOSS jBPM core componet is based on J2SE, so it can be used in any java environment like e.g. a webapplication, a swing application, an EJB, a                 
            webservice...;
    3.3   The JBOSS jBPM console web application supplys a central user interface for interacting with runtime tasks generated by the process executions, and
            administration and monitoring console to inspect and manipulate runtime instance;
    3.4   The JBoss jBPM identity component;
    3.5   The JBoss jBPM scheduler monitors and executes timers that are scheduled during process executions(Configuring the scheduler servlet to spawn the monitoring thread or Starting up a separate JVM with the scheduler main);
    3.6   The JBoss jBPM database compatibility package;
    3.7   The JBoss jBPM BPEL extension is a separatly packaged extension that extends jBPM with support for BPEL;


Eric5231 2008-02-03 14:33 鍙戣〃璇勮
]]>
jBPM寮鍙戝叆闂ㄦ寚鍗?2)(杞?http://m.tkk7.com/Ericzhang5231/articles/178808.htmlEric5231Eric5231Fri, 01 Feb 2008 03:47:00 GMThttp://m.tkk7.com/Ericzhang5231/articles/178808.htmlhttp://m.tkk7.com/Ericzhang5231/comments/178808.htmlhttp://m.tkk7.com/Ericzhang5231/articles/178808.html#Feedback0http://m.tkk7.com/Ericzhang5231/comments/commentRss/178808.htmlhttp://m.tkk7.com/Ericzhang5231/services/trackbacks/178808.html jBPM寮鍙戝叆闂ㄦ寚鍗?2)

4 鏁版嵁搴撳垵濮嬪寲

jBPM 闇瑕佹暟鎹簱鏀寔錛?/span> jBPM 浼?xì)鎶婅嚜宸辩殑涓涓垵濮嬪寲鏁版嵁瀛樺偍鍒版暟鎹簱錛屽悓鏃跺伐浣滄祦鐨勬暟鎹篃鏄瓨鍌ㄥ埌鏁版嵁搴撲腑鐨勩?/span> jBPM 浣跨敤 Hibernate 鏉ュ仛涓鴻嚜宸辯殑瀛樺偍灞傦紝鍥犳鍙鏄?/span> Hibernate 鏀寔鐨勬暟鎹簱錛?/span> jBPM 涔熷氨鏀寔銆?/span>

 

鏈枃鍏堜互 MySQL 涓轟緥錛岀劧鍚庡啀浠?/span> Oracle 涓轟緥錛屾潵璋堣皥 jBPM 鐨勬暟鎹簱鍒濆鍖栨搷浣溿?/span>

 

娉細(xì)鍦ㄤ笂闈㈢殑 JBoss 鑷甫鐨勭ず渚嬩腑錛屽茍娌℃湁璁劇疆鏁版嵁搴擄紝閭f槸鍥犱負(fù) jBPM 榛樿浣跨敤鐨勬槸鍐呭瓨鏁版嵁搴?/span> hsqldb 銆?/span>

4.1  MySQL

 

1 銆侀鍏堝畨瑁?/span> MySQL 銆?/span>

MySQL 鐨勫畨瑁呮瘮杈冪畝鍗曪紝緗戜笂涔熸湁寰堝鏂囩珷錛屾湰鏂囦笉鍐嶈禈榪般傛湰鎸囧崡鎵鐢?/span> MySQL 鐗堟湰涓?/span> MySQL 4.1 錛?/span> for windows 錛夈傚啀鎵句竴涓?/span> MySQL 瀹㈡埛绔紝鐩殑鏄柟渚挎煡鐪嬫暟鎹簱涓殑鏁版嵁錛屾湰鏂囨帹鑽愪嬌鐢?/span> MySQL 緗戠珯涓婂厤璐規(guī)彁渚涚殑“ MySQL Query Brower ”錛屽綋鐒朵綘鐢ㄥ叾浠栫殑瀹㈡埛绔篃琛岋紝姣斿 MySQL-Front 銆?/span>

 

2 銆佸緩搴?/span>

MySQL 涓垱寤轟竴涓簱錛屽簱鍚嶏細(xì) jbpm

 

3 銆佺敓鎴愬緩琛ㄧ殑 SQL 璇彞騫跺緩琛?/span>

灝?/span> jbpm-starters-kit-3.1.1 涓嬬殑瀛愮洰褰?/span> jbpm 鏀瑰悕涓?/span> jbpm.3 錛屽惁鍒欏湪鎵ц涓嬮潰鐨?/span> ant 鍛戒護(hù)鏃朵細(xì)鎶ュ jbpm.3 鐩綍涓嶅瓨鍦ㄧ殑閿欒錛?/span>

D:\jbpm-starters-kit-3.1.1\jbpm-db\build.xml:361: The following error occurred while executing this line:

D:\jbpm-starters-kit-3.1.1\jbpm-db\build.xml:68: Basedir D:\jbpm-starters-kit-3.1.1\jbpm.3 does not exist

 

鍦?/span> DOS 紿椾笅錛岃繘鍏?/span> D:\jbpm-starters-kit-3.1.1\jbpm-db 鐩綍錛屾墽琛屽涓嬪懡浠わ細(xì)

ant mysql.scripts

 

鎵ц鎴愬姛鍚庯紝鍦?/span> D:\jbpm-starters-kit-3.1.1\jbpm-db\build\mysql\scripts 鐩綍閲岀敓鎴愪簡(jiǎn)鍥涗釜 sql 鏂囦歡錛屽畠浠仛浠涔堢敤鐨勪竴鐪嬪悕瀛楀氨鐭ラ亾浜?jiǎn)銆傚湪 MySQL 瀹㈡埛绔腑鎵ц“ mysql.create.sql ”鑴氭湰錛岃繖鏍峰皢鍦?/span> jbpm 搴撲腑鍒涘緩涓涓釜鐨勬暟鎹〃銆?/span>

 

 

4.2  Oracle

鍏堝畨瑁呭ソ Oracle 鏈嶅姟鍣ㄣ傛垜浠叕鍙告湁鐜板瓨鐨?/span> Oracle 鏈嶅姟鍣紝涔熸彁渚涚粰浜?jiǎn)鎴戜竴涓睘浜庢垜鑷繁鐨勭敤鎴峰悕錛屼竴鐧誨綍灝卞彲浠ヤ換鎰忓湪鎴戠殑搴撲箣涓嬪垱寤鴻〃浜?jiǎn)銆傛墍浠ヨ繖涓姝ュ氨鐪佷簡(jiǎn)錛屾病鏈夌殑鑷釜鍏堣濂藉惂銆?/span>

璁塊棶 Oracle 鎺ㄨ崘鐢?#8220; PLSQL Developer ”銆備笉榪囪榪炴帴 Oracle 榪樿鍦ㄦ湰鏈轟笂瑁呬笂 Oracle 鑷繁鐨勫鎴風(fēng)紼嬪簭錛岄噷闈㈡彁渚涗簡(jiǎn) JDBC 鍖呭拰涓浜涢厤緗傝榪炴帴鏈嶅姟鍣ㄨ繕寰楅厤緗竴涓嬶紝鎴戜竴鑸兘鏄笉鐢?/span> GUI 鑰岀洿鎺ユ敼 tnsnames.ora 鏂囦歡錛屽湪鎴戠殑鐢?shù)鑴戦噷姝ゆ枃錃g鐨勭洰褰曞湴鍧鏄細(xì) D:\oracle\ora92\network\ADMIN\tnsnames.ora 錛屽唴瀹瑰涓?/span> ( 涓ら潰鏈変袱涓厤緗簡(jiǎn) ) 錛?/span>

# TNSNAMES.ORA Network Configuration File: E:\oracle\ora92\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

 

WXXRDB_192.168.3.2 =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.2)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SID = wxxrDB)

      (SERVER = DEDICATED)

    )

  )

 

WXXRDB_192.168.4.2 =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.4.2)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SID = wxxrDB)

      (SERVER = DEDICATED)

    )

  )

 

鍓嶉潰閮芥槸 Oracle 鐨勪竴浜涚煡璇嗭紝涓嶄細(xì)鐨?/span> Google 涓涓嬪惂銆傛渶鍚庨厤緗ソ鍚庯紝鐢?/span> PLSQL Developer 杈撳叆浣犵殑鐢ㄦ埛鍚嶅拰瀵嗙爜鑱旀帴鍒?/span> Oracle 錛屽氨綆?/span> OK 浜?jiǎn)銆?/span>

 

鍙傝冧笂闈?/span> MySQL 鐨勬楠わ紝鍩烘湰涓鏍鳳細(xì)

錛?錛?span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">       灝?/span> jbpm 鏀瑰悕涓?/span> jbpm.3

錛?錛?span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">       鍐嶆墽琛?/span> ant oracle.scripts

錛?錛?span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">       鐢?/span> jbpm-db\build\oracle\scripts 鐩綍鐨?/span> oracle.create.sql 鑴氭湰錛屽湪 Oracle 涓敓鎴?/span> jBPM 鐨勬墍鏈夎〃銆傚湪“ PLSQL Developer ”涓彲浠ユ柊寤轟竴涓?/span> Command Windows 紿楀彛鐒跺悗杈撳叆鍛戒護(hù)錛?/span> @D:\jbpm-starters-kit-3.1.1\jbpm-db\build\oracle\scripts\oracle.create.sql



Eric5231 2008-02-01 11:47 鍙戣〃璇勮
]]>
jBPM寮鍙戝叆闂ㄦ寚鍗?1)(杞?http://m.tkk7.com/Ericzhang5231/articles/178806.htmlEric5231Eric5231Fri, 01 Feb 2008 03:43:00 GMThttp://m.tkk7.com/Ericzhang5231/articles/178806.htmlhttp://m.tkk7.com/Ericzhang5231/comments/178806.htmlhttp://m.tkk7.com/Ericzhang5231/articles/178806.html#Feedback0http://m.tkk7.com/Ericzhang5231/comments/commentRss/178806.htmlhttp://m.tkk7.com/Ericzhang5231/services/trackbacks/178806.html jBPM寮鍙戝叆闂ㄦ寚鍗?1)

宸ヤ綔嫻佽櫧鐒惰繕鍦ㄤ笉鎴愮啛鐨勫彂灞曢樁孌碉紝鐢氳嚦榪樻病鏈変竴涓叕璁ょ殑瑙勮寖鏍囧噯銆備絾鍏跺簲鐢ㄥ嵈宸茬粡鍦ㄥ揩閫熷睍寮錛岃繖璇存槑甯?jìng)鍦哄宸ヤ綔娴佹鏋剁殑闇姹傛槸鎬ヨ揩鑰屽法澶х殑銆?/span>


jBPM 鐨勬澶勫湪涓嶆柇鍙戝睍涓紝鍋氫負(fù)寮婧愯蔣浠剁殑鐗圭偣錛屽叾璁捐鍙樺寲寰寰寰堝ぇ銆傛墍浠ヤ竴浜涜繃鍘葷殑璧勬枡鍙兘宸茬粡涓嶉傜敤浜?jiǎn)銆備簬鏄綔鑰呮牴鎹嚜宸辯殑浣跨敤緇忛獙錛岄噸鏂版暣鐞嗗嚭榪欎喚鏂囨。錛屼互澶囧涔?fàn)鍙傝冦?/span>

娉細(xì)鏈枃浣跨敤鐨?/span> jBPM 鐗堟湰涓?/span> 3.1.1

鐜鍑嗗

1銆佸畨瑁?span lang="EN-US">JDK

鎵鏈?/span> JAVA 寮鍙戠涓涓渶瑕佸畨瑁呯殑錛屾病浠涔堝ソ璇寸殑銆傝寰楁妸緋葷粺鍙橀噺 JAVA_HOME 璁句笂銆?/span>

2銆佸畨瑁?span lang="EN-US">Ant

Ant 鏄嬌鐢?/span> jBPM 蹇呴』鐨勪竴涓伐鍏楓?/span> jBPM 涓殑寰堝鎿嶄綔閮借鐢ㄥ埌 Ant 銆?/span>

瀹夎鏂規(guī)硶錛?/span>

錛?/span> 1 錛夊厛涓嬭澆錛?/span> http://archive.apache.org/dist/ant/binaries/ 錛岄変竴涓錛?/span> apache-ant-1.6.5-bin.zip 銆?/span>

錛?/span> 2 錛夎В鍘嬪埌 D:\ant 錛堝綋鐒跺叾浠栫洰褰曚篃鍙互錛夈?/span>

錛?/span> 3 錛夎緗涓嬬郴緇熷彉閲忥細(xì) ANT_HOME=d:\ant 銆?/span>

錛?/span> 4 錛夋妸 %ANT_HOME%\bin 鍔犲叆鍒扮郴緇熷彉閲?/span> PATH 涓?/span>

3銆佸畨瑁?span lang="EN-US">Eclipse

Eclipse 涓嶆槸寮鍙?/span> jBPM 蹇呴』鐨勫伐鍏鳳紝浣嗗畠鏄 jBPM 寮鍙戝緢鏈夊府鍔╃殑宸ュ叿錛岀壒鍒槸 jBPM 鎻愪緵浜?jiǎn)涓涓?/span> Eclipse 鎻掍歡鐢ㄦ潵杈呭姪寮鍙?/span> jBPM 銆傚叧浜?/span> Eclipse 鐨勫畨瑁呬笉璧樿堪浜?jiǎn)锛屾湰鏂囩敤鐨勭増鏈槸锛?xì) Eclipse3.2

 

瀹夎 jBPM

jBPM 鐨勪笅杞藉湴鍧錛?/span> http://www.jboss.com/products/jbpm/downloads

l           JBoss jBPM 鏄?/span> jBPM 鐨勮蔣浠跺寘

l           JBoss jBPM Starters Kit 銆鏄竴涓患鍚堝寘錛屽畠鍖呮嫭浜?/span> jBPM 杞歡鍖呫佸紑鍙戞彃浠躲佷竴涓厤緗ソ浜?jiǎn)鐨勫熮Z簬 JBoss 鐨?/span> jBPM 紺轟緥銆佷竴浜涙暟鎹簱閰嶇疆鏂囦歡紺轟緥銆?/span>

l           JBoss jBPM Process Designer Plugin 銆鏄緟鍔╁紑鍙?/span> jBPM 鐨?/span> Eclipse 鎻掍歡銆?/span>

l           JBoss jBPM BPEL Extension jBPM 鍏充簬 BPEL 鐨勬墿灞曞寘

鏈寚鍗楅夋嫨涓嬭澆錛?/span> JBoss jBPM Starters Kit 銆備笅杞藉悗瑙e帇鍒?/span> D:\jbpm-starters-kit-3.1 錛岀洰褰曚笅鍚湁浜斾釜瀛愮洰褰曪細(xì)

l           jbpm jBPM 鐨勮蔣浠跺寘

l           jbpm-bpel 鍙惈鏈変竴涓綉欏?/span>

l           jbpm-db 鍚勭鏁版嵁搴?/span> hibernate 閰嶇疆鏂囦歡紺轟緥錛屾湁浜涜繕鍖呭惈浜?jiǎn)鐩稿簲鐨?/span> jdbc 椹卞姩紼嬪簭銆?/span>

l           jbpm-designer 銆杈呭姪寮鍙?/span> jBPM 鐨?/span> Eclipse 鎻掍歡錛屽叿浣撳湪 jbpm-gpd-feature 瀛愮洰褰曚腑

l           jbpm-server 銆涓涓凡緇忛厤緗ソ浜?jiǎn)鐨勫熮Z簬 JBoss 鐨?/span> jBPM 紺轟緥 .

 

鎰熻涓嬪伐浣滄祦

鍓嶉潰鎴戜滑璇翠簡(jiǎn)錛屽湪 JBoss jBPM Starters Kit 鐨?/span> jbpm-server 鐩綍鏄竴涓凡緇忛厤緗ソ鐨勪簡(jiǎn) jBPM 紺轟緥錛岄偅涔堣鎴戜滑鏉ユ劅瑙変竴涓?/span> jBPM 鍋氬嚭鐨勪笢瑗垮惂銆?/span>

 

鍙屽嚮 jbpm-server 鐩綍涓嬬殑 start.bat 鏂囦歡錛屽惎鍔?/span> JBoss 鏈嶅姟銆傝繖鏃朵細(xì)鎵撳紑涓涓?/span> DOS 紿楀彛錛屽惎鍔ㄥ畬鎴愬悗錛屾棩蹇椾細(xì)涓嶆柇杈撳嚭錛屽叾涓渶鍚庝竴鍙ユ槸“ 13:55:39,937 DEBUG [StaticNotifier] going to wait for (CMD_EXECUTOR, java.lang.Object@1df59bd) ”錛岃繖琛ㄧず jBPM 鍦ㄥ紑濮嬪伐浣滀簡(jiǎn)錛屽畠涓嶆柇榪涜杞銆?/span>

鎵撳紑緗戦〉錛?/span> http://localhost:8080/jbpm/ 銆寰楀埌濡備笅鐢婚潰

榪欐槸涓涓凡緇忕敤 jBPM 寮鍙戝ソ鐨勭敤鎴峰畾鍗曟祦紼嬶紝鍏鋒湁涓嬪崟銆佸鏍搞佷及浠風(fēng)瓑嫻佺▼銆傚畠鎵鐢ㄧ殑鏁版嵁搴撴槸涓涓唴緗殑鏁版嵁搴撱?/span>

浠?/span> cookie monster 鐢ㄦ埛鐧誨綍錛岄夋嫨“ create new web sale order ”鍙互鍒涘緩涓涓畾鍗曘傚涓嬪浘鎵紺猴紝鍦ㄥ浘宸﹁竟鏄~鍐欑殑瀹氬崟鎯呭喌錛屽彸杈逛竴鏁翠釜瀹氳揣嫻佺▼鐨勭ず鎰忓浘錛岀孩鑹叉琛ㄧず嫻佺▼榪涜鍒板摢涓姝ヤ簡(jiǎn)銆傚~鍐欏ソ瀹氬崟濂斤紝閫夋嫨“ Save and Close Task ”錛屽畬鎴愬畾鍗曟彁浜ゃ?/span>

閫夋嫨鍙充笂瑙掔殑“ Login as another user ”浠ュ彟澶栦竴涓敤鎴峰悕 ernie 鐧誨綍銆傝繖鏃跺彲浠ョ湅鍒?/span> ernie 鐢ㄦ埛鐨勪換鍔″垪琛ㄤ腑澶氫簡(jiǎn)涓欏廣?/span>

鐐硅繘鍘誨悗錛屾樉紺哄涓嬬敾闈€傝繖涓ず渚嬪涓枃鐨勬敮鎸佷笉濂斤紝鍏ㄩ兘鏄劇ず鎴愪簡(jiǎn) unicode 鐮佷簡(jiǎn)銆備笉綆¤繖浠涔堝錛屽弽姝g煡閬撴槸榪欎箞鍥炰簨灝辮浜?jiǎn)銆傚湪 comment 欏瑰~鍐欐剰瑙侊紝閫?/span> OK 鎸夐挳錛岃繘鍏ュ埌涓嬩竴姝ャ傚鏋滈夋嫨 more info needed 鎸夐挳錛屽垯鎵撳洖緇?/span> cookie monster 鐢ㄦ埛淇敼瀹氬崟銆?/span>

涓嬮潰鐨勬祦紼嬶紝榪欓噷灝變笉鍐嶈禈榪頒簡(jiǎn)銆傚湪榪欎釜寰堟爣鍑嗙殑宸ヤ綔嫻佺ず渚嬩腑錛屾垜浠熀鏈彲浠ョ湅鍒?/span> jBPM 鐨勫簲鐢ㄨ寖鍥磋繕鏄瘮杈冨箍鐨勩傝屼笖浠庤繖涓ず渚嬶紝鎴戜滑鏄湅涓嶅嚭鏈?/span> jBPM 鐨勶紝涔熷氨鏄 jBPM 鍦ㄥ悗鍙拌搗鐫浣滅敤銆?/span>

浠庤繖涓緥瀛愶紝榪樼湅涓嶅嚭 jBPM 鐨勪紭鍔褲備笉榪囷紝濡傛灉鍦ㄤ竴涓祦紼嬩笉紜畾錛岀粡甯擱渶瑕佸彉鍔ㄧ殑欏圭洰涓紝 jBPM 鐨勫ソ澶勫皢浼?xì)鏄剧劧鍑烘潵銆傚簲鐢?/span> jBPM 鍚庯紝鏀瑰彉?gòu)箒绋嬪彧闇鏀瑰彉?gòu)箒绋嬫弿杩版枃錃g錛岃繖灝嗗湪鍚庨潰鐨勫唴瀹規(guī)彁鍒般?/span>

榪欐槸涓涓凡鍋氬ソ鐨勭ず渚嬶紝鎺ヤ笅鏉ユ垜浠皢浠塊犺繖涓疄渚嬫潵寮鍙戜竴涓鍋囨祦紼嬨?/span>



Eric5231 2008-02-01 11:43 鍙戣〃璇勮
]]>
JBoss jBPM 2.0 Tutorialhttp://m.tkk7.com/Ericzhang5231/articles/JBPM.htmlEric5231Eric5231Fri, 01 Feb 2008 03:37:00 GMThttp://m.tkk7.com/Ericzhang5231/articles/JBPM.htmlhttp://m.tkk7.com/Ericzhang5231/comments/178804.htmlhttp://m.tkk7.com/Ericzhang5231/articles/JBPM.html#Feedback0http://m.tkk7.com/Ericzhang5231/comments/commentRss/178804.htmlhttp://m.tkk7.com/Ericzhang5231/services/trackbacks/178804.html
Since the term workflow mangament system has a complete different meaning to different people, I will explain the core responsabilities of a workflow management system in four layers. A more detailed description of the 4 layers can be found in the article The State of Workflow.

jBpm takes process archives as input. A process archive is a formal description of a business process. After a process archive is deployed, jBpm can manage the executions of this process. 'Managing the executions' means keeping track of the state of a process (State layer), storing information associated with a process execution (Context layer), integrating custom programming logic like e.g. sending emails, interacting with an ERP, ... (Programming logic layer) and optionally allow users to complete tasks by submitting forms (User interfaces layer).

Main responsibility

The main responsibility of a WFMS is to maintain the state of process executions. The state model of jBpm is based on a graph with nodes and transitions. Nodes and transitions are the main ingredients of a process definition. A state is an example of a node.


Runtime interaction

The 2 most important interactions with jBpm are : starting one instance (=one execution) of a process definition and signalling the end of a state. As a result of both these interactions jBpm will calculate the next state of the process instance.


Actions

The state graph, provides the structure of the process. Actions are pieces of programming logic that can be executed upon events in the process. There are three types of events : entering a node, leaving a node and taking a transition. While jBpm is calculating the next state, a number of these events will fire.

Process archives

The main file in a process archive is processdefinition.xml. That file contains the formal description of the process. The act of parsing the processdefinition.xml and storing it in the database is called deploying a process. All other files in a process archive are stored as attachments with the process definition (either in the database or as files on the filesystem).


Example

Create a process archive

We have modelled the following process for requesting a pay raise...

The payraise process This process is expressed as xml like this:
 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <!DOCTYPE process-definition PUBLIC
 3     "-//jBpm/jBpm Mapping DTD 2.0//EN"
 4     "http://jbpm.org/dtd/processdefinition-2.0.dtd">
 5 
 6 <process-definition name="pay raise process"> 
 7   
 8   <!-- START-STATE -->
 9   <start-state name="request a payraise" >
10     <transition to="evaluating"/>
11   </start-state>
12 
13   <!-- NODES -->
14   <state name="evaluating">
15     
16     <transition name="approve"     to="fork"/>
17     <transition name="disapprove"  to="done"/>
18   </state>
19   
20   <fork name="fork">
21     <transition to="updating erp asynchronously" />
22     <transition to="treating collegues on cake and pie" />
23   </fork>
24 
25   <state name="updating erp asynchronously">
26     
27     <transition to="join" />
28   </state>
29 
30   <state name="treating collegues on cake and pie">
31     
32     <transition to="join" />
33   </state>
34   
35   <join name="join">
36     <transition to="done" />
37   </join>
38 
39   <!-- END-STATE -->
40   <end-state name="done" />
41 
42 </process-definition>
snippet of the processdefinition.xml

Deploy process archive

jBpm store its process definitions in the database. So deploying a process into jbpm actually means parsing the processdefinition.xml and store it in the jbpm database. This can be done in one of 2 ways:

  1. the jbpm ant-tasks par and deploypar. par lets you create a process archive from a set of files. deploypar deploys a process archive to the database. The deploypar takes a jbpm.properties file as an attribute. That file specifies the jbpm configurations including the database to which the process archive has to be deployed. For more information about the properties, see configuration.
  2. programmatically like this:

 1 // create a process archive input stream
 2 String resource = "payraise/processdefinition.xml";
 3 InputStream is = PayRaiseTest
 4                    .class
 5                    .getClassLoader()
 6                    .getResourceAsStream(resource);
 7 ArchiveBuilder ab = new ArchiveBuilder(is);
 8 JarInputStream jis = ab.getJarInputStream();
 9       
10 // deploy the process
11 DefinitionService ds = JbpmServiceFactory
12                          .getInstance()
13                          .openDefinitionService();
14 ds.deployProcessArchive(jis);
15 ds.close();
code to deploy a process archive
Note that also this code uses the jbpm.properties for its configuration, including the database to which the process archive is deployed.

Note that the jbpm default configurations points to an hypersonic in-memory database. That is ideal for testing. But this is of little use when using the ant task to deploy your process. In that case, your database will live in the runtime memory of the ant-task so you'll not be able to access it after the ant-task has completed.

Start process instance

After packing and deploying this process to the jBpm database, the next code example shows how to start a process instance.

1 ExecutionService executionService = 
2     JbpmServiceFactory.getInstance().openExecutionService("AlbertEinstein");
3 executionService.startProcessInstance( "payraise" );
4 executionService.close();
code to start a process instance

Getting a task list

A token is a pointer to a state. In jbpm, every token can point to one actor, thereby creating a relation between a state and an actor. The idea behind this state-actor relation in a token. is the following : when workflow engine enters a state, that means that the workflow engine will be waiting for some external trigger. If the process definition is equipped with a calculation that determines *who* it is waiting for, this calculation is executed when the token enters the state. So the task list will be a collection of tokens that refer to a given actor. Actors in jBpm are always referenced by their id : actorId (java.lang.String).
1 // get an execution service for user Carl Gauss (cg)
2 ExecutionService executionService = JbpmServiceFactory.getInstance().openExecutionService("cg");
3 // get the task list for Carl Gauss (cg)
4 Collection tasks = executionService.getTaskList("cg");
5 executionService.close();
code to get a tasklist

Signal the end of a state

When the process instances was started, jBpm calculated that the next state is 'evaluating' and that user CarlGauss is responsible for this task. This resulted in the token of the process being assigned to 'CarlGauss'. The next snippet asks jBpm all the tokens that are waiting for CarlGauss. In this example we assume that the first task is the one we started above. When CarlGauss has made his decision, he informs jBpm by means of the endOfState method call. Note that in this example we explicitly provide the name of the leaving transition to indicate the choice made by the user.

1 ExecutionService executionService = 
2     JbpmServiceFactory.getInstance().openExecutionService("CarlGauss");
3 Collection tasks = executionService.getTaskList("CarlGauss");
4 Token token = (Token) tasks.iterator().next();
5 executionService.endOfState( token.getId(), "approve" );
6 executionService.close();

code to signal an end of state



Eric5231 2008-02-01 11:37 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 99久久免费国产香蕉麻豆| 亚洲国产精品人久久| 国国内清清草原免费视频99 | 国产AV日韩A∨亚洲AV电影 | 国产精品久免费的黄网站 | 亚洲无圣光一区二区| 亚洲日韩欧洲乱码AV夜夜摸 | 中文字幕亚洲精品资源网| 一区二区无码免费视频网站| 日本免费A级毛一片| 国产亚洲福利一区二区免费看| 久久精品国产亚洲AV忘忧草18 | 嫩草在线视频www免费看| 校园亚洲春色另类小说合集| 亚洲欧洲日产国码无码久久99| 四虎影库久免费视频| 日韩伦理片电影在线免费观看| 一个人免费高清在线观看| 99re免费视频| 99re6热视频精品免费观看 | 亚洲宅男永久在线| 亚洲AV综合色区无码一区| 久久不见久久见中文字幕免费| 99久在线国内在线播放免费观看| 永久免费av无码入口国语片| 在线免费观看伊人三级电影| 久99久无码精品视频免费播放| 免费VA在线观看无码| 黄色毛片免费观看| 免费一级特黄特色大片| 精品在线观看免费| 无忧传媒视频免费观看入口| 男女男精品网站免费观看| 黄色毛片免费在线观看| 成人在线免费视频| 国产精品免费久久| 亚洲欧美国产国产综合一区| 学生妹亚洲一区二区| 亚洲中文字幕久久精品无码A| 亚洲精华国产精华精华液好用 | 成人免费一级毛片在线播放视频|