The starter kit is a download that contains all the jBPM components bundled in one easy download. The download includes:
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>
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-
D:\jbpm-starters-kit-
D:\jbpm-starters-kit-
鍦?/span>
DOS
紿椾笅錛岃繘鍏?/span>
D:\jbpm-starters-kit-
ant mysql.scripts
鎵ц鎴愬姛鍚庯紝鍦?/span>
D:\jbpm-starters-kit-
鍏堝畨瑁呭ソ 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-
宸ヤ綔嫻佽櫧鐒惰繕鍦ㄤ笉鎴愮啛鐨勫彂灞曢樁孌碉紝鐢氳嚦榪樻病鏈変竴涓叕璁ょ殑瑙勮寖鏍囧噯銆備絾鍏跺簲鐢ㄥ嵈宸茬粡鍦ㄥ揩閫熷睍寮錛岃繖璇存槑甯?jìng)鍦哄宸ヤ綔娴佹鏋剁殑闇姹傛槸鎬ヨ揩鑰屽法澶х殑銆?/span>
jBPM 鐨勬澶勫湪涓嶆柇鍙戝睍涓紝鍋氫負(fù)寮婧愯蔣浠剁殑鐗圭偣錛屽叾璁捐鍙樺寲寰寰寰堝ぇ銆傛墍浠ヤ竴浜涜繃鍘葷殑璧勬枡鍙兘宸茬粡涓嶉傜敤浜?jiǎn)銆備簬鏄綔鑰呮牴鎹嚜宸辯殑浣跨敤緇忛獙錛岄噸鏂版暣鐞嗗嚭榪欎喚鏂囨。錛屼互澶囧涔?fàn)鍙傝冦?/span>
娉細(xì)鏈枃浣跨敤鐨?/span> jBPM 鐗堟湰涓?/span> 3.1.1
鎵鏈?/span> JAVA 寮鍙戠涓涓渶瑕佸畨瑁呯殑錛屾病浠涔堝ソ璇寸殑銆傝寰楁妸緋葷粺鍙橀噺 JAVA_HOME 璁句笂銆?/span>
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>
Eclipse 涓嶆槸寮鍙?/span> jBPM 蹇呴』鐨勫伐鍏鳳紝浣嗗畠鏄 jBPM 寮鍙戝緢鏈夊府鍔╃殑宸ュ叿錛岀壒鍒槸 jBPM 鎻愪緵浜?jiǎn)涓涓?/span> Eclipse 鎻掍歡鐢ㄦ潵杈呭姪寮鍙?/span> jBPM 銆傚叧浜?/span> Eclipse 鐨勫畨瑁呬笉璧樿堪浜?jiǎn)锛屾湰鏂囩敤鐨勭増鏈槸锛?xì) Eclipse3.2
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>
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.
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.
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.
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).
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:
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.
After packing and deploying this process to the jBpm database,
the next code example shows how to start a process instance.
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.
code to signal an end of state