锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一区无码中文字幕,久久久久亚洲精品天堂,综合一区自拍亚洲综合图区http://www.tkk7.com/libin2722/category/25641.htmlzh-cnThu, 13 Sep 2007 04:28:19 GMTThu, 13 Sep 2007 04:28:19 GMT60濡備綍鍦╓eb搴旂敤涓惎鍔ㄥ悗鍙頒換鍔?http://www.tkk7.com/libin2722/articles/144165.html紺肩墿紺肩墿Tue, 11 Sep 2007 02:13:00 GMThttp://www.tkk7.com/libin2722/articles/144165.htmlhttp://www.tkk7.com/libin2722/comments/144165.htmlhttp://www.tkk7.com/libin2722/articles/144165.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/144165.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/144165.html鎽樿
銆銆
銆銆鎴戜滑甯稿父鍦╓eb搴旂敤涓渶瑕佸惎鍔ㄤ竴涓嚜宸卞啓鐨勬湇鍔★紝鏈枃鐨勭洰鐨勬槸緇欎綘鎻愪緵涓涓В鍐蟲柟妗堛?br /> 銆銆
銆銆鍘熺悊
銆銆
銆銆鏈柟妗堢殑鍘熺悊鏄啓涓涓疄鐜頒簡ServletContextListener鎺ュ彛鐨勭被錛岃綾諱腑鏈変袱涓柟娉曪細(xì)public void contextInitialized(ServletContextEvent sce)錛屽畠鏄湪搴旂敤鍚姩鏃惰皟鐢紱鍙︿竴涓柟娉曟槸錛歱ublic void contextDestroyed(ServletContextEvent sce)錛岃鏂規(guī)硶鏄湪搴旂敤緇撴潫鏃惰皟鐢ㄣ傛妸鎴戜滑瑕佸惎鍔ㄧ殑鍚庡彴搴旂敤閫昏緫鏀懼湪contextInitialized鏂規(guī)硶涓疄鐜幫紱鎶婇噴鏀懼悗鍙板簲鐢ㄥ崰鐢ㄨ祫婧愮殑宸ヤ綔鏀懼湪contextDestroyed鏉ュ鐞嗐備絾鎴戜滑鍚姩鐨勫悗鍙頒換鍔″父甯告槸鏈夎姹傜殑錛屾瘮濡傛椂闂達(dá)紝棰戠巼絳夛紝鎴戝湪榪欓噷浣跨敤浜嗕竴涓紑婧愮粍浠訛細(xì)quartz銆?br /> 銆銆
銆銆姝ラ
銆銆
銆銆1.鍐欎笟鍔¤皟鐢ㄧ被錛?/strong>
銆銆
銆銆// DumbJob.java
銆銆import org.quartz.*;
銆銆import java.util.*;
銆銆public class DumbJob implements Job {
銆銆public DumbJob() {
銆銆}
銆銆public void execute(JobExecutionContext context)
銆銆throws JobExecutionException
銆銆{
銆銆//鍦ㄨ繖閲屽啓涓氬姟澶勭悊浠g爜銆備粈涔堬紝浣犱笉鐭ラ亾錛熼偅浣犲埆闂垜錛侊紒:-<
銆銆}
銆銆}
銆銆
銆銆鏈被鐨勪富瑕佸姛鑳芥槸鐢眖uartz涓皟搴︾被鎸夌収鎸囧畾鐨勮鍒欒繘琛岃皟鐢ㄦ墽琛屽繀瑕佺殑涓氬姟閫昏緫銆?br /> 銆銆
銆銆2.鍐欒皟搴︾被
銆銆
銆銆// TestShedule.java
銆銆import org.quartz.*;
銆銆import java.util.*;
銆銆
銆銆public class TestShedule{
銆銆static SchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory();
銆銆static Scheduler sched;
銆銆
銆銆public static void run()throws Exception{
銆銆sched = schedFact.getScheduler();銆銆//鑾峰彇璋冨害綆$悊鍣?br /> 銆銆JobDetail jobDetail = new JobDetail("myJob",
銆銆sched.DEFAULT_GROUP,
銆銆DumbJob.class);//鍒涘緩宸ヤ綔
銆銆CronTrigger trigger = new CronTrigger("myTrigger","test","0/10 * * * * ?");//鍒涘緩瑙﹀彂鍣?br /> 銆銆sched.scheduleJob(jobDetail, trigger);銆銆//娣誨姞鍒拌皟搴︾鐞嗗櫒涓?br /> 銆銆sched.start();//鍚姩璋冨害綆$悊鍣?br /> 銆銆}
銆銆
銆銆public static void銆銆 stop()throws Exception{
銆銆sched.shutdown();
銆銆}
銆銆}
銆銆鏈被鐨勭洰鐨勬槸璁劇疆璋冪敤瑙勫垯錛屽湪榪欓噷鎴戠敤浜?#8220;0/10 * * * * ?”琛ㄧず姣?0縐掗挓灝辨墽琛屼竴嬈★紝鏈夊叧琛ㄨ揪寮忕殑璇存槑璇峰弬闃卶uartz鐨刟pi鏂囨。銆?br /> 銆銆
銆銆3.緙栧啓鏈嶅姟鍚姩綾伙細(xì)
銆銆
銆銆//ServiceLoader.java
銆銆import javax.servlet.ServletContextEvent;
銆銆import javax.servlet.ServletContextListener;
銆銆
銆銆public class ServiceLoader implements ServletContextListener {
銆銆public void contextInitialized(ServletContextEvent sce) {
銆銆try{
銆銆TestShedule.run();
銆銆}catch(Exception ex){
銆銆System.out.println(ex.getMessage());
銆銆}
銆銆}
銆銆
銆銆public void contextDestroyed(ServletContextEvent sce) {
銆銆try{
銆銆TestShedule.stop();
銆銆}catch(Exception ex){
銆銆System.out.println(ex.getMessage());
銆銆}
銆銆}
銆銆}
銆銆鍦╟ontextInitialized涓皟鐢═estShedule.run()鍚姩鍚庡彴浠誨姟錛涘湪contextDestroyed涓皟鐢═estShedule.stop()鍋滄鍚庡彴浠誨姟銆?br /> 銆銆
銆銆4.閮ㄧ講鏈嶅姟鍚姩綾?/strong>
銆銆
銆銆鍦╳eb.xml鏂囦歡涓鍔犲涓嬩竴琛岄厤緗細(xì)
銆銆<?xml version="1.0" encoding="UTF-8"?>
銆銆<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
銆銆<web-app id="WebApp">
銆銆<display-name>root</display-name>
銆銆<!--涓嬭竟鐨刲istener閮ㄥ垎灝辨槸閰嶇疆淇℃伅-->
銆銆<listener>
銆銆<listener-class>ServiceLoader </listener-class>
銆銆</listener>
銆銆<welcome-file-list>
銆銆<welcome-file>index.html</welcome-file>
銆銆</welcome-file-list>
銆銆</web-app>
銆銆
銆銆5.鍚姩web鏈嶅姟鍗沖彲銆?/strong>
銆銆
銆銆鎬葷粨
銆銆
銆銆鍏跺疄瀹炵幇榪欎釜鍔熻兘鐨勬柟娉曞緢澶氾紝鎴戝湪榪欓噷鏄簲鐢ㄤ簡ServletContextListener鎺ュ彛鍜屽紑婧恆pi quartz錛屽笇鏈涜兘瀵逛綘鐨勫紑鍙戞湁鎵甯姪銆?br />

紺肩墿 2007-09-11 10:13 鍙戣〃璇勮
]]>
jbpm oracle 鏁版嵁搴撹剼鏈?/title><link>http://www.tkk7.com/libin2722/articles/143256.html</link><dc:creator>紺肩墿</dc:creator><author>紺肩墿</author><pubDate>Thu, 06 Sep 2007 10:40:00 GMT</pubDate><guid>http://www.tkk7.com/libin2722/articles/143256.html</guid><wfw:comment>http://www.tkk7.com/libin2722/comments/143256.html</wfw:comment><comments>http://www.tkk7.com/libin2722/articles/143256.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/libin2722/comments/commentRss/143256.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/libin2722/services/trackbacks/143256.html</trackback:ping><description><![CDATA[<p>/*<br /> SQLyog Enterprise - MySQL GUI v5.02<br /> Host - 5.0.27-community-nt : Database - jbpm<br /> *********************************************************************<br /> Server version : 5.0.27-community-nt<br /> */</p> <p><br /> create database if not exists `jbpm`;</p> <p>USE `jbpm`;</p> <p>SET FOREIGN_KEY_CHECKS=0;</p> <p>/*Table structure for table `jbpm_action` */</p> <p>DROP TABLE IF EXISTS `jbpm_action`;</p> <p>CREATE TABLE `jbpm_action` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `class` char(1) NOT NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `ISPROPAGATIONALLOWED_` integer(1) default NULL,<br />   `ACTIONEXPRESSION_` varchar(255) default NULL,<br />   `ISASYNC_` integer(1) default NULL,<br />   `REFERENCEDACTION_` bigint(20) default NULL,<br />   `ACTIONDELEGATION_` bigint(20) default NULL,<br />   `EVENT_` bigint(20) default NULL,<br />   `PROCESSDEFINITION_` bigint(20) default NULL,<br />   `TIMERNAME_` varchar(255) default NULL,<br />   `DUEDATE_` varchar(255) default NULL,<br />   `REPEAT_` varchar(255) default NULL,<br />   `TRANSITIONNAME_` varchar(255) default NULL,<br />   `TIMERACTION_` bigint(20) default NULL,<br />   `EXPRESSION_` mediumtext,<br />   `EVENTINDEX_` int(11) default NULL,<br />   `EXCEPTIONHANDLER_` bigint(20) default NULL,<br />   `EXCEPTIONHANDLERINDEX_` int(11) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_ACTION_EVENT` (`EVENT_`),<br />   KEY `IDX_ACTION_ACTNDL` (`ACTIONDELEGATION_`),<br />   KEY `IDX_ACTION_PROCDF` (`PROCESSDEFINITION_`),<br />   KEY `FK_ACTION_EVENT` (`EVENT_`),<br />   KEY `FK_ACTION_EXPTHDL` (`EXCEPTIONHANDLER_`),<br />   KEY `FK_ACTION_PROCDEF` (`PROCESSDEFINITION_`),<br />   KEY `FK_CRTETIMERACT_TA` (`TIMERACTION_`),<br />   KEY `FK_ACTION_ACTNDEL` (`ACTIONDELEGATION_`),<br />   KEY `FK_ACTION_REFACT` (`REFERENCEDACTION_`),<br />   CONSTRAINT `FK_ACTION_REFACT` FOREIGN KEY (`REFERENCEDACTION_`) REFERENCES `jbpm_action` (`ID_`),<br />   CONSTRAINT `FK_ACTION_ACTNDEL` FOREIGN KEY (`ACTIONDELEGATION_`) REFERENCES `jbpm_delegation` (`ID_`),<br />   CONSTRAINT `FK_ACTION_EVENT` FOREIGN KEY (`EVENT_`) REFERENCES `jbpm_event` (`ID_`),<br />   CONSTRAINT `FK_ACTION_EXPTHDL` FOREIGN KEY (`EXCEPTIONHANDLER_`) REFERENCES `jbpm_exceptionhandler` (`ID_`),<br />   CONSTRAINT `FK_ACTION_PROCDEF` FOREIGN KEY (`PROCESSDEFINITION_`) REFERENCES `jbpm_processdefinition` (`ID_`),<br />   CONSTRAINT `FK_CRTETIMERACT_TA` FOREIGN KEY (`TIMERACTION_`) REFERENCES `jbpm_action` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_bytearray` */</p> <p>DROP TABLE IF EXISTS `jbpm_bytearray`;</p> <p>CREATE TABLE `jbpm_bytearray` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `NAME_` varchar(255) default NULL,<br />   `FILEDEFINITION_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `FK_BYTEARR_FILDEF` (`FILEDEFINITION_`),<br />   CONSTRAINT `FK_BYTEARR_FILDEF` FOREIGN KEY (`FILEDEFINITION_`) REFERENCES `jbpm_moduledefinition` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_byteblock` */</p> <p>DROP TABLE IF EXISTS `jbpm_byteblock`;</p> <p>CREATE TABLE `jbpm_byteblock` (<br />   `PROCESSFILE_` bigint(20) NOT NULL,<br />   `BYTES_` blob,<br />   `INDEX_` int(11) NOT NULL,<br />   PRIMARY KEY  (`PROCESSFILE_`,`INDEX_`),<br />   KEY `FK_BYTEBLOCK_FILE` (`PROCESSFILE_`),<br />   CONSTRAINT `FK_BYTEBLOCK_FILE` FOREIGN KEY (`PROCESSFILE_`) REFERENCES `jbpm_bytearray` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_comment` */</p> <p>DROP TABLE IF EXISTS `jbpm_comment`;</p> <p>CREATE TABLE `jbpm_comment` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `VERSION_` int(11) NOT NULL,<br />   `ACTORID_` varchar(255) default NULL,<br />   `TIME_` datetime default NULL,<br />   `MESSAGE_` mediumtext,<br />   `TOKEN_` bigint(20) default NULL,<br />   `TASKINSTANCE_` bigint(20) default NULL,<br />   `TOKENINDEX_` int(11) default NULL,<br />   `TASKINSTANCEINDEX_` int(11) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_COMMENT_TOKEN` (`TOKEN_`),<br />   KEY `IDX_COMMENT_TSK` (`TASKINSTANCE_`),<br />   KEY `FK_COMMENT_TOKEN` (`TOKEN_`),<br />   KEY `FK_COMMENT_TSK` (`TASKINSTANCE_`),<br />   CONSTRAINT `FK_COMMENT_TSK` FOREIGN KEY (`TASKINSTANCE_`) REFERENCES `jbpm_taskinstance` (`ID_`),<br />   CONSTRAINT `FK_COMMENT_TOKEN` FOREIGN KEY (`TOKEN_`) REFERENCES `jbpm_token` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_decisionconditions` */</p> <p>DROP TABLE IF EXISTS `jbpm_decisionconditions`;</p> <p>CREATE TABLE `jbpm_decisionconditions` (<br />   `DECISION_` bigint(20) NOT NULL,<br />   `TRANSITIONNAME_` varchar(255) default NULL,<br />   `EXPRESSION_` varchar(255) default NULL,<br />   `INDEX_` int(11) NOT NULL,<br />   PRIMARY KEY  (`DECISION_`,`INDEX_`),<br />   KEY `FK_DECCOND_DEC` (`DECISION_`),<br />   CONSTRAINT `FK_DECCOND_DEC` FOREIGN KEY (`DECISION_`) REFERENCES `jbpm_node` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_delegation` */</p> <p>DROP TABLE IF EXISTS `jbpm_delegation`;</p> <p>CREATE TABLE `jbpm_delegation` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASSNAME_` mediumtext,<br />   `CONFIGURATION_` mediumtext,<br />   `CONFIGTYPE_` varchar(255) default NULL,<br />   `PROCESSDEFINITION_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_DELEG_PRCD` (`PROCESSDEFINITION_`),<br />   KEY `FK_DELEGATION_PRCD` (`PROCESSDEFINITION_`),<br />   CONSTRAINT `FK_DELEGATION_PRCD` FOREIGN KEY (`PROCESSDEFINITION_`) REFERENCES `jbpm_processdefinition` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_event` */</p> <p>DROP TABLE IF EXISTS `jbpm_event`;</p> <p>CREATE TABLE `jbpm_event` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `EVENTTYPE_` varchar(255) default NULL,<br />   `TYPE_` char(1) default NULL,<br />   `GRAPHELEMENT_` bigint(20) default NULL,<br />   `PROCESSDEFINITION_` bigint(20) default NULL,<br />   `NODE_` bigint(20) default NULL,<br />   `TRANSITION_` bigint(20) default NULL,<br />   `TASK_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `FK_EVENT_PROCDEF` (`PROCESSDEFINITION_`),<br />   KEY `FK_EVENT_NODE` (`NODE_`),<br />   KEY `FK_EVENT_TRANS` (`TRANSITION_`),<br />   KEY `FK_EVENT_TASK` (`TASK_`),<br />   CONSTRAINT `FK_EVENT_TASK` FOREIGN KEY (`TASK_`) REFERENCES `jbpm_task` (`ID_`),<br />   CONSTRAINT `FK_EVENT_NODE` FOREIGN KEY (`NODE_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_EVENT_PROCDEF` FOREIGN KEY (`PROCESSDEFINITION_`) REFERENCES `jbpm_processdefinition` (`ID_`),<br />   CONSTRAINT `FK_EVENT_TRANS` FOREIGN KEY (`TRANSITION_`) REFERENCES `jbpm_transition` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_exceptionhandler` */</p> <p>DROP TABLE IF EXISTS `jbpm_exceptionhandler`;</p> <p>CREATE TABLE `jbpm_exceptionhandler` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `EXCEPTIONCLASSNAME_` text,<br />   `TYPE_` char(1) default NULL,<br />   `GRAPHELEMENT_` bigint(20) default NULL,<br />   `PROCESSDEFINITION_` bigint(20) default NULL,<br />   `GRAPHELEMENTINDEX_` int(11) default NULL,<br />   `NODE_` bigint(20) default NULL,<br />   `TRANSITION_` bigint(20) default NULL,<br />   `TASK_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_id_group` */</p> <p>DROP TABLE IF EXISTS `jbpm_id_group`;</p> <p>CREATE TABLE `jbpm_id_group` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `TYPE_` varchar(255) default NULL,<br />   `PARENT_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `FK_ID_GRP_PARENT` (`PARENT_`),<br />   CONSTRAINT `FK_ID_GRP_PARENT` FOREIGN KEY (`PARENT_`) REFERENCES `jbpm_id_group` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_id_membership` */</p> <p>DROP TABLE IF EXISTS `jbpm_id_membership`;</p> <p>CREATE TABLE `jbpm_id_membership` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `ROLE_` varchar(255) default NULL,<br />   `USER_` bigint(20) default NULL,<br />   `GROUP_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `FK_ID_MEMSHIP_GRP` (`GROUP_`),<br />   KEY `FK_ID_MEMSHIP_USR` (`USER_`),<br />   CONSTRAINT `FK_ID_MEMSHIP_USR` FOREIGN KEY (`USER_`) REFERENCES `jbpm_id_user` (`ID_`),<br />   CONSTRAINT `FK_ID_MEMSHIP_GRP` FOREIGN KEY (`GROUP_`) REFERENCES `jbpm_id_group` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_id_permissions` */</p> <p>DROP TABLE IF EXISTS `jbpm_id_permissions`;</p> <p>CREATE TABLE `jbpm_id_permissions` (<br />   `ENTITY_` bigint(20) NOT NULL,<br />   `CLASS_` varchar(255) default NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `ACTION_` varchar(255) default NULL<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_id_user` */</p> <p>DROP TABLE IF EXISTS `jbpm_id_user`;</p> <p>CREATE TABLE `jbpm_id_user` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `EMAIL_` varchar(255) default NULL,<br />   `PASSWORD_` varchar(255) default NULL,<br />   PRIMARY KEY  (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_job` */</p> <p>DROP TABLE IF EXISTS `jbpm_job`;</p> <p>CREATE TABLE `jbpm_job` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `VERSION_` int(11) NOT NULL,<br />   `DUEDATE_` datetime default NULL,<br />   `PROCESSINSTANCE_` bigint(20) default NULL,<br />   `TOKEN_` bigint(20) default NULL,<br />   `TASKINSTANCE_` bigint(20) default NULL,<br />   `ISSUSPENDED_` integer(1) default NULL,<br />   `ISEXCLUSIVE_` integer(1) default NULL,<br />   `LOCKOWNER_` varchar(255) default NULL,<br />   `LOCKTIME_` datetime default NULL,<br />   `EXCEPTION_` mediumtext,<br />   `RETRIES_` int(11) default NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `REPEAT_` varchar(255) default NULL,<br />   `TRANSITIONNAME_` varchar(255) default NULL,<br />   `ACTION_` bigint(20) default NULL,<br />   `GRAPHELEMENTTYPE_` varchar(255) default NULL,<br />   `GRAPHELEMENT_` bigint(20) default NULL,<br />   `NODE_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_JOB_TSKINST` (`TASKINSTANCE_`),<br />   KEY `IDX_JOB_PRINST` (`PROCESSINSTANCE_`),<br />   KEY `IDX_JOB_TOKEN` (`TOKEN_`),<br />   KEY `FK_JOB_TOKEN` (`TOKEN_`),<br />   KEY `FK_JOB_NODE` (`NODE_`),<br />   KEY `FK_JOB_PRINST` (`PROCESSINSTANCE_`),<br />   KEY `FK_JOB_ACTION` (`ACTION_`),<br />   KEY `FK_JOB_TSKINST` (`TASKINSTANCE_`),<br />   CONSTRAINT `FK_JOB_TSKINST` FOREIGN KEY (`TASKINSTANCE_`) REFERENCES `jbpm_taskinstance` (`ID_`),<br />   CONSTRAINT `FK_JOB_ACTION` FOREIGN KEY (`ACTION_`) REFERENCES `jbpm_action` (`ID_`),<br />   CONSTRAINT `FK_JOB_NODE` FOREIGN KEY (`NODE_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_JOB_PRINST` FOREIGN KEY (`PROCESSINSTANCE_`) REFERENCES `jbpm_processinstance` (`ID_`),<br />   CONSTRAINT `FK_JOB_TOKEN` FOREIGN KEY (`TOKEN_`) REFERENCES `jbpm_token` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_log` */</p> <p>DROP TABLE IF EXISTS `jbpm_log`;</p> <p>CREATE TABLE `jbpm_log` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `INDEX_` int(11) default NULL,<br />   `DATE_` datetime default NULL,<br />   `TOKEN_` bigint(20) default NULL,<br />   `PARENT_` bigint(20) default NULL,<br />   `MESSAGE_` mediumtext,<br />   `EXCEPTION_` mediumtext,<br />   `ACTION_` bigint(20) default NULL,<br />   `NODE_` bigint(20) default NULL,<br />   `ENTER_` datetime default NULL,<br />   `LEAVE_` datetime default NULL,<br />   `DURATION_` bigint(20) default NULL,<br />   `NEWLONGVALUE_` bigint(20) default NULL,<br />   `TRANSITION_` bigint(20) default NULL,<br />   `CHILD_` bigint(20) default NULL,<br />   `SOURCENODE_` bigint(20) default NULL,<br />   `DESTINATIONNODE_` bigint(20) default NULL,<br />   `VARIABLEINSTANCE_` bigint(20) default NULL,<br />   `OLDBYTEARRAY_` bigint(20) default NULL,<br />   `NEWBYTEARRAY_` bigint(20) default NULL,<br />   `OLDDATEVALUE_` datetime default NULL,<br />   `NEWDATEVALUE_` datetime default NULL,<br />   `OLDDOUBLEVALUE_` double default NULL,<br />   `NEWDOUBLEVALUE_` double default NULL,<br />   `OLDLONGIDCLASS_` varchar(255) default NULL,<br />   `OLDLONGIDVALUE_` bigint(20) default NULL,<br />   `NEWLONGIDCLASS_` varchar(255) default NULL,<br />   `NEWLONGIDVALUE_` bigint(20) default NULL,<br />   `OLDSTRINGIDCLASS_` varchar(255) default NULL,<br />   `OLDSTRINGIDVALUE_` varchar(255) default NULL,<br />   `NEWSTRINGIDCLASS_` varchar(255) default NULL,<br />   `NEWSTRINGIDVALUE_` varchar(255) default NULL,<br />   `OLDLONGVALUE_` bigint(20) default NULL,<br />   `OLDSTRINGVALUE_` mediumtext,<br />   `NEWSTRINGVALUE_` mediumtext,<br />   `TASKINSTANCE_` bigint(20) default NULL,<br />   `TASKACTORID_` varchar(255) default NULL,<br />   `TASKOLDACTORID_` varchar(255) default NULL,<br />   `SWIMLANEINSTANCE_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `FK_LOG_SOURCENODE` (`SOURCENODE_`),<br />   KEY `FK_LOG_TOKEN` (`TOKEN_`),<br />   KEY `FK_LOG_OLDBYTES` (`OLDBYTEARRAY_`),<br />   KEY `FK_LOG_NEWBYTES` (`NEWBYTEARRAY_`),<br />   KEY `FK_LOG_CHILDTOKEN` (`CHILD_`),<br />   KEY `FK_LOG_DESTNODE` (`DESTINATIONNODE_`),<br />   KEY `FK_LOG_TASKINST` (`TASKINSTANCE_`),<br />   KEY `FK_LOG_SWIMINST` (`SWIMLANEINSTANCE_`),<br />   KEY `FK_LOG_PARENT` (`PARENT_`),<br />   KEY `FK_LOG_NODE` (`NODE_`),<br />   KEY `FK_LOG_ACTION` (`ACTION_`),<br />   KEY `FK_LOG_VARINST` (`VARIABLEINSTANCE_`),<br />   KEY `FK_LOG_TRANSITION` (`TRANSITION_`),<br />   CONSTRAINT `FK_LOG_TRANSITION` FOREIGN KEY (`TRANSITION_`) REFERENCES `jbpm_transition` (`ID_`),<br />   CONSTRAINT `FK_LOG_ACTION` FOREIGN KEY (`ACTION_`) REFERENCES `jbpm_action` (`ID_`),<br />   CONSTRAINT `FK_LOG_CHILDTOKEN` FOREIGN KEY (`CHILD_`) REFERENCES `jbpm_token` (`ID_`),<br />   CONSTRAINT `FK_LOG_DESTNODE` FOREIGN KEY (`DESTINATIONNODE_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_LOG_NEWBYTES` FOREIGN KEY (`NEWBYTEARRAY_`) REFERENCES `jbpm_bytearray` (`ID_`),<br />   CONSTRAINT `FK_LOG_NODE` FOREIGN KEY (`NODE_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_LOG_OLDBYTES` FOREIGN KEY (`OLDBYTEARRAY_`) REFERENCES `jbpm_bytearray` (`ID_`),<br />   CONSTRAINT `FK_LOG_PARENT` FOREIGN KEY (`PARENT_`) REFERENCES `jbpm_log` (`ID_`),<br />   CONSTRAINT `FK_LOG_SOURCENODE` FOREIGN KEY (`SOURCENODE_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_LOG_SWIMINST` FOREIGN KEY (`SWIMLANEINSTANCE_`) REFERENCES `jbpm_swimlaneinstance` (`ID_`),<br />   CONSTRAINT `FK_LOG_TASKINST` FOREIGN KEY (`TASKINSTANCE_`) REFERENCES `jbpm_taskinstance` (`ID_`),<br />   CONSTRAINT `FK_LOG_TOKEN` FOREIGN KEY (`TOKEN_`) REFERENCES `jbpm_token` (`ID_`),<br />   CONSTRAINT `FK_LOG_VARINST` FOREIGN KEY (`VARIABLEINSTANCE_`) REFERENCES `jbpm_variableinstance` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_moduledefinition` */</p> <p>DROP TABLE IF EXISTS `jbpm_moduledefinition`;</p> <p>CREATE TABLE `jbpm_moduledefinition` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `NAME_` mediumtext,<br />   `PROCESSDEFINITION_` bigint(20) default NULL,<br />   `STARTTASK_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_MODDEF_PROCDF` (`PROCESSDEFINITION_`),<br />   KEY `FK_TSKDEF_START` (`STARTTASK_`),<br />   KEY `FK_MODDEF_PROCDEF` (`PROCESSDEFINITION_`),<br />   CONSTRAINT `FK_MODDEF_PROCDEF` FOREIGN KEY (`PROCESSDEFINITION_`) REFERENCES `jbpm_processdefinition` (`ID_`),<br />   CONSTRAINT `FK_TSKDEF_START` FOREIGN KEY (`STARTTASK_`) REFERENCES `jbpm_task` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_moduleinstance` */</p> <p>DROP TABLE IF EXISTS `jbpm_moduleinstance`;</p> <p>CREATE TABLE `jbpm_moduleinstance` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `VERSION_` int(11) NOT NULL,<br />   `PROCESSINSTANCE_` bigint(20) default NULL,<br />   `TASKMGMTDEFINITION_` bigint(20) default NULL,<br />   `NAME_` varchar(255) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_MODINST_PRINST` (`PROCESSINSTANCE_`),<br />   KEY `FK_TASKMGTINST_TMD` (`TASKMGMTDEFINITION_`),<br />   KEY `FK_MODINST_PRCINST` (`PROCESSINSTANCE_`),<br />   CONSTRAINT `FK_MODINST_PRCINST` FOREIGN KEY (`PROCESSINSTANCE_`) REFERENCES `jbpm_processinstance` (`ID_`),<br />   CONSTRAINT `FK_TASKMGTINST_TMD` FOREIGN KEY (`TASKMGMTDEFINITION_`) REFERENCES `jbpm_moduledefinition` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_node` */</p> <p>DROP TABLE IF EXISTS `jbpm_node`;</p> <p>CREATE TABLE `jbpm_node` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `DESCRIPTION_` mediumtext,<br />   `PROCESSDEFINITION_` bigint(20) default NULL,<br />   `ISASYNC_` integer(1) default NULL,<br />   `ISASYNCEXCL_` integer(1) default NULL,<br />   `ACTION_` bigint(20) default NULL,<br />   `SUPERSTATE_` bigint(20) default NULL,<br />   `SUBPROCNAME_` varchar(255) default NULL,<br />   `SUBPROCESSDEFINITION_` bigint(20) default NULL,<br />   `DECISIONEXPRESSION_` varchar(255) default NULL,<br />   `DECISIONDELEGATION` bigint(20) default NULL,<br />   `SCRIPT_` bigint(20) default NULL,<br />   `SIGNAL_` int(11) default NULL,<br />   `CREATETASKS_` integer(1) default NULL,<br />   `ENDTASKS_` integer(1) default NULL,<br />   `NODECOLLECTIONINDEX_` int(11) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_PSTATE_SBPRCDEF` (`SUBPROCESSDEFINITION_`),<br />   KEY `IDX_NODE_SUPRSTATE` (`SUPERSTATE_`),<br />   KEY `IDX_NODE_PROCDEF` (`PROCESSDEFINITION_`),<br />   KEY `IDX_NODE_ACTION` (`ACTION_`),<br />   KEY `FK_PROCST_SBPRCDEF` (`SUBPROCESSDEFINITION_`),<br />   KEY `FK_NODE_PROCDEF` (`PROCESSDEFINITION_`),<br />   KEY `FK_NODE_SCRIPT` (`SCRIPT_`),<br />   KEY `FK_NODE_ACTION` (`ACTION_`),<br />   KEY `FK_DECISION_DELEG` (`DECISIONDELEGATION`),<br />   KEY `FK_NODE_SUPERSTATE` (`SUPERSTATE_`),<br />   CONSTRAINT `FK_NODE_SUPERSTATE` FOREIGN KEY (`SUPERSTATE_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_DECISION_DELEG` FOREIGN KEY (`DECISIONDELEGATION`) REFERENCES `jbpm_delegation` (`ID_`),<br />   CONSTRAINT `FK_NODE_ACTION` FOREIGN KEY (`ACTION_`) REFERENCES `jbpm_action` (`ID_`),<br />   CONSTRAINT `FK_NODE_PROCDEF` FOREIGN KEY (`PROCESSDEFINITION_`) REFERENCES `jbpm_processdefinition` (`ID_`),<br />   CONSTRAINT `FK_NODE_SCRIPT` FOREIGN KEY (`SCRIPT_`) REFERENCES `jbpm_action` (`ID_`),<br />   CONSTRAINT `FK_PROCST_SBPRCDEF` FOREIGN KEY (`SUBPROCESSDEFINITION_`) REFERENCES `jbpm_processdefinition` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_pooledactor` */</p> <p>DROP TABLE IF EXISTS `jbpm_pooledactor`;</p> <p>CREATE TABLE `jbpm_pooledactor` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `VERSION_` int(11) NOT NULL,<br />   `ACTORID_` varchar(255) default NULL,<br />   `SWIMLANEINSTANCE_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_PLDACTR_ACTID` (`ACTORID_`),<br />   KEY `IDX_TSKINST_SWLANE` (`SWIMLANEINSTANCE_`),<br />   KEY `FK_POOLEDACTOR_SLI` (`SWIMLANEINSTANCE_`),<br />   CONSTRAINT `FK_POOLEDACTOR_SLI` FOREIGN KEY (`SWIMLANEINSTANCE_`) REFERENCES `jbpm_swimlaneinstance` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_processdefinition` */</p> <p>DROP TABLE IF EXISTS `jbpm_processdefinition`;</p> <p>CREATE TABLE `jbpm_processdefinition` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `DESCRIPTION_` mediumtext,<br />   `VERSION_` int(11) default NULL,<br />   `ISTERMINATIONIMPLICIT_` integer(1) default NULL,<br />   `STARTSTATE_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_PROCDEF_STRTST` (`STARTSTATE_`),<br />   KEY `FK_PROCDEF_STRTSTA` (`STARTSTATE_`),<br />   CONSTRAINT `FK_PROCDEF_STRTSTA` FOREIGN KEY (`STARTSTATE_`) REFERENCES `jbpm_node` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_processinstance` */</p> <p>DROP TABLE IF EXISTS `jbpm_processinstance`;</p> <p>CREATE TABLE `jbpm_processinstance` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `VERSION_` int(11) NOT NULL,<br />   `KEY_` varchar(255) default NULL,<br />   `START_` datetime default NULL,<br />   `END_` datetime default NULL,<br />   `ISSUSPENDED_` integer(1) default NULL,<br />   `PROCESSDEFINITION_` bigint(20) default NULL,<br />   `ROOTTOKEN_` bigint(20) default NULL,<br />   `SUPERPROCESSTOKEN_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   UNIQUE KEY `KEY_` (`KEY_`,`PROCESSDEFINITION_`),<br />   KEY `IDX_PROCIN_ROOTTK` (`ROOTTOKEN_`),<br />   KEY `IDX_PROCIN_SPROCTK` (`SUPERPROCESSTOKEN_`),<br />   KEY `IDX_PROCIN_PROCDEF` (`PROCESSDEFINITION_`),<br />   KEY `FK_PROCIN_PROCDEF` (`PROCESSDEFINITION_`),<br />   KEY `FK_PROCIN_ROOTTKN` (`ROOTTOKEN_`),<br />   KEY `FK_PROCIN_SPROCTKN` (`SUPERPROCESSTOKEN_`),<br />   CONSTRAINT `FK_PROCIN_SPROCTKN` FOREIGN KEY (`SUPERPROCESSTOKEN_`) REFERENCES `jbpm_token` (`ID_`),<br />   CONSTRAINT `FK_PROCIN_PROCDEF` FOREIGN KEY (`PROCESSDEFINITION_`) REFERENCES `jbpm_processdefinition` (`ID_`),<br />   CONSTRAINT `FK_PROCIN_ROOTTKN` FOREIGN KEY (`ROOTTOKEN_`) REFERENCES `jbpm_token` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_runtimeaction` */</p> <p>DROP TABLE IF EXISTS `jbpm_runtimeaction`;</p> <p>CREATE TABLE `jbpm_runtimeaction` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `VERSION_` int(11) NOT NULL,<br />   `EVENTTYPE_` varchar(255) default NULL,<br />   `TYPE_` char(1) default NULL,<br />   `GRAPHELEMENT_` bigint(20) default NULL,<br />   `PROCESSINSTANCE_` bigint(20) default NULL,<br />   `ACTION_` bigint(20) default NULL,<br />   `PROCESSINSTANCEINDEX_` int(11) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_RTACTN_PRCINST` (`PROCESSINSTANCE_`),<br />   KEY `IDX_RTACTN_ACTION` (`ACTION_`),<br />   KEY `FK_RTACTN_PROCINST` (`PROCESSINSTANCE_`),<br />   KEY `FK_RTACTN_ACTION` (`ACTION_`),<br />   CONSTRAINT `FK_RTACTN_ACTION` FOREIGN KEY (`ACTION_`) REFERENCES `jbpm_action` (`ID_`),<br />   CONSTRAINT `FK_RTACTN_PROCINST` FOREIGN KEY (`PROCESSINSTANCE_`) REFERENCES `jbpm_processinstance` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_swimlane` */</p> <p>DROP TABLE IF EXISTS `jbpm_swimlane`;</p> <p>CREATE TABLE `jbpm_swimlane` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `NAME_` varchar(255) default NULL,<br />   `ACTORIDEXPRESSION_` varchar(255) default NULL,<br />   `POOLEDACTORSEXPRESSION_` varchar(255) default NULL,<br />   `ASSIGNMENTDELEGATION_` bigint(20) default NULL,<br />   `TASKMGMTDEFINITION_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `FK_SWL_ASSDEL` (`ASSIGNMENTDELEGATION_`),<br />   KEY `FK_SWL_TSKMGMTDEF` (`TASKMGMTDEFINITION_`),<br />   CONSTRAINT `FK_SWL_TSKMGMTDEF` FOREIGN KEY (`TASKMGMTDEFINITION_`) REFERENCES `jbpm_moduledefinition` (`ID_`),<br />   CONSTRAINT `FK_SWL_ASSDEL` FOREIGN KEY (`ASSIGNMENTDELEGATION_`) REFERENCES `jbpm_delegation` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_swimlaneinstance` */</p> <p>DROP TABLE IF EXISTS `jbpm_swimlaneinstance`;</p> <p>CREATE TABLE `jbpm_swimlaneinstance` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `VERSION_` int(11) NOT NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `ACTORID_` varchar(255) default NULL,<br />   `SWIMLANE_` bigint(20) default NULL,<br />   `TASKMGMTINSTANCE_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_SWIMLINST_SL` (`SWIMLANE_`),<br />   KEY `FK_SWIMLANEINST_TM` (`TASKMGMTINSTANCE_`),<br />   KEY `FK_SWIMLANEINST_SL` (`SWIMLANE_`),<br />   CONSTRAINT `FK_SWIMLANEINST_SL` FOREIGN KEY (`SWIMLANE_`) REFERENCES `jbpm_swimlane` (`ID_`),<br />   CONSTRAINT `FK_SWIMLANEINST_TM` FOREIGN KEY (`TASKMGMTINSTANCE_`) REFERENCES `jbpm_moduleinstance` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_task` */</p> <p>DROP TABLE IF EXISTS `jbpm_task`;</p> <p>CREATE TABLE `jbpm_task` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `NAME_` varchar(255) default NULL,<br />   `DESCRIPTION_` mediumtext,<br />   `PROCESSDEFINITION_` bigint(20) default NULL,<br />   `ISBLOCKING_` integer(1) default NULL,<br />   `ISSIGNALLING_` integer(1) default NULL,<br />   `CONDITION_` varchar(255) default NULL,<br />   `DUEDATE_` varchar(255) default NULL,<br />   `PRIORITY_` int(11) default NULL,<br />   `ACTORIDEXPRESSION_` varchar(255) default NULL,<br />   `POOLEDACTORSEXPRESSION_` varchar(255) default NULL,<br />   `TASKMGMTDEFINITION_` bigint(20) default NULL,<br />   `TASKNODE_` bigint(20) default NULL,<br />   `STARTSTATE_` bigint(20) default NULL,<br />   `ASSIGNMENTDELEGATION_` bigint(20) default NULL,<br />   `SWIMLANE_` bigint(20) default NULL,<br />   `TASKCONTROLLER_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_TASK_TSKNODE` (`TASKNODE_`),<br />   KEY `IDX_TASK_PROCDEF` (`PROCESSDEFINITION_`),<br />   KEY `IDX_TASK_TASKMGTDF` (`TASKMGMTDEFINITION_`),<br />   KEY `FK_TSK_TSKCTRL` (`TASKCONTROLLER_`),<br />   KEY `FK_TASK_ASSDEL` (`ASSIGNMENTDELEGATION_`),<br />   KEY `FK_TASK_TASKNODE` (`TASKNODE_`),<br />   KEY `FK_TASK_PROCDEF` (`PROCESSDEFINITION_`),<br />   KEY `FK_TASK_STARTST` (`STARTSTATE_`),<br />   KEY `FK_TASK_TASKMGTDEF` (`TASKMGMTDEFINITION_`),<br />   KEY `FK_TASK_SWIMLANE` (`SWIMLANE_`),<br />   CONSTRAINT `FK_TASK_SWIMLANE` FOREIGN KEY (`SWIMLANE_`) REFERENCES `jbpm_swimlane` (`ID_`),<br />   CONSTRAINT `FK_TASK_ASSDEL` FOREIGN KEY (`ASSIGNMENTDELEGATION_`) REFERENCES `jbpm_delegation` (`ID_`),<br />   CONSTRAINT `FK_TASK_PROCDEF` FOREIGN KEY (`PROCESSDEFINITION_`) REFERENCES `jbpm_processdefinition` (`ID_`),<br />   CONSTRAINT `FK_TASK_STARTST` FOREIGN KEY (`STARTSTATE_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_TASK_TASKMGTDEF` FOREIGN KEY (`TASKMGMTDEFINITION_`) REFERENCES `jbpm_moduledefinition` (`ID_`),<br />   CONSTRAINT `FK_TASK_TASKNODE` FOREIGN KEY (`TASKNODE_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_TSK_TSKCTRL` FOREIGN KEY (`TASKCONTROLLER_`) REFERENCES `jbpm_taskcontroller` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_taskactorpool` */</p> <p>DROP TABLE IF EXISTS `jbpm_taskactorpool`;</p> <p>CREATE TABLE `jbpm_taskactorpool` (<br />   `TASKINSTANCE_` bigint(20) NOT NULL,<br />   `POOLEDACTOR_` bigint(20) NOT NULL,<br />   PRIMARY KEY  (`TASKINSTANCE_`,`POOLEDACTOR_`),<br />   KEY `FK_TSKACTPOL_PLACT` (`POOLEDACTOR_`),<br />   KEY `FK_TASKACTPL_TSKI` (`TASKINSTANCE_`),<br />   CONSTRAINT `FK_TASKACTPL_TSKI` FOREIGN KEY (`TASKINSTANCE_`) REFERENCES `jbpm_taskinstance` (`ID_`),<br />   CONSTRAINT `FK_TSKACTPOL_PLACT` FOREIGN KEY (`POOLEDACTOR_`) REFERENCES `jbpm_pooledactor` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_taskcontroller` */</p> <p>DROP TABLE IF EXISTS `jbpm_taskcontroller`;</p> <p>CREATE TABLE `jbpm_taskcontroller` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `TASKCONTROLLERDELEGATION_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `FK_TSKCTRL_DELEG` (`TASKCONTROLLERDELEGATION_`),<br />   CONSTRAINT `FK_TSKCTRL_DELEG` FOREIGN KEY (`TASKCONTROLLERDELEGATION_`) REFERENCES `jbpm_delegation` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_taskinstance` */</p> <p>DROP TABLE IF EXISTS `jbpm_taskinstance`;</p> <p>CREATE TABLE `jbpm_taskinstance` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `VERSION_` int(11) NOT NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `DESCRIPTION_` mediumtext,<br />   `ACTORID_` varchar(255) default NULL,<br />   `CREATE_` datetime default NULL,<br />   `START_` datetime default NULL,<br />   `END_` datetime default NULL,<br />   `DUEDATE_` datetime default NULL,<br />   `PRIORITY_` int(11) default NULL,<br />   `ISCANCELLED_` integer(1) default NULL,<br />   `ISSUSPENDED_` integer(1) default NULL,<br />   `ISOPEN_` integer(1) default NULL,<br />   `ISSIGNALLING_` integer(1) default NULL,<br />   `ISBLOCKING_` integer(1) default NULL,<br />   `TASK_` bigint(20) default NULL,<br />   `TOKEN_` bigint(20) default NULL,<br />   `PROCINST_` bigint(20) default NULL,<br />   `SWIMLANINSTANCE_` bigint(20) default NULL,<br />   `TASKMGMTINSTANCE_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_TASKINST_TOKN` (`TOKEN_`),<br />   KEY `IDX_TASKINST_TSK` (`TASK_`,`PROCINST_`),<br />   KEY `IDX_TSKINST_TMINST` (`TASKMGMTINSTANCE_`),<br />   KEY `IDX_TSKINST_SLINST` (`SWIMLANINSTANCE_`),<br />   KEY `IDX_TASK_ACTORID` (`ACTORID_`),<br />   KEY `FK_TSKINS_PRCINS` (`PROCINST_`),<br />   KEY `FK_TASKINST_TMINST` (`TASKMGMTINSTANCE_`),<br />   KEY `FK_TASKINST_TOKEN` (`TOKEN_`),<br />   KEY `FK_TASKINST_SLINST` (`SWIMLANINSTANCE_`),<br />   KEY `FK_TASKINST_TASK` (`TASK_`),<br />   CONSTRAINT `FK_TASKINST_TASK` FOREIGN KEY (`TASK_`) REFERENCES `jbpm_task` (`ID_`),<br />   CONSTRAINT `FK_TASKINST_SLINST` FOREIGN KEY (`SWIMLANINSTANCE_`) REFERENCES `jbpm_swimlaneinstance` (`ID_`),<br />   CONSTRAINT `FK_TASKINST_TMINST` FOREIGN KEY (`TASKMGMTINSTANCE_`) REFERENCES `jbpm_moduleinstance` (`ID_`),<br />   CONSTRAINT `FK_TASKINST_TOKEN` FOREIGN KEY (`TOKEN_`) REFERENCES `jbpm_token` (`ID_`),<br />   CONSTRAINT `FK_TSKINS_PRCINS` FOREIGN KEY (`PROCINST_`) REFERENCES `jbpm_processinstance` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_token` */</p> <p>DROP TABLE IF EXISTS `jbpm_token`;</p> <p>CREATE TABLE `jbpm_token` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `VERSION_` int(11) NOT NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `START_` datetime default NULL,<br />   `END_` datetime default NULL,<br />   `NODEENTER_` datetime default NULL,<br />   `NEXTLOGINDEX_` int(11) default NULL,<br />   `ISABLETOREACTIVATEPARENT_` integer(1) default NULL,<br />   `ISTERMINATIONIMPLICIT_` integer(1) default NULL,<br />   `ISSUSPENDED_` integer(1) default NULL,<br />   `LOCK_` varchar(255) default NULL,<br />   `NODE_` bigint(20) default NULL,<br />   `PROCESSINSTANCE_` bigint(20) default NULL,<br />   `PARENT_` bigint(20) default NULL,<br />   `SUBPROCESSINSTANCE_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_TOKEN_PROCIN` (`PROCESSINSTANCE_`),<br />   KEY `IDX_TOKEN_SUBPI` (`SUBPROCESSINSTANCE_`),<br />   KEY `IDX_TOKEN_NODE` (`NODE_`),<br />   KEY `IDX_TOKEN_PARENT` (`PARENT_`),<br />   KEY `FK_TOKEN_PARENT` (`PARENT_`),<br />   KEY `FK_TOKEN_NODE` (`NODE_`),<br />   KEY `FK_TOKEN_PROCINST` (`PROCESSINSTANCE_`),<br />   KEY `FK_TOKEN_SUBPI` (`SUBPROCESSINSTANCE_`),<br />   CONSTRAINT `FK_TOKEN_SUBPI` FOREIGN KEY (`SUBPROCESSINSTANCE_`) REFERENCES `jbpm_processinstance` (`ID_`),<br />   CONSTRAINT `FK_TOKEN_NODE` FOREIGN KEY (`NODE_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_TOKEN_PARENT` FOREIGN KEY (`PARENT_`) REFERENCES `jbpm_token` (`ID_`),<br />   CONSTRAINT `FK_TOKEN_PROCINST` FOREIGN KEY (`PROCESSINSTANCE_`) REFERENCES `jbpm_processinstance` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_tokenvariablemap` */</p> <p>DROP TABLE IF EXISTS `jbpm_tokenvariablemap`;</p> <p>CREATE TABLE `jbpm_tokenvariablemap` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `VERSION_` int(11) NOT NULL,<br />   `TOKEN_` bigint(20) default NULL,<br />   `CONTEXTINSTANCE_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_TKVARMAP_CTXT` (`CONTEXTINSTANCE_`),<br />   KEY `IDX_TKVVARMP_TOKEN` (`TOKEN_`),<br />   KEY `FK_TKVARMAP_CTXT` (`CONTEXTINSTANCE_`),<br />   KEY `FK_TKVARMAP_TOKEN` (`TOKEN_`),<br />   CONSTRAINT `FK_TKVARMAP_TOKEN` FOREIGN KEY (`TOKEN_`) REFERENCES `jbpm_token` (`ID_`),<br />   CONSTRAINT `FK_TKVARMAP_CTXT` FOREIGN KEY (`CONTEXTINSTANCE_`) REFERENCES `jbpm_moduleinstance` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_transition` */</p> <p>DROP TABLE IF EXISTS `jbpm_transition`;</p> <p>CREATE TABLE `jbpm_transition` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `NAME_` varchar(255) default NULL,<br />   `DESCRIPTION_` mediumtext,<br />   `PROCESSDEFINITION_` bigint(20) default NULL,<br />   `FROM_` bigint(20) default NULL,<br />   `TO_` bigint(20) default NULL,<br />   `CONDITION_` varchar(255) default NULL,<br />   `FROMINDEX_` int(11) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_TRANSIT_TO` (`TO_`),<br />   KEY `IDX_TRANSIT_FROM` (`FROM_`),<br />   KEY `IDX_TRANS_PROCDEF` (`PROCESSDEFINITION_`),<br />   KEY `FK_TRANSITION_TO` (`TO_`),<br />   KEY `FK_TRANS_PROCDEF` (`PROCESSDEFINITION_`),<br />   KEY `FK_TRANSITION_FROM` (`FROM_`),<br />   CONSTRAINT `FK_TRANSITION_FROM` FOREIGN KEY (`FROM_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_TRANSITION_TO` FOREIGN KEY (`TO_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_TRANS_PROCDEF` FOREIGN KEY (`PROCESSDEFINITION_`) REFERENCES `jbpm_processdefinition` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_variableaccess` */</p> <p>DROP TABLE IF EXISTS `jbpm_variableaccess`;</p> <p>CREATE TABLE `jbpm_variableaccess` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `VARIABLENAME_` varchar(255) default NULL,<br />   `ACCESS_` varchar(255) default NULL,<br />   `MAPPEDNAME_` varchar(255) default NULL,<br />   `PROCESSSTATE_` bigint(20) default NULL,<br />   `TASKCONTROLLER_` bigint(20) default NULL,<br />   `INDEX_` int(11) default NULL,<br />   `SCRIPT_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `FK_VARACC_TSKCTRL` (`TASKCONTROLLER_`),<br />   KEY `FK_VARACC_SCRIPT` (`SCRIPT_`),<br />   KEY `FK_VARACC_PROCST` (`PROCESSSTATE_`),<br />   CONSTRAINT `FK_VARACC_PROCST` FOREIGN KEY (`PROCESSSTATE_`) REFERENCES `jbpm_node` (`ID_`),<br />   CONSTRAINT `FK_VARACC_SCRIPT` FOREIGN KEY (`SCRIPT_`) REFERENCES `jbpm_action` (`ID_`),<br />   CONSTRAINT `FK_VARACC_TSKCTRL` FOREIGN KEY (`TASKCONTROLLER_`) REFERENCES `jbpm_taskcontroller` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>/*Table structure for table `jbpm_variableinstance` */</p> <p>DROP TABLE IF EXISTS `jbpm_variableinstance`;</p> <p>CREATE TABLE `jbpm_variableinstance` (<br />   `ID_` bigint(20) NOT NULL auto_increment,<br />   `CLASS_` char(1) NOT NULL,<br />   `VERSION_` int(11) NOT NULL,<br />   `NAME_` varchar(255) default NULL,<br />   `CONVERTER_` char(1) default NULL,<br />   `TOKEN_` bigint(20) default NULL,<br />   `TOKENVARIABLEMAP_` bigint(20) default NULL,<br />   `PROCESSINSTANCE_` bigint(20) default NULL,<br />   `BYTEARRAYVALUE_` bigint(20) default NULL,<br />   `DATEVALUE_` datetime default NULL,<br />   `DOUBLEVALUE_` double default NULL,<br />   `LONGIDCLASS_` varchar(255) default NULL,<br />   `LONGVALUE_` bigint(20) default NULL,<br />   `STRINGIDCLASS_` varchar(255) default NULL,<br />   `STRINGVALUE_` varchar(255) default NULL,<br />   `TASKINSTANCE_` bigint(20) default NULL,<br />   PRIMARY KEY  (`ID_`),<br />   KEY `IDX_VARINST_TKVARMP` (`TOKENVARIABLEMAP_`),<br />   KEY `IDX_VARINST_PRCINS` (`PROCESSINSTANCE_`),<br />   KEY `IDX_VARINST_TK` (`TOKEN_`),<br />   KEY `FK_VARINST_TK` (`TOKEN_`),<br />   KEY `FK_VARINST_TKVARMP` (`TOKENVARIABLEMAP_`),<br />   KEY `FK_VARINST_PRCINST` (`PROCESSINSTANCE_`),<br />   KEY `FK_VAR_TSKINST` (`TASKINSTANCE_`),<br />   KEY `FK_BYTEINST_ARRAY` (`BYTEARRAYVALUE_`),<br />   CONSTRAINT `FK_BYTEINST_ARRAY` FOREIGN KEY (`BYTEARRAYVALUE_`) REFERENCES `jbpm_bytearray` (`ID_`),<br />   CONSTRAINT `FK_VARINST_PRCINST` FOREIGN KEY (`PROCESSINSTANCE_`) REFERENCES `jbpm_processinstance` (`ID_`),<br />   CONSTRAINT `FK_VARINST_TK` FOREIGN KEY (`TOKEN_`) REFERENCES `jbpm_token` (`ID_`),<br />   CONSTRAINT `FK_VARINST_TKVARMP` FOREIGN KEY (`TOKENVARIABLEMAP_`) REFERENCES `jbpm_tokenvariablemap` (`ID_`),<br />   CONSTRAINT `FK_VAR_TSKINST` FOREIGN KEY (`TASKINSTANCE_`) REFERENCES `jbpm_taskinstance` (`ID_`)<br /> ) ENGINE=InnoDB DEFAULT CHARSET=gbk;</p> <p>SET FOREIGN_KEY_CHECKS=1;<br /> </p> <img src ="http://www.tkk7.com/libin2722/aggbug/143256.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/libin2722/" target="_blank">紺肩墿</a> 2007-09-06 18:40 <a href="http://www.tkk7.com/libin2722/articles/143256.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>JBPM鏁版嵁搴撹〃璇存槑http://www.tkk7.com/libin2722/articles/143249.html紺肩墿紺肩墿Thu, 06 Sep 2007 10:13:00 GMThttp://www.tkk7.com/libin2722/articles/143249.htmlhttp://www.tkk7.com/libin2722/comments/143249.htmlhttp://www.tkk7.com/libin2722/articles/143249.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143249.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143249.html闃呰鍏ㄦ枃

紺肩墿 2007-09-06 18:13 鍙戣〃璇勮
]]>
涓涓狫BPM宸ヤ綔嫻佺鐞嗙ず渚?/title><link>http://www.tkk7.com/libin2722/articles/143250.html</link><dc:creator>紺肩墿</dc:creator><author>紺肩墿</author><pubDate>Thu, 06 Sep 2007 10:13:00 GMT</pubDate><guid>http://www.tkk7.com/libin2722/articles/143250.html</guid><wfw:comment>http://www.tkk7.com/libin2722/comments/143250.html</wfw:comment><comments>http://www.tkk7.com/libin2722/articles/143250.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/libin2722/comments/commentRss/143250.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/libin2722/services/trackbacks/143250.html</trackback:ping><description><![CDATA[  <p style="margin-bottom: 12pt"><strong><span style="font-weight: normal; font-size: 9pt; color: black; font-family: 瀹嬩綋">涓涓狫BPM宸ヤ綔嫻佺鐞嗙ず渚?/span></strong></p> <p><span style="color: black; font-family: 瀹嬩綋">涓涓狫BPM宸ヤ綔嫻佺鐞嗙ず渚?</span></p> <p><span style="font-size: 10pt; color: black; font-family: 瀹嬩綋">紺轟緥錛?br /> 鍦ㄦ煇涓鍏徃涓紝閮ㄩ棬鍛樺伐瑕佷紤鍋囩殑璇濋渶瑕侀儴闂ㄤ富綆$殑鎵瑰噯銆傚鏋滀紤鍋囧ぉ鏁板ぇ浜?0澶╃殑璇濓紝鍦ㄩ儴闂ㄤ富綆$殑鍚屾剰鍚庯紝榪樺繀欏諱笂綰т富綆℃壒鍑嗐傚鏋滄槸閮ㄩ棬涓葷瑕佷紤鍋囧彧瑕佷笂綰т富綆℃壒鍑嗗嵆鍙傚湪浼戝亣琚壒鍑嗕箣鍓嶏紝鐢寵浜哄彲浠ユ挙閿浼戝亣鐢寵銆?br /> 姣忎釜鍛樺伐榪樻湁澶氬皯澶╀紤鍋囧繀欏葷鐞嗚搗鏉ワ紝鍦ㄥ憳宸ユ彁浜や紤鍋囩敵璇鋒椂瑕佹鏌ョ敵璇峰ぉ鏁版槸鍚﹁秴榪囧彲鐢ㄥぉ鏁般傜敵璇鋒壒鍑嗗悗錛岃鍦ㄥ彲鐢ㄥぉ鏁伴噷鍑忓幓鐢寵澶╂暟銆傛瘡嬈′紤鍋囩敵璇風(fēng)粨鏉熶箣鍚庯紝涓嶇閫氳繃鏈氳繃鎴栨槸鍚﹀彇娑堬紝閮藉繀欏昏褰曚笅鏉ャ備富綆″湪鎵瑰鐢寵涔嬪悗錛岀郴緇熻灝嗘壒澶嶇粨鏋淓mail緇欑敵璇蜂漢銆傚浜庡ぇ浜?0澶╃殑鐢寵錛屽鏋滈儴闂ㄤ富綆″凡鎵瑰噯鍚屾剰鑰屼笂綰т富綆¤繕鏈壒鍑嗭紝榪欐椂鐢寵浜烘挙閿鐢寵鍚庯紝緋葷粺搴斿彂Email閫氱煡閮ㄩ棬涓葷鐢寵宸叉挙閿銆?nbsp;<br />   processdefinition.xml濡備笅錛?br /> <?xml version="1.0" encoding="UTF-8"?><br /> <!-- edited with XMLSPY v2004 rel. 3 U (<a ><span style="color: black">http://www.xmlspy.com</a>) by keller (zju) --><br /> <!DOCTYPE process-definition PUBLIC<br />     "-//jBpm/jBpm Mapping DTD 2.0//EN"<br />     "<a ><span style="color: black">http://jbpm.org/dtd/processdefinition-2.0.dtd</span></a>"><br /> <process-definition  name="RequestLeave"><br />  <swimlane name="requester"><br />   <description></span>鐢寵鑰?lt;/description><br />  </swimlane><br />  <swimlane name="chief"><br />   <description>閮ㄩ棬涓葷</description><br />   <delegation class="kellerdu.jbpm.delegation.ChiefSwimlane"/><br />  </swimlane><br />  <swimlane name="boss"><br />   <description>涓婄駭涓葷</description><br />   <delegation class="kellerdu.jbpm.delegation.BossSwimlane"/><br />  </swimlane><br />  <start-state name="request" swimlane="requester"><br />   <transition to="BeginRequest"/><br />  </start-state><br />  <fork name="BeginRequest"><br />   <transition to="RequesterCancel"/><br />   <transition to="IsChief"/><br />  </fork><br />  <decision name="IsChief"><br />   <delegation class="kellerdu.jbpm.delegation.ChiefDecision"/><br />   <transition name="BossApprove"  to="BossApprove"/><br />   <transition name="ChiefApprove"  to="ChiefApprove"/><br />  </decision><br />  <state name="RequesterCancel"><br />   <assignment swimlane="requester"/><br />   <transition name="cancel" to="Decided"><br />    <action><br />     <!-- 灝嗚鍋囩殑鐘舵佹敼鍙樹負(fù)“鍙栨秷”--><br />     <delegation class="kellerdu.jbpm.action.RequestCancel"/><br />    </action><br />   </transition><br />  </state><br />  <state name="ChiefApprove"><br />   <assignment swimlane="chief"/><br />   <transition name="approve" to="NeedBossApprove"><br />    <action><br />     <!-- 灝嗚鍋囩殑鐘舵佹敼鍙樹負(fù)“涓葷鎵瑰噯”--><br />     <delegation class="kellerdu.jbpm.action.ChiefApprove"/><br />    </action><br />   </transition><br />   <transition name="disapprove" to="Decided"><br />    <action><br />     <!-- 灝嗚鍋囩殑鐘舵佹敼鍙樹負(fù)“涓葷鍚﹀喅”--><br />     <delegation class="kellerdu.jbpm.action.ChiefDisapprove"/><br />    </action><br />   </transition><br />  </state><br />  <state name="BossApprove"><br />   <assignment swimlane="boss"/><br />   <transition name="approve" to="Decided"><br />    <action><br />     <!-- 灝嗚鍋囩殑鐘舵佹敼鍙樹負(fù)“鑰佹澘鎵瑰噯”--><br />     <delegation class="kellerdu.jbpm.action.BossApprove"/><br />    </action><br />   </transition><br />   <transition name="disapprove" to="Decided"><br />    <action><br />     <!-- 灝嗚鍋囩殑鐘舵佹敼鍙樹負(fù)“鑰佹澘鍚﹀喅”--><br />     <delegation class="kellerdu.jbpm.action.BossDisapprove"/><br />    </action><br />   </transition><br />  </state><br />  <decision name="NeedBossApprove"><br />   <!-- 璇峰亣澶╂暟澶т簬10澶╃殑瑕佽佹澘鎵瑰噯  --><br />   <delegation class="kellerdu.jbpm.delegation.NeedBossApproveDecision"/><br />   <transition name="need" to="BossApprove"/><br />   <transition name="notNeed" to="Decided"/><br />  </decision><br />  <join name="Decided"><br />   <description>鏈変竴涓厛鍒拌揪鍗寵繘琛岀埗Token</description><br />   <delegation class="kellerdu.jbpm.delegation.DecidedJoin"/><br />   <transition to="DoSomething"/><br />  </join><br />  <decision name="DoSomething"><br />   <description><br />     鏍規(guī)嵁璇鋒眰鐨勭姸鎬佸喅瀹氥?br />     錛?錛?#8220;涓葷鎴栬呰佹澘鎵瑰噯”錛?#8216;approve’錛氫慨鏀瑰憳宸ヤ紤鍋囩殑鎬誨ぉ鏁幫紝璁懼畾鍙戠粰鐢ㄦ埛E-Mail鐨勪俊鎭?br />     錛?錛?#8220;涓葷鎴栬呰佹澘鍚﹀喅”-“disapprove”錛氳瀹氬彂緇欑敤鎴稥錛峂ail鐨勪俊鎭?br />     錛?錛?#8220;鎾ら攢”-"cancel"錛嶈瀹氬彂緇欑敤鎴稥錛峂ail鐨勪俊鎭傚鏋滀富綆℃壒鍑嗭紝瑕佸彂緇欎富綆℃秷鎭鏄庡凡緇忔挙閿銆?br />     </description><br />   <delegation class="kellerdu.jbpm.delegation.DoSomethingDecision"/><br />   <transition name="disapprove" to="Finished"><br />    <action><br />     <delegation class="kellerdu.jbpm.action.Disapprove"/><br />    </action><br />   </transition><br />   <transition name="approve" to="Finished"><br />    <action><br />     <delegation class="kellerdu.jbpm.action.Approve"/><br />    </action><br />   </transition><br />   <transition name="cancel" to="Finished"><br />    <action><br />     <delegation class="kellerdu.jbpm.action.Cancel"/><br />    </action><br />   </transition><br />  </decision><br />  <end-state name="Finished"/><br />  <action event-type="process-end"><br />   <!-- 鍙戦丒錛峂ail娑堟伅緇欑敵璇瘋(gè)咃紝璁板綍璇峰亣鏃ュ織 --><br />   <delegation class="kellerdu.jbpm.action.ProcessEndAction"/><br />  </action><br /> </process-definition> </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">Action</span><span style="font-size: 10pt; color: black">鎸囨槑鐨勬槸褰撳墠鐘舵佽鎵ц鐨勪竴浜涢澶栫殑鎿嶄綔錛屽璁板綍log銆佸彂閭歡絳夈?br /> 錛?錛塖wimline鐨刣elegation瑕佸仛鐨勫氨鏄垽鍒綋鍓岮ctor鐨勮韓浠姐?br /> package kellerdu.jbpm.delegation; </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">import org.jbpm.delegation.*;<br /> import kellerdu.jbpm.LogsFactory;<br /> import org.apache.commons.logging.Log; </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">public class BossSwimlane implements AssignmentHandler {<br />     public BossSwimlane() {<br />     } </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">    /**<br />      * </span><span style="font-size: 10pt; color: black">褰撳墠鐨勭姸鎬佹湁鍝釜actor鏉ュ叿浣撹礋璐e鐞嗭紝閫夋嫨鏄佹澘鐨刟ctor鏉ュ鐞嗐?br />      *<br />      * 濡傛灉鐜嬫灄鏄佹澘錛岄偅涔堜粬璇峰亣鍙互鐢ㄤ粬鐨勫悕縐版潵寮濮嬩竴涓鍋囨祦紼嬶紝褰撲粬媯(gè)鏌ヤ粬闇瑕佹壒紺虹殑<br />      * 璇峰亣鏃訛紝浣跨敤actorId=boss鏉ユ壘鍑烘墍鏈夌殑鎵圭ず銆傝繖鏃秙electActor榪斿洖鐨勫煎氨鏄竴涓父閲?#8220;boss”<br />      *<br />      *<br />      * @param assignmentContext AssignmentContext<br />      * @return String<br />      * @todo Implement this org.jbpm.delegation.AssignmentHandler method<br />      */<br />     public String selectActor(AssignmentContext assignmentContext) {<br />         Log log = LogsFactory.getLogInstance(this.getClass());<br />         log.info("浠誨姟鍒嗛厤緇欒佹澘");<br />         return "boss";<br />     }<br /> }<br /> 錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳<br /> ackage kellerdu.jbpm.delegation; </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">import org.jbpm.delegation.*;<br /> import kellerdu.jbpm.LogsFactory;<br /> import org.apache.commons.logging.Log; </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">public class ChiefSwimlane implements AssignmentHandler {<br />     public ChiefSwimlane() {<br />     } </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">    /**<br />      * selectActor<br />      * @see BossSwimlane<br />      *<br />      * @param assignmentContext AssignmentContext<br />      * @return String<br />      * @todo Implement this org.jbpm.delegation.AssignmentHandler method<br />      */<br />     public String selectActor(AssignmentContext assignmentContext) {<br />        Log log = LogsFactory.getLogInstance(this.getClass());<br />         log.info("</span><span style="font-size: 10pt; color: black">浠誨姟鍒嗛厤緇欎笂綰т富綆?);<br />        return "chief";<br />     }<br /> } </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">錛堜簩錛塂ecision<br /> package kellerdu.jbpm.delegation; </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">import org.jbpm.delegation.*;<br /> import kellerdu.jbpm.LogsFactory;<br /> import org.apache.commons.logging.Log;<br /> import kellerdu.jbpm.Constants; </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">public class ChiefDecision implements DecisionHandler {<br />     public ChiefDecision() {<br />     } </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">    /**<br />      * </span><span style="font-size: 10pt; color: black">鍒ゆ柇鏄惁闇瑕佷富綆℃壒鍑嗭紝鍐沖畾涓嬩竴涓榪涜鐨則ransition<br />      *<br />      * @param executionContext ExecutionContext<br />      * @return String<br />      * @todo Implement this org.jbpm.delegation.DecisionHandler method<br />      */<br />     public String decide(ExecutionContext executionContext) {<br />         Log log=LogsFactory.getLogInstance(this.getClass());<br />         String ac=(String)executionContext.getVariable(Constants.USER_NAME);<br />         if(ac!=null&&(ac.equals("dali")||ac.equals("wang"))){<br />             log.info(ac+"闇瑕佽佹澘鎵瑰噯錛?);<br />             return "BossApprove";<br />         }else{<br />             log.info(ac+"闇瑕佸厛緇忎富綆℃壒鍑?);<br />             return "ChiefApprove";<br />         }<br />     }<br /> }<br /> 錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛?br /> 錛堜笁錛塮ork<br /> package kellerdu.jbpm.delegation; </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">import org.jbpm.*;<br /> import org.jbpm.delegation.*;<br /> import org.jbpm.model.execution.*;<br /> import java.util.*; </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">public class DecidedJoin implements JoinHandler {<br />     public DecidedJoin() {<br />     } </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">    /**<br />      * fork</span><span style="font-size: 10pt; color: black">錛屽彧瑕佷竴涓垎鏀埌杈撅紝鍗沖彲榪涜涓嬩竴姝ユ搷浣滐紝鍚屾椂鍙栨秷鍏跺畠鍚屾椂榪涜鐨勫垎鏀?br />      * 榪欓噷灝辨槸鐢ㄦ埛濡傛灉鍙栨秷錛岃鍋囧氨鍙栨秷銆傚鏋滅敤鎴瘋鍋囨壒鍑嗭紝鍒欑敤鎴蜂笉鑳藉彇娑堛?br />      *<br />      * @param forkContext ForkContext<br />      * @throws ExecutionException<br />      * @todo Implement this org.jbpm.delegation.ForkHandler method<br />      */<br />     public void join(JoinContext joinContext) throws ExecutionException {<br />         Iterator it=joinContext.getConcurrentTokens().values().iterator();<br />         Token arrivingToken = joinContext.getToken();<br />         while(it.hasNext()){<br />             Token to=(Token)it.next();<br />             if(to.getId().equals(arrivingToken.getId())){<br />                 //鍙栨秷鍏跺畠鎵ц鐨凾oken<br />                 joinContext.getExecutionService().cancelToken(to.getId());<br />             }<br />         }<br />          // reactivate the parent token.<br />           joinContext.reactivateToken( arrivingToken.getParent() );<br />     }<br /> } </span></p> <p style="text-justify: inter-ideograph; text-align: justify"><span style="font-size: 10pt; color: black">錛堜竴錛?nbsp;寮濮嬩竴涓鍋囨祦紼?br />        //user鏄鍋囦漢鐨刟ctorId<br />        ExecutionService es=JbpmServiceFactory.getInstance().openExecutionService(user);<br />         HashMap vs=new HashMap();<br />        //涓浜涘弬鏁?br />         vs.put(Constants.REQUEST_STATUS,String.valueOf(0));<br />         vs.put(Constants.REQUEST_RETURN_INFO,"No info!");<br />         vs.put(Constants.USER_NAME,EncodeTransfer.toISO(user));<br />         vs.put(Constants.REQUEST_DAYS,String.valueOf(rea.getDays()));<br />         try {<br />            //寮鍚鍋囨祦紼?br />             es.startProcessInstance(Constants.WORK_NAME, vs);<br />             log.info("["+user+"]"+"鐢寵鍋囨湡寮濮嬶紒璇峰亣"+rea.getDays()+"澶╋紒");<br />             return am.findForward("main");<br />         } catch (ExecutionException ex) {<br />             ex.printStackTrace();<br />             log.error("璇峰亣榪涚▼鏃犳硶寮濮嬶紒");<br />             return am.findForward("error");<br />         }finally{<br />             es.close();<br />         }<br /> 錛堜簩錛夊綋鍓嶆墽琛屼換鍔?br />     瀵逛簬閮ㄩ棬緇忕悊鎴栬呰佹澘錛屾壘鍒拌澶勭悊鐨勮鍋囥?br />        String actorId = (String) req.getSession().getAttribute(Constants.USER);<br />             if(actorId.equals("wang")){<br />                 actorId="boss";<br />             }else if(actorId.equals("bigli")){<br />                 actorId="chief";<br />             }<br />             // get the execution service<br />             ExecutionService executionService = JbpmServiceFactory.getInstance().<br />                                                 openExecutionService(actorId); </span></p> <p><span style="font-size: 10pt; color: black; font-family: 瀹嬩綋">            // get the tasklist from jbpm for user<br />             List tasks = new ArrayList();<br />             // add the jbpm tasks<br />             tasks.addAll(executionService.getTaskList(actorId));<br />             // put the tasklist into the form<br />             mf.setTasks(tasks);<br />             // get the tasklist from jbpm for user<br />             List definitions = new ArrayList();<br />             // add the jbpm definitions<br />             definitions.addAll(executionService.getLatestDefinitions());<br />             // put the tasklist into the form<br />             mf.setRequests(definitions);<br />             // close the execution service<br />             executionService.close();<br />             req.getSession().setAttribute("mainForm",mf);<br />             log.debug("</span><span style="font-size: 10pt; color: black; font-family: 瀹嬩綋">浠誨姟: " + tasks);<br />             log.debug("褰撳墠鍙互鎵ц鐨勮姹? " + definitions);<br /> 錛堜笁錛夊鐞嗚鍋?br />            String actorId = (String) reqrest.getSession().getAttribute(Constants.<br />                     USER);<br />             Long tokenId=new Long(req.getParameter("tokenId"));<br />             // get the execution service<br />             ExecutionService executionService = JbpmServiceFactory.getInstance().<br />                                                 openExecutionService(actorId);<br />             Map hm=executionService.getVariables(tokenId);//鍙橀噺<br />             String act=req.getParameter("action");//榪涜杞崲鐨則ransition<br />             executionService.endOfState(tokenId,hm,act);<br />             executionService.close();</span></p> v <img src ="http://www.tkk7.com/libin2722/aggbug/143250.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/libin2722/" target="_blank">紺肩墿</a> 2007-09-06 18:13 <a href="http://www.tkk7.com/libin2722/articles/143250.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>JBPM鐨勪竴浜涜祫鏂?/title><link>http://www.tkk7.com/libin2722/articles/143248.html</link><dc:creator>紺肩墿</dc:creator><author>紺肩墿</author><pubDate>Thu, 06 Sep 2007 10:11:00 GMT</pubDate><guid>http://www.tkk7.com/libin2722/articles/143248.html</guid><wfw:comment>http://www.tkk7.com/libin2722/comments/143248.html</wfw:comment><comments>http://www.tkk7.com/libin2722/articles/143248.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/libin2722/comments/commentRss/143248.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/libin2722/services/trackbacks/143248.html</trackback:ping><description><![CDATA[<p>鏍囬錛欽BPM鐨勪竴浜涜祫鏂?br /> 鍑哄錛氭睈蹇嗘椂絀猴細(xì)錛欳HIRS錛氾細(xì)铦惰。浜虹敓<br /> 鏃墮棿錛歍ue, 20 Jun 2006 09:53:24 +0000<br /> 浣滆咃細(xì)chirs@zhoujin.com<br /> 鍦板潃錛歸ww.zhoujin.com/read.php/18.htm</p> <p>鍐呭錛?br /> jPDL鐨勬祦紼嬪畾涔夊厓绱?<br /> 絎竴灞傜駭:GraphElement </p> <p>榪欎釜瀹規(guī)槗鐞嗚В,鍥犱負(fù)鍦ㄧ敾嫻佺▼瀹氫箟鏃?姣忎釜鎷栨媺鐨勫璞¢兘鏄竴涓猤raph鐨勫厓绱? </p> <p>GraphElement鏈夊洓涓睘鎬?1)processDefine 琛ㄧず褰撳墠鍏冪礌灞炰簬鍝釜嫻佺▼瀹氫箟 </p> <p>2)events 琛ㄧず鍙互鎺ユ敹鍝簺event </p> <p>3)name 鍚嶅瓧 </p> <p>4)exceptionHandlers 寮傚父澶勭悊綾婚泦鍚?List) </p> <p>絎簩灞傜駭:node;processDefinition;Transition;Task 瀹冧滑閮絠nherited from GraphElement </p> <p>1)processDefinition琛ㄧず嫻佺▼瀹氫箟(implements NodeCollection),瀹冩湁涓嬮潰鐨勫睘鎬?name,version,nodes,startState nodes琛ㄧず嫻佺▼涓墍鏈夌殑node,startState鐢ㄤ簬鍚姩嫻佺▼鏃舵壘鍒伴鑺傜偣 </p> <p>2)Transition琛ㄧず杞Щ,瀹冩湁涓変釜灞炴?from(Node),to(Node),supportedEventTypes琛ㄧず鏀寔鐨別vent綾誨瀷 </p> <p>3)node琛ㄧず鑺傜偣,瀹冩湁鍥涗釜灞炴?leaving transitions;arriving transitions;action;superState </p> <p>4)Task 瀹氫箟浠誨姟 </p> <p>絎笁灞傜駭:鍚勭涓嶅悓鐨刵ode,瀹冧滑閮絠nherited from node decision;EndState;Fork;Join;Merge;Milestone; InterleaveEnd;InterleaveStart;ProcessState;State 榪欎簺閮芥槸瑙佸悕鐭ヤ箟,鍜寈pdl宸笉澶? <br /> jbpm鐨凾oken <br /> jbpm涓渶閲嶈鐨勬蹇?搴旇鏄護(hù)鐗?Token)鍜屼俊浠?Signal) </p> <p>鍦ㄦ暣涓祦紼嬪疄渚嬭繍琛岃繃紼嬩腑,鎴戜滑鍙互榪呴熺殑鍒╃敤token寰楀埌鍏跺綋鍓嶇殑current state銆傚湪瑙e喅“騫惰”絳夛紙姣斿Fork錛夐棶棰樻椂錛宩Bpm璁㏕oken瀵硅薄緇存姢浜嗙埗瀛愬叧緋伙紝榪欑鍏崇郴鍦ㄦ秹鍙?qiáng)鍒癋ork鐨勬椂鍊欎細(xì)浜х敓銆?jBpm璁㏕oken榪欎釜瀵硅薄韜吋浜嗗縐嶄嬌鍛斤細(xì)錛?錛夊揩閫熷畾浣峜urrent state 錛?錛夌敤浜巉ork,join綆楁硶 錛?錛夌敤浜庡憡鐭ヤ換鍔℃墽琛岃呯殑浠誨姟绱㈠紩銆?</p> <p>濡備笅浠g爜: </p> <p>//pd鏄痯rocess definition,pi鏄痯rocess instance ProcessInstance </p> <p>pi = new ProcessInstance( pd ); </p> <p>//寰楀埌鏍逛護(hù)鐗?</p> <p>Token token = pi.getRootToken(); </p> <p>//鍙戜俊浠?</p> <p>token.signal(); </p> <p>Token鐨剆ignal鏂規(guī)硶涔熷彲浠ヤ紶鍏ransition鍙傛暟,榪欎釜鏂規(guī)硶鎶婁俊浠ゅ彂閫佺粰Token,榪欐牱,浠ょ墝灝嗚嬋媧?騫舵部鎸囧畾鐨則ransition紱誨紑褰撳墠鐨勭姸鎬?濡傛灉娌℃湁鎸囧畾transition,灝嗘部緙虹渷鐨則ransition 紱誨紑褰撳墠鐘舵?. </p> <p>jbpm鏄庝箞瀹炵幇鐨勫憿?鍏跺疄寰堢畝鍗? </p> <p>1)Token璁板綍浜嗗綋鍓嶇殑鐘舵侊紙current state錛?鍙湁褰撳墠鐨勭姸鎬?鎴栫О鑺傜偣)鎷ユ湁璇ヤ護(hù)鐗?</p> <p>2)鍚慣OKEN鍙憇ignal鍚?褰撳墠鐘舵佹敹鍒拌signal </p> <p>3)褰撳墠鐘舵佹妸浠ょ墝浼犵粰signal涓寚瀹氱殑transition </p> <p>4)transition鏀跺埌浠ょ墝鍚?涓嶅己鍗?椹笂鎶婁護(hù)鐗屼紶緇欎笅涓姸鎬? </p> <p>5)鏍規(guī)嵁浠ょ墝鐨勪綅緗?嫻佺▼鐨勭姸鎬佸凡緇忓彂鐢熸敼鍙? </p> <p><br /> 1銆乸rocess definition <br /> 涓涓猵rocess definition浠h〃浜嗕竴涓寮忕殑涓氬姟嫻佺▼錛屽畠浠ヤ竴涓祦紼嬪浘涓哄熀紜銆傝繖涓祦紼嬪浘鐢?璁稿node鍜宼ransition緇勬垚銆傛瘡涓猲ode鍦ㄨ繖涓祦紼嬪浘閲岄兘鏈夌潃鍚勮嚜鐗規(guī)畩鐨勭被鍨嬶紝榪欎簺涓嶅悓鐨勭被鍨嬪喅瀹氫簡node鍦ㄨ繍琛屾椂鐨勪笉鍚岃涓恒備竴涓猵rocess definition鍙湁涓涓猻tart state 銆?<br /> 2銆乼oken <br /> 涓涓猼oken浠h〃浜嗕竴鏉℃墽琛岃礬寰勶紝瀹冨寘鍚簡榪欐潯鎵ц璺緞鐨勫綋鍓嶇殑鎵ц鐘舵侊紙current state錛夈?<br /> 3銆乸rocess instance <br /> 涓涓猵rocess instance錛堟祦紼嬪疄渚嬶級(jí)鍗充竴涓猵rocess definition錛堟祦紼嬪畾涔夛級(jí)鐨勬祦紼嬫墽琛屽疄渚嬨備竴涓猵rocess definition鍙互瀵瑰簲澶氫釜process instance銆傚綋涓涓猵rocess instance琚垱寤虹殑鏃跺欙紝涓涓富鎵ц璺緞token鍚屾椂琚垱寤猴紝榪欎釜token鍙仛root token錛屽畠鎸囧悜嫻佺▼瀹氫箟鐨剆tart state錛坧rocessDefinition.getStartState()==token.getNode()錛夈?<br /> 4銆乻ignal <br /> 涓涓猻ignal 鍙戦佺粰token閫氱煡token 緇х畫嫻佺▼鐨勬墽琛屻傚鏋渟ignal 娌℃湁鎸囧畾transition錛宼oken灝嗘部緙虹渷鐨則ransition紱誨紑褰撳墠鐘舵?濡傛灉signal 鎸囧畾transition錛宼oken灝嗘部鎸囧畾鐨則ransition紱誨紑褰撳墠鐨勭姸鎬併傜湅婧愪唬鐮佸彲浠ョ湅鍒板彂緇檖rocess instance鐨剆ignal 鍏跺疄閮芥槸鍙戦佺粰浜唕oot token銆?<br /> 5銆丄ctions <br /> jbpm鎻愪緵浜嗙伒媧葷殑action 錛屽綋嫻佺▼鎵ц錛宼oken 榪涘叆node鍜宼ransition鏃訛紝浼?xì)瑙﹀彂鐩稿簲鐨勪竴浜沞vent錛堜簨浠訛級(jí)銆傚湪榪欎簺event涓婇檮涓婃垜浠嚜宸卞啓鐨刟ction錛屽氨浼?xì)甯﹀姩action 鐨勬墽琛屻俛ction閲屾槸鎴戜滑鑷繁鐨勭浉鍏砵ava鎿嶄綔浠g爜錛岄潪甯告柟渚褲傛敞鎰忕殑鏄痚vent錛堜簨浠訛級(jí)鏄唴緗殑錛屾棤娉曟墿灞曘傚彟澶栵紝action涔熷彲浠ョ洿鎺ユ寕鍦╪ode涓婏紝鑰屼笉渚濊禆浜巈vent錛堜簨浠訛級(jí)鐨勮Е鍙戯紝榪欎釜寰堥噸瑕侊紒 <br /> Node </p> <p><br /> 涓涓祦紼嬪浘鐢辮澶歯ode鍜宼ransition緇勬垚銆傛瘡涓猲ode閮芥湁涓縐嶇被鍨嬶紝榪欎釜綾誨瀷鍐沖畾浜嗗綋嫻佺▼鎵ц鍒拌繖涓猲ode鏃剁殑涓嶅悓琛屼負(fù)銆俲bpm鏈変竴緇刵ode type鍙互渚涗綘閫夋嫨錛屽綋鐒朵綘鍙互瀹氬埗鑷繁node 銆?<br /> node鐨勪綔鐢?<br /> node鏈変袱涓富瑕佺殑浣滅敤錛?<br /> 1錛夋墽琛宩ava浠g爜錛屾瘮濡傝鍒涘緩task instance錛堜換鍔″疄渚嬶級(jí)銆佸彂鍑洪氱煡銆佹洿鏂版暟鎹簱絳夌瓑銆傚緢鍏稿瀷鐨勫氨鏄湪node 涓婃寕涓婃垜浠殑action <br /> 2) 鎺у埗嫻佺▼鐨勬墽琛岋細(xì) <br /> A銆佺瓑寰呯姸鎬?<br /> 嫻佺▼榪涘叆鍒拌繖涓猲ode鏃跺皢澶勪簬絳夊緟鐘舵侊紝鐩村埌涓涓猻ignal 鐨勫彂鍑?<br /> B銆佹祦紼嬪皢娌跨潃涓涓猯eaving transition瓚婅繃榪欎釜node <br /> 榪欑鎯呭喌鐗規(guī)畩涓鐐癸紝闇瑕佹湁涓猘ction鎸傚湪榪欎釜node涓婏紙娉ㄦ剰榪欎釜action涓嶆槸event瑙﹀彂鐨勶紒錛夛紝action涓皢浼?xì)璋冪敤鍒癆PI閲?<br /> executionContext.leaveNode(String transitionName)錛宼ransitionName鍗寵繖閲岀殑leaving transition鍚嶅瓧銆?<br /> C銆佸垱寤烘柊鐨勬墽琛岃礬寰?<br /> 寰堝吀鍨嬬殑灝辨槸fork node銆傛祦紼嬪湪榪欓噷浼?xì)鍒嗗弶锛屼骇鐢熸柊鐨勬墽琛岃矾寰勩傝繖鏍峰氨鍒涘緩浜嗘柊鐨則oken錛屾瘡涓柊鐨則oken浠h〃涓涓柊鐨勬墽琛岃礬寰勩傛敞鎰忕殑鏄紝榪欎簺鏂扮殑token鍜屼駭鐢熷墠鐨則oken鏄埗瀛愬叧緋伙紒 <br /> D銆佺粨鏉熸墽琛岃礬寰?<br /> 涓涓猲ode鍙互緇撴潫涓鏉℃墽琛岃礬寰勶紝榪欏悓鏍鋒剰鍛崇潃鐩稿簲鐨則oken鐨勭粨鏉熷拰嫻佺▼鐨勭粨鏉熴?/p> <p>嫻佺▼鍥句腑鐨刵ode type </p> <p><br /> 1銆乼ask-node <br /> 涓涓猼ask-node鍙互鍖呭惈涓涓垨澶氫釜task錛岃繖浜泃ask鍒嗛厤緇欑壒瀹氱殑user銆傚綋嫻佺▼鎵ц鍒皌ask-node鏃訛紝task instance灝嗕細(xì)琚垱寤猴紝涓涓猼ask瀵瑰簲涓涓猼ask instance銆倀ask instances 鍒涘緩鍚庯紝task-node灝卞浜庣瓑寰呯姸鎬併傚綋鎵鏈夌殑task instances琚壒瀹氱殑user鎵ц瀹屾瘯鍚庯紝灝嗕細(xì)鍙戝嚭涓涓柊鐨剆ignal 鍒皌oken錛屽嵆嫻佺▼緇х畫鎵ц銆?<br /> 2銆乻tate <br /> state鏄竴涓函綺圭殑wait state(絳夊緟鐘舵侊級(jí)銆傚畠鍜宼ask-node鐨勫尯鍒氨鏄畠涓嶄細(xì)鍒涘緩task instances銆傚緢鍏稿瀷鐨勭敤娉曟槸錛屽綋榪涘叆榪欎釜鑺傜偣鏃訛紙閫氳繃緇戝畾涓涓猘ction鍒皀ode-enter event錛夛紝鍙戦佷竴鏉℃秷鎭埌澶栭儴鐨勭郴緇燂紝鐒跺悗嫻佺▼灝卞浜庣瓑寰呯姸鎬併傚閮ㄧ郴緇熷畬鎴愪竴浜涙搷浣滃悗榪斿洖涓鏉℃秷鎭紝榪欎釜娑堟伅瑙﹀彂涓涓猻ignal 鍒皌oken錛岀劧鍚庢祦紼嬬戶緇墽琛屻傦紙涓嶅父鐢級(jí) <br /> 3銆乨ecision <br /> 褰撻渶瑕佸湪嫻佺▼涓牴鎹笉鍚屾潯浠舵潵鍒ゆ柇鎵ц涓嶅悓璺緞鏃訛紝灝卞彲浠ョ敤decision鑺傜偣銆備袱縐嶆柟娉曪細(xì)鏈綆鍗曠殑鏄湪transitions閲屽鍔燾ondition elements錛堟潯浠訛級(jí)錛宑ondition鏄痓eanshell script鍐欑殑錛屽畠榪斿洖涓涓猙oolean銆傚綋榪愯鐨勬椂鍊欙紝decision鑺傜偣灝嗕細(xì)鍦ㄥ畠鐨?leaving transitions閲屽驚鐜紝鍚屾椂姣旇緝 leaving transitions閲岀殑condition錛屾渶鍏堣繑鍥?true'鐨刢ondition錛岄偅涓猯eaving transitions灝嗕細(xì)琚墽琛岋紱浣滀負(fù)閫夋嫨錛屼綘鍙互瀹炵幇DecisionHandler鎺ュ彛錛屽畠鏈変竴涓猟ecide()鏂規(guī)硶錛岃鏂規(guī)硶榪斿洖涓涓猄tring(leaving transition鐨勫悕瀛楋級(jí)銆?<br /> 4銆乫ork <br /> fork鑺傜偣鎶婁竴鏉℃墽琛岃礬寰勫垎紱繪垚澶氭潯鍚屾椂榪涜錛堝茍鍙戯級(jí)鐨勬墽琛岃礬寰勶紝姣忔潯紱誨紑fork鑺傜偣鐨勮礬寰勪駭鐢熶竴涓瓙token銆?<br /> 5銆乯oin <br /> 榛樿鎯呭喌涓嬶紝join鑺傜偣浼?xì)璁や负鎵鏈夊埌杈捐鑺傜偣鐨則oken閮芥湁鐫鐩稿悓鐨勭埗token銆俲oin 鑺傜偣浼?xì)缁撴潫姣忎竴涓埌杈捐鑺傜偣鐨則oken,褰撴墍鏈夌殑瀛恡oken閮藉埌杈捐鑺傜偣鍚庯紝鐖秚oken浼?xì)婵媧匯傚綋浠嶇劧鏈夊瓙token澶勪簬媧誨姩鐘舵佹椂錛宩oin 鑺傜偣鏄痺ait state(絳夊緟鐘舵侊級(jí)銆?<br /> 6銆乶ode <br /> node鑺傜偣灝辨槸璁╀綘鎸傝嚜宸辯殑action鐢ㄧ殑錛堟敞鎰忥細(xì)涓嶆槸event瑙﹀彂錛侊紒錛夛紝褰撴祦紼嬪埌杈捐鑺傜偣鏃訛紝action浼?xì)琚墽琛屻備綘鐨刟ction瑕佸疄鐜癆ctionHandler鎺ュ彛銆傚悓鏍鳳紝鍦ㄤ綘鐨刟ction閲岃鎺у埗嫻佺▼錛?/p> <p>Actions鐨勮鏄?</p> <p><br /> 瀛樺湪涓ょaction錛屼竴縐嶆槸 event瑙﹀彂鐨刟ction錛屼竴縐嶆槸鎸傚湪node 鑺傜偣鐨刟ction銆傝娉ㄦ剰瀹冧滑鐨勫尯鍒紝event瑙﹀彂鐨刟ction鏃犳硶鎺у埗嫻佺▼錛屼篃灝辨槸璇村畠鏃犳硶鍐沖畾嫻佺▼緇忚繃榪欎釜鑺傜偣鍚庝笅涓姝ュ皢鍒板摢涓涓猯eaving transition錛涜屾寕鍦╪ode 鑺傜偣鐨刟ction灝變笉鍚岋紝瀹冨彲浠ユ帶鍒舵祦紼嬨備笉綆℃槸鍝竴縐峚ction閮借瀹炵幇ActionHandler鎺ュ彛銆?<br /> variable鐨勭鐞?</p> <p><br /> 嫻佺▼瀹炰緥涓?瀛樻湁contextInstance鏉ョ鐞唗oken鍜寁ariable. <br /> contextInstance鏄氳繃涓涓猰ap鏉ヨ繘琛岀鐞嗙殑,榪欎釜map鐨刱ey鏄痶oken,value鏄竴涓猅okenVariableMap鐨勫璞? </p> <p>TokenVariableMap鏈韓騫朵笉鏄釜map,鑰屾槸涓涓櫘閫氱殑Object </p> <p>TokenVariableMap鏈変笁涓睘鎬?涓涓槸contextInstance,涓涓槸Token瀵硅薄鏈韓,榪樻湁涓涓槸 <br /> 涓涓狹ap,鐢ㄦ潵鏀緑ariableInstance,榪欎釜Map鐨勫悕縐頒負(fù)variableInstances. </p> <p>variableInstances鏄竴涓猰ap,瀹冪殑key鏄痸ariable鐨勫悕縐?濡?a",value鏄竴涓猇ariableInstance瀵硅薄,VariableInstance瀵硅薄鏀句簡鍥涗釜灞炴?涓涓槸token瀵硅薄鏈韓,涓涓槸variable鐨勫悕縐?涓涓槸TokenVariableMap瀵硅薄錛岃繕鏈変竴涓槸processInsance,浣犲彲鑳戒細(xì)濂囨細(xì)variable鐨剉alue鏀懼埌鍝噷鍛紵瀹為檯涓奦ariableInstance鏄竴涓娊璞$被錛屽叿浣撶殑瀹炵幇鏄畠鏍規(guī)嵁value鐨刢lass綾誨瀷閫夋嫨瀹冪殑瀛愮被錛屽瓙綾諱腑鏈変釜灞炴у彨value銆傝繖涓獀ariable鐨剉alue,濡?new Integer(3). </p> <p>涓涓祦紼嬪疄渚嬪彲浠ユ湁澶氫釜Token,Token闂存槸鏈夌埗瀛愬叧緋葷殑: <br /> Token tokenAB=new Token(tokenA,"ab"); <br /> 涓婅浠g爜鐨勬剰鎬濇槸鍦╰okenA涓嬮潰寤虹珛涓涓猅okenAB,璇ユ柊寤虹殑 <br /> Token鐨勫悕瀛楁槸"ab". </p> <p>ci.createVariable(tokenA, "a", new Integer(3)); <br /> 琛ㄧず鍦╰okenA鑼冨洿鍐呭緩绔嬩竴涓獀ariable,瀹冪殑鍚嶇О涓?a", <br /> 鍊間負(fù)new Integer(3) <br /> 寤虹珛榪欎釜variable鍚?tokenA涓嬮潰鐨則oken閮藉彲浠ョ湅鍒拌 <br /> variable,鑰屼笂闈㈢殑token鍒欑湅涓嶅埌. </p> <p>鍙湁createVariable鍙互鍦ㄦ煇涓猼oken涓婂緩绔媣ariable,鍏跺畠鐨?<br /> 鏂規(guī)硶鍙彲浠ュ湪rootToken涓婂緩绔媣ariable. <br /> 濡?ci.setVariable(tokenA, "a", new Integer(3)); <br /> 鍏跺疄鏄湪rootToken涓婂緩绔嬩簡涓涓悕縐頒負(fù)"a"鐨剉ariable <br /> Map variables = new HashMap(); <br /> variables.put("a", new Integer(3)); <br /> variables.put("b", new Integer(4)); <br /> ci.addVariables(variables); <br /> 涓婇潰鍥涜浠g爜鍦╮ootToken涓婂緩绔嬩簡涓や釜variable. <br /> 瀹為檯涓婂湪ExecutionContext涓彧鏈変袱涓柟娉曪細(xì) <br /> public void setVariable(String name, Object value) { <br /> getContextInstance().setVariable(name, value, token); <br /> } <br /> public Object getVariable(String name) { <br /> return getContextInstance().getVariable(name, token); <br /> } <br /> 鍙互鍦ㄥ瓙token涓慨鏀圭埗token涓緩绔嬬殑variable.</p> <p>Task錛堜換鍔★級(jí) </p> <p><br /> jbpm涓涓浉褰撻噸瑕佺殑鍔熻兘灝辨槸瀵逛換鍔¤繘琛岀鐞嗐?<br /> Task錛堜換鍔★級(jí)鏄祦紼嬪畾涔夐噷鐨勪竴閮ㄥ垎錛屽畠鍐沖畾浜唗ask instance鐨勫垱寤哄拰鍒嗛厤銆?<br /> Task錛堜換鍔★級(jí)鍙互鍦╰ask-node鑺傜偣涓嬪畾涔夛紝涔熷彲浠ユ寕鍦╬rocess-definition鑺傜偣涓嬨傛渶鏅亶鐨勬柟寮忔槸鍦╰ask-node鑺傜偣涓嬪畾涔変竴涓垨澶氫釜浠誨姟銆傞粯璁ゆ儏鍐典笅錛屾祦紼嬪湪task-node鑺傜偣浼?xì)澶勪簬绛夊緟鐘舵侊紝鐩村埌鎵鏈夌殑浠誨姟琚墽琛屽畬姣曘備換鍔$殑鍚嶇О鍦ㄦ暣涓祦紼嬩腑蹇呴』鏄敮涓鐨勩?</p> <p>涓涓猅askNode瀵瑰簲澶氫釜Task <br /> 瀵逛簬榪欐牱鐨勬祦紼嬪畾涔夛細(xì) <br />  <br />  <br />  <br />  <br />  <br />  <br /> 鍙湁褰撹妭鐐逛腑鐨勪笁涓換鍔¢兘瀹屾垚鍚庯紝嫻佺▼鎵嶈繘鍏ュ悗闈㈢殑鑺傜偣 </p> <p>瀵逛簬榪欐牱鐨勬祦紼嬪畾涔夛細(xì) <br /> > <br />  <br />  <br />  <br />  <br />  <br /> 褰撶涓涓換鍔″畬鎴愬悗錛宼oken灝辨寚鍚戝悗闈㈢殑鑺傜偣 </p> <p>瀵逛簬榪欐牱鐨勬祦紼嬪畾涔夛細(xì) <br /> > <br />  <br />  <br />  <br />  <br />  <br /> 涓変釜浠誨姟閮藉畬鎴愬悗錛宼oken浠嶇劧涓嶄細(xì)鎸囧悜鍚庨潰鐨勮妭鐐癸紱闇瑕佽嚜宸辨墜鍔ㄨ皟鐢?</p> <p>processInstance.signal()鎵嶄細(xì)椹卞姩嫻佺▼鍒頒笅闈㈢殑鑺傜偣 </p> <p>瀵逛簬榪欐牱鐨勬祦紼嬪畾涔夛細(xì) <br /> > <br />  <br />  <br />  <br />  <br />  <br /> token涓嶄細(xì)鍦ㄦ湰鑺傜偣鍋滅暀錛岃屾槸鐩存帴鍒板悗闈㈢殑鑺傜偣</p> <p>jbpm鐨勪換鍔$鐞嗗疄鐜?<br /> 涓涓猅ask instance錛堜換鍔″疄渚嬶級(jí)鍙互琚垎閰嶇粰涓涓猘ctorId (java.lang.String)銆傛墍鏈夌殑Task instance閮借淇濆瓨鍦ㄦ暟鎹簱涓殑琛╦bpm_taskinstance閲屻傚綋浣犳兂寰楀埌鐗瑰畾鐢ㄦ埛鐨勪換鍔℃竻鍗曟椂錛屼綘灝卞彲浠ラ氳繃涓涓笌鐢ㄦ埛鍏寵仈鐨刟ctorId鏉ユ煡璇㈣繖寮犺〃銆?</p> <p>涓涓祦紼嬪畾涔夋湁涓涓猅askMgmtDefinition錛涗竴涓猅askMgmtDefinition瀵瑰簲澶氫釜swimlane,鍚屾椂瀵瑰簲澶氫釜task;涓涓猻wimlane鏈夊涓猼ask,鍙互浠嶵askMgmtDefinition涓氳繃task鐨勫悕縐扮洿鎺ヨ幏鍙栫浉搴旂殑task; </p> <p>swimlane瀵硅薄鏈夊洓涓睘鎬э紝鍒嗗埆鏄痭ame錛堝悕瀛楋級(jí)銆乤ssignmentDelegation錛堝垎閰嶄唬鐞嗙被錛夈乼askMgmtDefinition銆乼asks錛圫et 瀵瑰簲澶氫釜task),鍙互澧炲姞task </p> <p>task瀵硅薄涓昏鐨勫睘鎬э細(xì)taskMgmtDefinition銆乻wimlane銆乤ssignmentDelegation銆乼askNode錛岄渶瑕佹敞鎰忕殑鏄痵wimlane鍜宎ssignmentDelegation涓棿鍙槸鍙互涓涓睘鎬ф湁鍊鹼紝鍥犱負(fù)瀹冧滑閮藉拰浠誨姟鐨勫垎閰嶆湁鍏崇郴銆?</p> <p>涓涓祦紼嬪疄渚嬫湁涓涓猅askMgmtInstance錛涗竴涓猅askMgmtInstance瀵瑰簲澶氫釜swimlaneInstance,鍚屾椂瀵瑰簲澶氫釜taskInstance;涓涓猻wimlaneInstance鏈夊涓猼askInstance,鍙互浠嶵askMgmtInstance涓洿鎺ヨ幏鍙栫浉搴旂殑taskInstance; </p> <p>swimlaneInstance瀵硅薄涓昏鏈変簲涓睘鎬э紝鍒嗗埆鏄痭ame銆乤ctorId銆乸ooledActors錛圫et錛夈乻wimlane銆乼askMgmtInstance銆?<br /> taskInstance瀵硅薄鐨勪富瑕佸睘鎬э細(xì)name銆乤ctorId銆乼ask銆乻wimlaneInstance銆乼askMgmtInstance銆乸ooledActors銆?</p> <p>褰撳浠誨姟榪涜鍒嗛厤鏃訛紝涓鑸渶瑕佸疄鐜癆ssignmentHandler榪欎釜鎺ュ彛錛岃繖涓帴鍙g殑鏂規(guī)硶鍙湁涓涓細(xì) <br /> void assign( Assignable assignable, ExecutionContext executionContext ) throws Exception; <br /> 涓涓吀鍨嬬殑瀹炵幇錛堟妸鍚嶅瓧鏄?change nappy'鐨勪換鍔′氦緇橬appyAssignmentHandler榪欎釜綾繪潵鍒嗛厤錛?<br />  <br />  <br />  <br /> NappyAssignmentHandler綾伙細(xì) <br /> public void assign(Assignable assignable, ExecutionContext executionContext) { <br /> assignable.setActorId("papa"); <br /> } <br /> 鍚屾牱錛孉ssignable鍙槸涓涓帴鍙o紝瀹冩湁涓や釜鏂規(guī)硶錛歴etActorId()鍜宻etPooledActors()錛孉ssignable鐨勫叿浣撳疄鐜扮被涔熸槸涓や釜 <br /> swimlaneInstancehe鍜宼askInstance銆傝繖鏍峰氨涓嶄笉闅劇悊瑙f暣涓換鍔″垎閰嶆祦紼嬩簡錛?<br /> 1銆佹祦紼嬭繘鍏askNode鑺傜偣錛屾墽琛孴askNode綾葷殑execute()鏂規(guī)硶錛岃鏂規(guī)硶棣栧厛鑾峰緱TaskMgmtInstance瀹炰緥錛岀劧鍚庨氳繃瀹冩潵鍒涘緩TaskInstance銆倀askMgmtInstance.createTaskInstance(task, executionContext); <br /> 2銆佸湪涓婇潰鐨刢reateTaskInstance(task, executionContext)閲岋紝璇ユ柟娉曡皟鐢ㄤ簡taskInstance.assign(executionContext)瀵箃askInstance榪涜鍒嗛厤銆?<br /> 3銆佸湪assign(executionContext)鏂規(guī)硶閲岋紝棣栧厛浼?xì)鍒ゆ柇task灞炴ч噷鏄惁瀛樺湪swimlane錛屽鏋滄湁鐨勮瘽錛岃繖涓猼askInstance灝變細(xì)鍒嗛厤緇檚wimlane鎸囧畾鐨凙ctorId鎴?PooledActors錛涘鏋滀笉瀛樺湪錛屽啀鍘繪壘task灞炴ч噷 assignmentDelegation錛堝垎閰嶄唬鐞嗙被錛夐氳繃浠g悊綾伙紙鍗蟲垜浠嚜宸卞啓鐨勫疄鐜癆ssignmentHandler榪欎釜鎺ュ彛鐨勭被錛夋寚瀹欰ctorId鎴?PooledActors銆?<br /> jbpm鐨勭敤鎴瘋鑹茬鐞?</p> <p><br /> jbpm鍦ㄧ敤鎴瘋鑹茬鐞嗕笂鍏辮璁′簡鍥涗釜綾伙細(xì)Entity銆?Membership銆?Group銆?User <br /> Entity綾繪槸鍏朵粬涓変釜綾葷殑鐖剁被錛屽畠鍖呭惈浜嗕袱涓睘鎬э細(xì)name(String)銆?permissions(Set) <br /> User綾葷戶鎵縀ntity綾伙紝鍖呭惈涓変釜灞炴э細(xì)password(String)銆?email(String)銆?memberships(Set) <br /> Group綾葷戶鎵縀ntity綾伙紝鍖呭惈鍥涗釜灞炴? type(String) 銆乸arent(Group)銆?children(Set)銆?memberships(Set) <br /> Membership綾葷戶鎵縀ntity綾伙紝鍖呭惈涓変釜灞炴?role(String)銆?user(User)銆?group(Group) <br /> 寰堟槑鏄撅紝涓涓猽ser瀵瑰簲涓涓敤鎴鳳紝涓涓猤roup瀵瑰簲涓涓敤鎴風(fēng)粍錛屽畠浠箣闂撮氳繃membership鍏寵仈錛屽茍涓斾竴涓猽ser鍙互灞炰簬澶氫釜涓嶅悓綾誨瀷錛坱ype)鐨刧roup錛寀ser鍜?group涔嬮棿鏄瀵瑰鐨勫叧緋匯?<br /> Membership綾葷殑role灞炴т釜浜烘劅瑙夌敤閫斾笉澶э紝鍙嶅掓槸name灞炴т唬琛ㄤ簡user鍦╣roup閲岀殑role錛堣鑹詫級(jí)錛?/p> <p><br /> Generated by Bo-blog 2.0.2 RC 1</p> <img src ="http://www.tkk7.com/libin2722/aggbug/143248.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/libin2722/" target="_blank">紺肩墿</a> 2007-09-06 18:11 <a href="http://www.tkk7.com/libin2722/articles/143248.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>JBPM閮ㄧ講鍦╰omcat涓?/title><link>http://www.tkk7.com/libin2722/articles/143247.html</link><dc:creator>紺肩墿</dc:creator><author>紺肩墿</author><pubDate>Thu, 06 Sep 2007 10:10:00 GMT</pubDate><guid>http://www.tkk7.com/libin2722/articles/143247.html</guid><wfw:comment>http://www.tkk7.com/libin2722/comments/143247.html</wfw:comment><comments>http://www.tkk7.com/libin2722/articles/143247.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/libin2722/comments/commentRss/143247.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/libin2722/services/trackbacks/143247.html</trackback:ping><description><![CDATA[  <p><span style="font-family: 瀹嬩綋">棣栧厛錛岀‘璁ゆ墜杈規(guī)湁涓浠?/span>jbpm3<span style="font-family: 瀹嬩綋">鐨?/span>user guide<span style="font-family: 瀹嬩綋">錛屾湁涓浠借繕鏈?/span>JBPM3.0<span style="font-family: 瀹嬩綋">婧愮爜鐨勫帇緙╁寘</span></p> <p>JBPM<span style="font-family: 瀹嬩綋">涓槸閫氳繃</span>org.jbpm.db. JbpmSessionFactory.getInstance()<span style="font-family: 瀹嬩綋">榪斿洖涓涓?/span>JbpmSessionFactory<span style="font-family: 瀹嬩綋">瀹炰緥錛?/span></p> <p><span style="font-family: 瀹嬩綋">涓嬮潰閫氳繃鍒嗘瀽</span>getInstance()<span style="font-family: 瀹嬩綋">鐨勮繃紼嬶紝璇存槑鎬庝箞璁劇疆鐩稿叧閰嶇疆鏂囦歡</span></p> <p>1<span style="font-family: 瀹嬩綋">銆?/span>JbpmSessionFactory.getInstance()<span style="font-family: 瀹嬩綋">鏂規(guī)硶棣栧厛鏌ユ壘綾昏礬寰勪腑鐨?/span>jbpm.properties<span style="font-family: 瀹嬩綋">鏂囦歡</span></p> <table style="border-right: medium none; border-top: medium none; background: #b3b3b3; margin-left: 5.4pt; border-left: medium none; border-bottom: medium none; border-collapse: collapse" cellspacing="0" cellpadding="0" border="1"> <tbody> <tr style="height: 210.75pt"> <td style="border-right: windowtext 1pt solid; padding-right: 5.4pt; border-top: windowtext 1pt solid; padding-left: 5.4pt; padding-bottom: 0cm; border-left: windowtext 1pt solid; width: 414pt; padding-top: 0cm; border-bottom: windowtext 1pt solid; height: 210.75pt" valign="top" width="552"> <p>jbpm.scheduler.service.factory=org.jbpm.scheduler.impl.SchedulerServiceImpl</p> <p>jbpm.task.instance.class=org.jbpm.taskmgmt.exe.TaskInstance</p> <p># uncomment the next line if JbpmSessionFactory.getInstance()</p> <p># should lookup the singleton instance from JNDI instead of creating </p> <p># a default one.</p> <p>#</p> <p>jbpm.session.factory.jndi.name=java:/jbpm/JbpmSessionFactory</p> <p># uncomment the next line to use the file system instead of the database for </p> <p># storing files related to a process definition</p> <p>#</p> <p># jbpm.files.dir=c:/jbpm.data</p> <p># resource path to a properties file that will overwrite all the hibernate </p> <p># properties. For database specific builds in db project there is a different</p> <p># hibernate.properties file on the classpath for each database. You could change</p> <p># the default database for any testing runs by uncommenting the next line and</p> <p># adding a hibernate.properties file in the basedir.</p> <p>#</p> <p>jbpm.hibernate.cfg.xml=jbpm.hibernate.cfg.xml</p> <p>jbpm.hibernate.properties=jbpm.hibernate.properties</p> </td> </tr> </tbody> </table> <p><span style="font-family: 瀹嬩綋">鎵懼埌鏈鍩烘湰鐨勮緗紝</span>jbpm.session.factory.jndi.name=java:/jbpm/JbpmSessionFactory</p> <p><span style="font-family: 瀹嬩綋">榪欒琛ㄧず浠?/span>jndi<span style="font-family: 瀹嬩綋">鑾峰彇涓涓?/span>JbpmSessionFactory<span style="font-family: 瀹嬩綋">鐨勪竴涓疄渚嬶紝濡傛灉浣犲彲浠ョ敤</span>JBPM3 demo<span style="font-family: 瀹嬩綋">涓?/span>java:/jbpm/JbpmSessionFactory<span style="font-family: 瀹嬩綋">鏄笌</span>DataSource DefaultDS<span style="font-family: 瀹嬩綋">緇戝畾鍦ㄤ竴璧風(fēng)殑錛堝湪</span>jboss-service.xml<span style="font-family: 瀹嬩綋">涓級(jí)銆傝閮ㄧ講鍦?/span>tomcat<span style="font-family: 瀹嬩綋">涓紝榪欒蹇呴』娉ㄩ噴鎺夈?/span></p> <table style="border-right: medium none; border-top: medium none; background: #b3b3b3; margin-left: 5.4pt; border-left: medium none; border-bottom: medium none; border-collapse: collapse" cellspacing="0" cellpadding="0" border="1"> <tbody> <tr style="height: 15.75pt"> <td style="border-right: windowtext 1pt solid; padding-right: 5.4pt; border-top: windowtext 1pt solid; padding-left: 5.4pt; padding-bottom: 0cm; border-left: windowtext 1pt solid; width: 414pt; padding-top: 0cm; border-bottom: windowtext 1pt solid; height: 15.75pt" valign="top" width="552"> <p><?xml version="1.0" encoding="UTF-8"?></p> <p><server></p> <p> <mbean code="org.jbpm.db.jmx.JbpmService" </p> <p>         name="jboss.jbpm:name=DefaultJbpm,service=JbpmService"</p> <p>         description="Default jBPM Service"></p> <p>    <attribute name="JndiName">java:/jbpm/JbpmSessionFactory</attribute></p> <p>    <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends></p> <p> </mbean></p> <p></server></p> </td> </tr> </tbody> </table> <p>jboss-service.xml<span style="font-family: 瀹嬩綋">鏂囦歡鍐呭錛屽鏋滀綘鐢ㄦ簮鐮佸寘鎴愬姛閮ㄧ講浜?/span>websale<span style="font-family: 瀹嬩綋">鐨勮瘽錛屽彲浠ュ湪</span>JBOSS_HOME"server"jbpm"deploy"jbpm.sar"META-INF"<span style="font-family: 瀹嬩綋">鐩綍涓嬫壘鍒拌鏂囦歡</span></p> <p>2<span style="font-family: 瀹嬩綋">銆佸鏋?/span>getInstance()<span style="font-family: 瀹嬩綋">娌℃湁鎵懼埌</span>jbpm.session.factory.jndi.name<span style="font-family: 瀹嬩綋">鐨勫鹼紝浼?xì)鐟艟l煡鎵?/span>jbpm.hibernate.properties<span style="font-family: 瀹嬩綋">鐨勫鹼紝鎵懼埌</span>jbpm.hibernate.properties<span style="font-family: 瀹嬩綋">鐨勫煎悗錛屼細(xì)鐢ㄨ鍊間綔涓洪厤緗枃浠跺彇鍒涘緩</span>JbpmSessionFactory</p> <p>jbpm.hibernate.properties<span style="font-family: 瀹嬩綋">鍐呭錛?/span></p> <table style="border-right: medium none; border-top: medium none; background: #b3b3b3; margin-left: 5.4pt; border-left: medium none; border-bottom: medium none; border-collapse: collapse" cellspacing="0" cellpadding="0" border="1"> <tbody> <tr style="height: 31.5pt"> <td style="border-right: windowtext 1pt solid; padding-right: 5.4pt; border-top: windowtext 1pt solid; padding-left: 5.4pt; padding-bottom: 0cm; border-left: windowtext 1pt solid; width: 414pt; padding-top: 0cm; border-bottom: windowtext 1pt solid; height: 31.5pt" valign="top" width="552"> <p>hibernate.dialect=org.hibernate.dialect.HSQLDialect</p> <p>hibernate.connection.datasource=java:/DefaultDS</p> <p># hibernate.show_sql=true</p> </td> </tr> </tbody> </table> <p><span style="font-family: 瀹嬩綋">鏄敤</span>DataSource<span style="font-family: 瀹嬩綋">鏉ュ垱寤?/span>JbpmSessionFactory<span style="font-family: 瀹嬩綋">錛?/span>DataSource<span style="font-family: 瀹嬩綋">闇瑕佸湪</span>Server.xml<span style="font-family: 瀹嬩綋">涓厤緗紝濡傛灉浣犱笉鎯抽厤緗?/span>DataSource<span style="font-family: 瀹嬩綋">鐨勮瘽錛屾妸榪欒涔熸敞閲婃帀</span></p> <p>3<span style="font-family: 瀹嬩綋">銆佷笂闈袱欏瑰唴瀹歸兘琚敞閲婃帀鐨勮瘽錛?/span>getInstance()<span style="font-family: 瀹嬩綋">浼?xì)鏌ユ?/span>jbpm.hibernate.cfg.xml<span style="font-family: 瀹嬩綋">鐨勫鹼紝鐢ㄨ鍊間綔涓洪厤緗枃浠跺垱寤轟竴涓?/span>JbpmSessionFactory<span style="font-family: 瀹嬩綋">銆?/span></p> <p><span style="font-family: 瀹嬩綋">璇存槑錛岃繖閲屽彧鏄浜嗘庝箞閰嶇疆鐩稿叧鏂囦歡錛屾病鏈夎鍒版庝箞閮ㄧ講錛屽叧浜庤繖鏂歸潰鍐呭錛岃鍙傝?/span>User Guide chapter 5</p> <img src ="http://www.tkk7.com/libin2722/aggbug/143247.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/libin2722/" target="_blank">紺肩墿</a> 2007-09-06 18:10 <a href="http://www.tkk7.com/libin2722/articles/143247.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>jBPM3.1 +Oracle10g+Tomcat-5.0.30瀹夎瀹炶返http://www.tkk7.com/libin2722/articles/143246.html紺肩墿紺肩墿Thu, 06 Sep 2007 10:09:00 GMThttp://www.tkk7.com/libin2722/articles/143246.htmlhttp://www.tkk7.com/libin2722/comments/143246.htmlhttp://www.tkk7.com/libin2722/articles/143246.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143246.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143246.htmljBPM3.1 +Oracle10g+Tomcat-5.0.30瀹夎瀹炶返

鐜錛?/span>
jdk1.5.0_05
jakarta-tomcat-5.5.9
apache-ant-1.6.5(1.6.0
浼?xì)鎶ラ?/span>)
mysql-5.0.16-win32
jbpm-3.0.2


涓銆?/span>JBPM_HOME鍗充負(fù)瑙e紑鐨?/span>jbpm-3.0.2.zip鏂囦歡
%JBPM_HOME%"lib
涓嬶紝寤?/span>mysql鐩綍錛屽皢mysql鐨?/span>jdbc椹卞姩鎷峰叆錛?/span>
鍦?/span>mysql涓緩鏁版嵁搴?/span>   CREATE DATABASE jbpm;


浜屻佷負(fù)ant鍒涘緩jbpm鐩稿叧鏁版嵁搴撲慨鏀圭浉鍏抽厤緗枃浠?/span>
1
銆?/span>%JBPM_HOME%"src"resources鐩綍涓嬶紝灝?/span>“hsqldb”鐩綍鏀瑰悕涓?/span>“mysql”錛屽茍淇敼create.db.hibernate.properties鏂囦歡錛屽艦濡傦細(xì)
# these properties are used by the build script to create
# a hypersonic database in the build/db directory that contains
# the jbpm tables and a process deployed in there

hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm
hibernate.connection.username=root
hibernate.connection.password=
hibernate.c3p0.min_size=1
hibernate.c3p0.max_size=3
hibernate.show_sql=true

2
銆佷慨鏀?/span>%JBPM_HOME%"build.deploy.xml鏂囦歡涓?/span>“target”涓?/span>“create.db” 鐨勫収瀹癸紝鍒犻櫎“db.start”錛?/span>“db.stop”錛屽皢鎵鏈夌殑“hsqldb”鏇挎崲涓?/span>“mysql”
褰㈠錛?/span>
  <target name="create.db" depends="declare.jbpm.tasks, db.clean" description="creates a hypersonic database with the jbpm tables and loads the processes in

there">
    <jbpmschema actions="create" properties="${basedir}/src/resources/mysql/create.db.hibernate.properties"/>
    <loadidentities file="${basedir}/src/resources/mysql/identity.db.xml" properties="${basedir}/src/resources/mysql/create.db.hibernate.properties"/>
    <ant antfile="build.xml" target="build.processes" inheritall="false" />
    <deploypar properties="${basedir}/src/resources/mysql/create.db.hibernate.properties">
        <fileset dir="build" includes="*.par" />
    </deploypar>
    <!--antcall target="db.stop" /-->
  </target>


涓夈佷負(fù)ant鍒涘緩jbpm.war鍖呬慨鏀圭浉鍏抽厤緗枃浠?/span>
1
銆佷慨鏀?/span>%JBPM_HOME%"src"config.files"hibernate.cfg.xml鏂囦歡涓暟鎹簱榪炴帴閰嶇疆閮ㄥ垎錛屽艦濡傦細(xì)
    ……
    <!-- jdbc connection properties -->
    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm</property>
    <property name="hibernate.connection.username">root</property>
    <property name="hibernate.connection.password">rootrootrootroot</property>
         
    <!-- c3p0 connection pooling properties -->
    <property name="hibernate.c3p0.min_size">1</property>
    <property name="hibernate.c3p0.max_size">3</property>

    <!-- other hibernate properties -->
    <property name="hibernate.show_sql">true</property>
    ……

2
銆佷慨鏀?/span>%JBPM_HOME%"src"resources"jbpm.sar"jbpm.properties錛屽艦濡傦細(xì)
jbpm.scheduler.service.factory=org.jbpm.scheduler.impl.SchedulerServiceImpl
jbpm.task.instance.class=org.jbpm.taskmgmt.exe.TaskInstance

# uncomment the next line if JbpmSessionFactory.getInstance()
# should lookup the singleton instance from JNDI instead of creating
# a default one.
#
# jbpm.session.factory.jndi.name=java:/jbpm/JbpmSessionFactory

# uncomment the next line to use the file system instead of the database for
# storing files related to a process definition
#
# jbpm.files.dir=c:/jbpm.data

# resource path to a properties file that will overwrite all the hibernate
# properties. For database specific builds in db project there is a different
# hibernate.properties file on the classpath for each database. You could change
# the default database for any testing runs by uncommenting the next line and
# adding a hibernate.properties file in the basedir.
#
jbpm.hibernate.cfg.xml=jbpm.hibernate.cfg.xml
# jbpm.hibernate.properties=jbpm.hibernate.properties

3
銆佷慨鏀?/span>%JBPM_HOME%"src"resources"jbpm.sar"jbpm.hibernate.properties錛屽彧鐢?/span>hibernate.cfg.xml鏉ラ厤緗?/span>hibernate錛屽洜姝ゅ叏閮ㄦ敞閲婃帀錛屽艦濡傦細(xì)
# hibernate.dialect=org.hibernate.dialect.HSQLDialect
# hibernate.connection.datasource=java:/DefaultDS
# hibernate.show_sql=true

4
銆佷慨鏀?/span>%JBPM_HOME%"build.deploy.xml鏂囦歡錛?/span>“target”涓?/span>“build.webapp”鐨勫収瀹癸紝鍘熸枃浠剁浉鍏崇殑jar鍖呮湭鍖呭惈鍏紝鍥犳琛ュ叏錛屽艦濡傦細(xì)
  <target name="build.webapp" description="builds jbpm.war">
    <ant antfile="build.xml" target="build" /><!--
鍘熸枃浠舵槸target="build.webapp" -->
    <mkdir dir="build/jbpm.war.dir" />
    <copy todir="build/jbpm.war.dir">
        <fileset dir="src/resources/jbpm.war" />
    </copy>
    <copy todir="build/jbpm.war.dir/WEB-INF/lib">
        <fileset dir="build" includes="jbpm*.jar,converter.jar" excludes="*src*.jar" />
        <fileset dir="lib/jsf" includes="*.jar" />
        <fileset dir="lib/dom4j" includes="*.jar" />
        <!--fileset dir="lib/jaxen" includes="*.jar" / included in lib/hibernate -->
        <fileset dir="lib/hibernate" includes="*.jar" />
        <fileset dir="lib/mysql" includes="*.jar" />
        <fileset dir="lib/commons" includes="commons-digester-*.jar,   commons-beanutils-*.jar" />
        <fileset dir="lib/jboss" includes="*.jar"   excludes="jboss*.jar,*servlet*.jar,*hsql*.jar,dom4j*.jar" />
    </copy>
    <jar destfile="build/jbpm.war">
        <fileset dir="build/jbpm.war.dir" />
    </jar>
  </target>


鍥涖佹墽琛?/span>Ant
1
銆佸垱寤哄茍鍒濆鍖?/span>jbpm渚嬪瓙鎵闇鐨?/span>table
ant create.db -buildfile build.deploy.xml
2
銆佺敓鎴?/span>jbpm.war
ant build.webapp -buildfile build.deploy.xml


浜斻?/span>tomcat鎷ユ姳jbpm
灝?/span>%JBPM_HOME%"build"jbpm.war鏂囦歡澶嶅埗鍒?/span>Tomcat鐨?/span>webapp鐩綍涓嬶紝鍚姩Tomcat鑷姩閮ㄧ講jbpm錛岃闂?/span>http://localhost:8080/jbpm錛屽嚭鐜扮櫥褰曢〉闈紝閰嶇疆鎴愬姛銆?/span>



紺肩墿 2007-09-06 18:09 鍙戣〃璇勮
]]>
琛ㄧ殑涓枃鎰忔?/title><link>http://www.tkk7.com/libin2722/articles/143243.html</link><dc:creator>紺肩墿</dc:creator><author>紺肩墿</author><pubDate>Thu, 06 Sep 2007 10:00:00 GMT</pubDate><guid>http://www.tkk7.com/libin2722/articles/143243.html</guid><wfw:comment>http://www.tkk7.com/libin2722/comments/143243.html</wfw:comment><comments>http://www.tkk7.com/libin2722/articles/143243.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/libin2722/comments/commentRss/143243.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/libin2722/services/trackbacks/143243.html</trackback:ping><description><![CDATA[闄勪笂涓〃鐨勪腑鏂囨剰鎬?<br /> JBPM_ACTION action璁板綍琛?<br /> JBPM_DECISIONCONDITIONS 緇撴灉鏉′歡琛?<br /> JBPM_DELEGATION 濮旀墭琛?<br /> JBPM_EVENT 浜嬩歡琛?澶勭悊榪涘叆鎴栬呯寮浜嬩歡 <br /> JBPM_EXCEPTIONHANDLER 寮傚父澶勭悊琛?<br /> JBPM_ID_GROUP 鐢ㄦ埛緇勮〃 <br /> JBPM_ID_MEMBERSHIP 鐢ㄦ埛鎴愬憳琛?琛ㄧ幇鐢ㄦ埛鍜岀粍涔嬮棿鐨勫瀵瑰鍏崇郴 <br /> JBPM_ID_PERMISSIONS 鐢ㄦ埛鏉冮檺琛?<br /> JBPM_ID_USER 鐢ㄦ埛琛?<br /> JBPM_MODULEDEFINITION 妯″潡瀹氫箟琛?<br /> JBPM_MODULEINSTANCE 妯″潡瀹炰緥琛?<br /> JBPM_NODE 嫻佺▼鑺傜偣琛?<br /> JBPM_POOLEDACTOR 姹囬泦鍙備笌鐫琛?<br /> JBPM_PROCESSDEFINITION 嫻佺▼瀹氫箟琛?<br /> JBPM_PROCESSFILE 嫻佺▼鏂囦歡琛?<br /> JBPM_PROCESSFILEBLOCK 嫻佺▼鏂囦歡鍧楄〃 <br /> JBPM_PROCESSINSTANCE 嫻佺▼瀹炰緥琛?<br /> JBPM_RUNTIMEACTION 榪愯涓涓鴻〃 <br /> JBPM_SCRIPTVARIABLES 鑴氭湰鍙橀噺琛?<br /> JBPM_SWIMLANE 娉抽亾琛?<br /> JBPM_SWIMLANEINSTANCE 娉抽亾瀹炰緥琛?<br /> JBPM_TASK 浠誨姟琛?<br /> JBPM_TASKACTORPOOL 鐢ㄦ埛琛屼負(fù)姹囨?<br /> JBPM_TASKINSTANCE 浠誨姟瀹炰緥 <br /> JBPM_TIMER 璁℃椂琛?<br /> JBPM_TOKEN 浠ょ墝琛?<br /> JBPM_TOKENVARIABLEMAP 浠ょ墝鍙橀噺褰卞皠琛?<br /> JBPM_TRANSITION 杞崲琛?<br /> JBPM_VARIABLEINSTANCE 鍙橀噺瀹炰緥琛?<br /> JBPM_VARIABLEINSTANCEBLOCK 鍙橀噺瀹炰緥鍧楄〃 <br /> JBPM_VARIABLEMAPPING 鍙橀噺褰卞皠琛?<br /> <img src ="http://www.tkk7.com/libin2722/aggbug/143243.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/libin2722/" target="_blank">紺肩墿</a> 2007-09-06 18:00 <a href="http://www.tkk7.com/libin2722/articles/143243.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>瀵笿bpm鏁版嵁搴撳簲鐢ㄧ殑綆鍗曞垎鏋愬拰鍦∕ysql涓婂疄鐜扮殑demohttp://www.tkk7.com/libin2722/articles/143242.html紺肩墿紺肩墿Thu, 06 Sep 2007 09:59:00 GMThttp://www.tkk7.com/libin2722/articles/143242.htmlhttp://www.tkk7.com/libin2722/comments/143242.htmlhttp://www.tkk7.com/libin2722/articles/143242.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143242.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143242.html闃呰鍏ㄦ枃

紺肩墿 2007-09-06 17:59 鍙戣〃璇勮
]]>
spring+hibernate+jbpm鏁村悎鎴愬姛 http://www.tkk7.com/libin2722/articles/143241.html紺肩墿紺肩墿Thu, 06 Sep 2007 09:58:00 GMThttp://www.tkk7.com/libin2722/articles/143241.htmlhttp://www.tkk7.com/libin2722/comments/143241.htmlhttp://www.tkk7.com/libin2722/articles/143241.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143241.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143241.html鏈鍚庣殑閰嶇疆緇撴灉鏄細(xì)

 

 

hibernate.cfg.xml銆乯bpm.cfg.xml鍦ㄥ叧鑱攕pring鍚庝繚鎸佷笉鍙橈紝鍙渶瑕佹洿鏀箂pirng鐨勯厤緗枃浠跺氨濂戒簡銆?


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd"
>

<beans>
    
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        
<property name="driverClassName">
            
<value>com.mysql.jdbc.Driver</value>
        
</property>
        
<property name="url">

 


            
<value>jdbc:mysql://localhost:3306/test</value>
        
</property>
        
<property name="username">
            
<value>root</value>

        
</property>
        
<property name="password">
            
<value/>

 


        
</property>
    
</bean>
    
<!-- Hibernate SessionFactory -->

 


    
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        
<property name="dataSource">
            
<ref local="dataSource"/>
        
</property>
        
<property name="mappingLocations">  
           
<value>classpath*:/org/jbpm/**/*.hbm.xml</value>  
           
</property>
        
<property name="hibernateProperties">  
           
<props>  
               
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
               
<prop key="hibernate.hbm2ddl.auto">update</prop>
               
<prop key="hibernate.jdbc.batch_size">0</prop>

 


           
</props>
       
</property> 
    
</bean>
    
<!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
    
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
        
<property name="sessionFactory">
            
<ref local="sessionFactory"/>
        
</property>
    
</bean>
    
    
<!-- reading jBPM process definitions -->
    
<bean id="websaleWorkflow1" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean">
        
<property name="definitionLocation"    value="processdefinition.xml"/>
    
</bean>
    
<!-- jBPM configuration--> 
    
<bean id="jbpmConfiguration" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">

        
<property name="sessionFactory" ref="sessionFactory"/>
        
<property name="configuration" value="jbpm.cfg.xml"/>
        
<property name="processDefinitions">
            
<list>
                
<ref local="websaleWorkflow1"/>
            
</list>
        
</property>
        
<property name="createSchema" value="true"/>
    
</bean>
    
<!-- jBPM template -->
    
<bean id="jbpmTemplate" class="org.springmodules.workflow.jbpm31.JbpmTemplate">
        
<constructor-arg index="0" ref="jbpmConfiguration"/>
        
<constructor-arg index="1" ref="websaleWorkflow1"/>
    
</bean>

</beans>

 

 

鍏朵腑

<property name="mappingLocations">  
           
<value>classpath*:/org/jbpm/**/*.hbm.xml</value>  

 


           
</property>

寰堝叧閿紝鎴戝氨鏄兂spring浼?xì)閫氳繃jbpm鎵懼埌hibernate.cfg.xml鑰屾病鏈夎緗紝鎵嶅け璐ョ殑銆?

 


紺肩墿 2007-09-06 17:58 鍙戣〃璇勮
]]>
jbpm渚嬪瓙http://www.tkk7.com/libin2722/articles/143239.html紺肩墿紺肩墿Thu, 06 Sep 2007 09:57:00 GMThttp://www.tkk7.com/libin2722/articles/143239.htmlhttp://www.tkk7.com/libin2722/comments/143239.htmlhttp://www.tkk7.com/libin2722/articles/143239.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143239.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143239.html闃呰鍏ㄦ枃

紺肩墿 2007-09-06 17:57 鍙戣〃璇勮
]]>
jbpm鐢ㄦ埛鎸囧崡緲昏瘧錛氱6绔犮閰嶇疆 http://www.tkk7.com/libin2722/articles/143237.html紺肩墿紺肩墿Thu, 06 Sep 2007 09:52:00 GMThttp://www.tkk7.com/libin2722/articles/143237.htmlhttp://www.tkk7.com/libin2722/comments/143237.htmlhttp://www.tkk7.com/libin2722/articles/143237.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143237.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143237.html闃呰鍏ㄦ枃

紺肩墿 2007-09-06 17:52 鍙戣〃璇勮
]]>
jBPM3.12鐢ㄦ埛鎸囧崡涓枃緲昏瘧----絎簲绔?閮ㄧ講 http://www.tkk7.com/libin2722/articles/143142.html紺肩墿紺肩墿Thu, 06 Sep 2007 04:36:00 GMThttp://www.tkk7.com/libin2722/articles/143142.htmlhttp://www.tkk7.com/libin2722/comments/143142.htmlhttp://www.tkk7.com/libin2722/articles/143142.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143142.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143142.htmlChapter 5. Deployment閮ㄧ講

jBPM is an embeddable BPM engine, which means that you can take jBPM and embed it into your own java project, rather then installing a separate product and integrate with it. One of the key aspects that make this possible is minimizing the dependencies. This chapter discusses the jbpm libraries and their dependencies.

   jBPM鏄竴涓祵鍏ュ紡鐨凚PM錛堜笟鍔$▼搴忕鐞嗭級(jí)寮曟搸銆傛湰绔犺璁簀bpm搴撳拰瀹冪殑渚濊禆搴撱?/p>

5.1. Java runtime environment

jBPM 3 requires J2SE 1.4.2+

5.2. jBPM libraries

jbpm-[version].jar is the library with the core jbpm functionality.鏄痡bpm鐨勬牳蹇冨姛鑳藉簱銆?/p>

jbpm-identity-[version].jar is the (optional) library containing an identity component as described in Section 11.11, “The identity component”.

鍙夌殑錛岃繖涓簱鍖呭惈浜嗚韓浠介獙璇佺粍浠躲傜敤浜庢祦紼嬬殑鍙備笌鑰呯殑綆$悊銆?/p>

5.3. Third party libraries絎笁鏂瑰簱

In a minimal deployment, you can create and run processes with jBPM by putting only the commons-logging and dom4j library in your classpath. Beware that persisting processes to a database is not supported. The dom4j library can be removed if you don't use the process xml parsing, but instead build your object graph programatically.

鏈灝忕殑jbpm閮ㄧ講錛屽彧闇瑕佹牳蹇僯bpm搴撳拰commons-logging搴擄紝浠ュ強(qiáng)dom4j搴撳埌浣犵殑classpath涓傛鏃訛紝涓嶆敮鎸佹寔涔呭寲涓氬姟紼嬪簭鍒版暟鎹簱銆?/p>

Table 5.1. 

Library搴?/span>

Usage鐢ㄩ?/span>

Description鎻忚堪

Directory鐩綍

commons-logging.jar

logging in jbpm and hibernate

The jBPM code logs to commons logging. The commons logging library can be configured to dispatch the logs to e.g. java 1.4 logging, log4j, ... See the apache commons user guide for more information on how to configure commons logging. if you're used to log4j, the easiest way is to put the log4j lib and a log4j.properties in the classpath. commons logging will automatically detect this and use that configuration.

lib/jboss (from jboss 4.0.3)

dom4j-1.6.1.jar

process definitions and hibernate persistence

xml parsing

lib/dom4j

A typical deployment for jBPM will include persistent storage of process definitions and process executions. In that case, jBPM does not have any dependencies outside hibernate and its dependent libraries.

鍏稿瀷鐨刯BPM閮ㄧ講鍖呮嫭鎸佷箙鍖栦笟鍔$▼搴忓畾涔夊拰鎵ц鐨勫姛鑳姐?闇瑕丠ibernate

Of course, hibernate's required libraries depend on the environment and what features you use. For details refer to the hibernate documentation. The next table gives an indication for a plain standalone POJO development environment.

涓嬮潰鐨勮〃緇欏嚭浜嗙畝鍗曠殑鏍囧噯POJO閮ㄧ講鐜闇瑕佺殑絎笁鏂瑰簱銆?/p>

jBPM is distributed with hibernate 3.1 final. But it can also work with 3.0.x. In that case, you might have to update a few hibernate queries in the hibernate.queries.hbm.xml configuration file. For more info about customizing queries, see Section 7.6, “Customizing queries”

Table 5.2. 

Library搴?/span>

Usage

Description

Directory

hibernate3.jar

hibernate persistence

the best O/R mapper

lib/hibernate (hibernate 3.1 final)

antlr-2.7.5H3.jar

used in query parsing by hibernate persistence

parser library

lib/jboss (from jboss 4.0.3)

cglib-2.1_2jboss.jar

hibernate persistence

reflection library used for hibernate proxies

lib/jboss (from jboss 4.0.3)

commons-collections.jar

hibernate persistence

lib/jboss (from jboss 4.0.3)

ehcache-1.1.jar

hibernate persistence (in the default configuration)

second level cache implementation.浜岀駭緙撳瓨瀹炵幇銆?/span>

When configuring a different cache provider for hibernate, this library is not required.

lib/hibernate

jaxen-1.1-beta-4.jar

process definitions and hibernate persistence

XPath library (used by dom4j)

lib/hibernate

jdbc2_0-stdext.jar

hibernate persistence

lib/hibernate

asm.jar

hibernate persistence

asm byte code library

浜岃繘鍒朵唬鐮佷慨鏀瑰簱

lib/hibernate

asm-attrs.jar

hibernate persistence

asm byte code library

lib/hibernate

The beanshell library is optional. If you don't include it, you won't be able to use the beanshell integration in the jbpm process language and you you'll get a log message saying that jbpm couldn't load the Script class and hence, the script element won't be available.

Beanshell搴撴槸鍙夌殑銆?/p>

Table 5.3. 

Library

Usage

Description

Directory

bsh-1.3.0.jar

beanshell script interpreter

Only used in the script's and decision's. When you don't use these process elements, the beanshell lib can be removed, but then you have to comment out the Script.hbm.xml mapping line in the hibernate.cfg.xml

lib/jboss


v

紺肩墿 2007-09-06 12:36 鍙戣〃璇勮
]]>
jBPM3.12鐢ㄦ埛鎸囧崡涓枃緲昏瘧----絎洓绔?闈㈠悜鍥捐〃緙栫▼ http://www.tkk7.com/libin2722/articles/143141.html紺肩墿紺肩墿Thu, 06 Sep 2007 04:33:00 GMThttp://www.tkk7.com/libin2722/articles/143141.htmlhttp://www.tkk7.com/libin2722/comments/143141.htmlhttp://www.tkk7.com/libin2722/articles/143141.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143141.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143141.html闃呰鍏ㄦ枃

紺肩墿 2007-09-06 12:33 鍙戣〃璇勮
]]>
jBPM3.12鐢ㄦ埛鎸囧崡涓枃緲昏瘧----絎簩绔?璧鋒 http://www.tkk7.com/libin2722/articles/143140.html紺肩墿紺肩墿Thu, 06 Sep 2007 04:30:00 GMThttp://www.tkk7.com/libin2722/articles/143140.htmlhttp://www.tkk7.com/libin2722/comments/143140.htmlhttp://www.tkk7.com/libin2722/articles/143140.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143140.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143140.html        鍚屾椂錛屽浜庡叾涓殑閮ㄥ垎鍐呭錛屾垜浼?xì)鍦ň樆璇戜腑鍋氬國櫑i噴鍜屽啓涓婃垜鐨勭悊瑙c?br />


Chapter 2. Getting started璧鋒

This chapter takes you through the first steps of getting JBoss jBPM and provides the initial pointers to get up and running in no time.

鍒濆鍖朖Bpm3.12

2.1. Downloadables Overview

Listed below are the different jBPM packages that are available today. Each of these packages contains one or more downloadable files. Along with each of these files goes a description of its contents and a pointer to any relevant installation instructions if they are available.

All downloads described below can be found on the sourceforge jbpm downloads page.

2.1.1. jBPM 3

Download JBoss jBPM 3 at sourceforge.net. This is the main distribution package containing the core engine and a number of additional modules that you may need to work with jBPM. 鍖呮嫭JBpm鏍稿績鍜屽叾浠栧寘銆?/span>

  • The Starters Kit (jbpm-starters-kit-<version>.zip): If you want to get started with jBPM quickly, this is the file you want to download. It contains all the other modules of this package plus the graphical designer in one single download. Extract the zipped archive into a folder of your choice and read the file named 'readme.html' for more info and further installation instructions. With this starters kit you can immediately get started with the Chapter 3, Tutorial.

鍖呭惈浜嗗寘鎷浘褰㈠寲璁捐鍣ㄥ湪鍐呯殑鎵鏈夋ā鍧楋紝鑳藉甯姪浣犲揩閫熷惎鍔ㄣ?/span>

  • Core Engine and Identity Component (jbpm-<version>.zip): The download contains the jBPM core engine as well as the identity component for actor and group management. To start working with it, extract the archive into a folder of your choice. You will find pointers to the User's Guide and other important information resources in the 'readme.html' file in the 'jbpm-<version>' folder.

鏍稿績錛屽寘鎷牳蹇冨紩鎿庡拰韜喚緇勫緩錛屽唴鏈夌敤鎴鋒寚鍗楁枃妗c?/span>

  • Database Extensions (jbpm-db-<version>.zip):鏁版嵁搴撴墿灞?/span> The database extension pack contains the jBPM core engine as well as the identity component for actor and group management. To start working with it, extract the archive into a folder of your choice. You will find pointers to the User's Guide and other important information resources in the 'readme.html' file in the 'jbpm-<version>' folder.

2.1.2. jBPM Process Designer

jBPM榪囩▼璁捐鍣?/span>

Download JBoss jBPM Process Designer at sourceforge.net. The designer is an eclipse plugin and enables you to author 鍒涗綔y(cè)our process definitions榪囩▼瀹氫箟 and to easily deploy them. The plug-in is available for download either as a zipped Eclipse feature or as a zipped Eclipse update site. There is no difference in content, the only difference is in the way you have to do the installation.

  • Eclipse Update Site (jbpm-gpd-site-<version>.zip): If you want to be absolutely sure that the designer installation goes smoothly, we recommend to use the update site mechanism together with a new Eclipse installation. Of cource the Eclipse version should match the downloaded update site archive. To get started with the designer plugin, follow the instructions in the 'readme.html' file included in the archives root folder to succesfully install the GPD.

浣跨敤鏈湴绔欑偣鏇存柊鏂瑰紡閮ㄧ講銆?/span>

  • Eclipse Feature (jbpm-gpd-feature-<version>.zip): If you are tired of each time having to do a fresh Eclipse installation and you are willing to cope with some possible issues, you can try the feature download. In this case installation is as easy as extracting the archive into your Eclipse installation (make sure the included 'plugins' and 'features' folders end up in the same location of your Eclipse installation) overwriting the files and folders with the same name that are possibly already present. This installation is very easy, but you could run into incompatibility issues when you overwrite plugins already present in your installation because of other features that you did install. Though they have the same name it could happen that the versions of these colliding plugins are not equal, hence the possible incompatibilities. The installation instructions are repeated in the 'readme.html' file.

榪欎釜鏄墜宸ラ儴緗層?/span>

2.1.3. jBPM BPEL extension

Download JBoss jBPM BPEL extension at sourceforge.net. It contains only one file : jbpm-bpel-<version>.zip. To get started with the BPEL extensions, look in the User's Guide in the 'doc' subfolder of the toplevel folder.

jbpm-bpel錛氬惈鏈?/span>JBoss jBPM鐨?/span>BPEL鎵╁睍浠舵柟闈㈢殑淇℃伅銆?/span>

BPEL鏄竴涓鑼冪殑SOA緇勪歡銆傚洜涓轟笌JBoss jBPM浣跨敤鐨勮鍙瘉涓嶅悓錛屾墍浠ヨ鐙珛浜嗗嚭鏉ャ?/span>

2.2. The JBoss jBPM project directory

  • professional support: JBoss is the company that backs this project with professional support, training and consultancy services.
  • user guide: is the document you're reading and serves as the main entry point into the project.
  • forums: get in contact with the community, ask questions and discuss jBPM   璁哄潧錛岀ぞ鍖恒?/span>
  • wiki: extra information, mostly provided by the community
  • issue tracker: for submitting bugs and feature requests
  • downloads: sourceforge download page for jBPM
  • mailing lists: mailing lists are used for announcements
  • javadocs: part of the download in the doc/javadoc directory.

2.3. CVS access

2.3.1. Anonymous CVS access

Alternatively, you can get JBoss jBPM from cvs with the following information:

  • Connection type: pserver
  • User: anonymous
  • Host: anoncvs.forge.jboss.com
  • Port: 2401 (which is the default)
  • Repository path: /cvsroot/jbpm
  • Label: :pserver:anonymous@anoncvs.forge.jboss.com:/cvsroot/jbpm

2.3.2. Developer CVS access

To get cvs developer access, you must sign contributors agreement and you need an ssh key. More information on both can be found on the JBoss cvs repository wiki page

  • Connection type: ext over ssh (extssh in eclipse)
  • User: sf.net username or jboss username
  • Host: cvs.forge.jboss.com
  • Port: 2401 (which is the default)
  • Repository path: /cvsroot/jbpm
  • Label: :pserver:anonymous@cvs.forge.jboss.com:/cvsroot/jbpm
v

紺肩墿 2007-09-06 12:30 鍙戣〃璇勮
]]>
jBPM3.12鐢ㄦ埛鎸囧崡涓枃緲昏瘧----絎笁绔?鎸囧崡 http://www.tkk7.com/libin2722/articles/143139.html紺肩墿紺肩墿Thu, 06 Sep 2007 04:29:00 GMThttp://www.tkk7.com/libin2722/articles/143139.htmlhttp://www.tkk7.com/libin2722/comments/143139.htmlhttp://www.tkk7.com/libin2722/articles/143139.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143139.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143139.html 鍚屾椂錛屽浜庡叾涓殑閮ㄥ垎鍐呭錛屾垜浼?xì)鍦ň樆璇戜腑鍋氬國櫑i噴鍜屽啓涓婃垜鐨勭悊瑙c?br />


Chapter 3. Tutorial鎸囧崡

This tutorial will show you basic process constructs 榪囩▼寤洪爄n jpdl and the usage of the API for managing the runtime executions.

榪欐湰鎸囧崡灝嗗憡璇変綘浣跨敤jpdl璇█鏋勫緩鍩烘湰鐨勫伐浣滄祦紼嬶紝浠ュ強(qiáng)綆$悊榪愯鏃舵墽琛岀殑API鐨勭敤娉曘?br />
The format of this tutorial is explaining a set of examples. The examples focus on a particular topic and contain extensive comments. The examples can also be fond in the jBPM download package in the directory src/java.examples.

榪欑瘒鎸囧崡瑙i噴涓緋誨垪鐨勪緥瀛愩備緥瀛愯仛鐒︿簬涓涓壒孌婄殑涓婚鍜屽寘鍚緢澶氱殑娉ㄩ噴銆?br />
The best way to learn is to create a project and experiment by creating variations on the examples given.

鏈濂界殑瀛︿範(fàn)鏂瑰紡鏄湪渚嬪瓙鐨勫熀紜涓婂垱寤轟竴涓暐涓轟笉鍚岀殑欏圭洰銆?br />
To get started for eclipse users: download jbpm-3.0-[version].zip and unzip it to your sytem. Then do "File" --> "Import..." --> "Existing Project into Workspace". Click "Next" Then, browse for the jBPM root directory and click "Finish". Now you have a jbpm.3 project in your workspace. You can now find the examples of the tutorial in src/java.examples/.... When you open these examples, you can run them with "Run" --> "Run As..." --> "JUnit Test"

鐢↗unit榪愯鑷甫鐨勪緥瀛愩?br />


jBPM includes a graphical designer tool for authoring 鍒涗綔the XML that is shown in the examples. You can find download instructions鎸囦護(hù) for the graphical designer in Section 2.1, “Downloadables Overview”. You don't need the graphical designer tool to complete this tutorial.

State machines can be

浣犱笉闇瑕佸浘褰㈣璁″櫒灝辮兘瀹屾垚榪欑瘒鎸囧崡銆傚浘褰㈣璁″櫒浠呬粎甯姪浣犲埗浣渪ml嫻佺▼瀹氫箟鏂囦歡銆?br />


3.1. Hello World example

A process definition is a directed graph, made up of nodes and transitions. The hello world process has 3 nodes. To see how the pieces fit together, we're going to start with a simple process without the use of the designer tool. The following picture shows the graphical representation of the hello world process:



涓涓繃紼嬪畾涔夋槸涓涓洿鎺ョ殑鍥捐〃錛岀敱“鑺傜偣”鍜?#8220;杞悜”緇勬垚銆侶ello world榪欎釜渚嬪瓙鐨勮繃紼嬪畾涔夋湁3涓妭鐐廣?br />
涓嬮潰鐨勫浘鍍忔樉紺轟簡hello world榪囩▼瀹氫箟鐨勫浘褰㈠寲琛ㄧず銆?br />
V:SHAPE id=_x0000_i1025 style="WIDTH: 63.75pt; HEIGHT: 120pt" type="#_x0000_t75">



Figure 3.1. The hello world process graph

Hello world涓氬姟澶勭悊鍥捐〃

publicvoid testHelloWorldProcess() {

// This method shows a process definition and one execution

// of the process definition. The process definition has

// 3 nodes: an unnamed start-state, a state 's' and an

// end-state named 'end'.

//榪欎釜鏂規(guī)硶鏄劇ず浜嗕竴涓繃紼嬪畾涔夊拰榪欎釜榪囩▼瀹氫箟鐨勬墽琛屻?br />
// The next line parses a piece of xml text into a

// ProcessDefinition. A ProcessDefinition is the formal

// description of a process represented as a java object.

/*

* 涓嬩竴琛屾妸涓孌祒ml鏂囨湰瑙f瀽榪汸rocessDefinition瀵硅薄銆侾rocessDefinition鏄?br />
* 榪囩▼浣滀負(fù)涓涓狫ava瀵硅薄鍦ㄥ唴瀛樹腑鐨勬寮忕殑鎻忚堪

* */

ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(

" " +

" " +

" " +

"
" +

" " +

" " +

"
" +

" " +

"
"

);



// The next line creates one execution of the process definition.

// After construction, the process execution has one main path

// of execution (=the root token) that is positioned in the

// start-state.

/**

*涓嬩竴琛屼嬌鐢ㄤ唬琛ㄨ繃紼嬪畾涔夌殑Model瀵硅薄--ProcessDefinition瀹炰緥錛屽垱寤轟竴涓笟鍔″鐞嗗畾涔夌殑鎵ц

*鏋勯犱箣鍚庯紝鍦ㄥ紑濮嬬姸鎬?鑺傜偣錛屼笟鍔″鐞嗘墽琛屽璞℃湁涓涓富瑕佺殑鎵ц璺緞

*

*/

ProcessInstance processInstance =

new ProcessInstance(processDefinition);



// After construction, the process execution has one main path

// of execution (=the root token).

/*璁板彿錛屽緱鍒頒富瑕佺殑鎵ц璺緞銆?br />
* Token璁板彿綾伙紝浠h〃涓鏉¤繃紼嬬殑鎵ц璺緞鍜屽湪榪囩▼瀹氫箟涓淮鎶や竴涓寚鍚戣妭鐐圭殑鎸囬拡

*

* */

Token token = processInstance.getRootToken();



// Also after construction, the main path of execution is positioned

// in the start-state of the process definition.

assertSame(processDefinition.getStartState(), token.getNode());



// Let's start the process execution, leaving the start-state

// over its default transition.

/*

* token.signal();鐢ㄦ潵鎵ц涓姝ョ姸鎬侊紝鍒╃敤“杞悜”璺沖埌涓嬩竴姝ョ姸鎬併?br />
*

* */

token.signal();

// The signal method will block until the process execution

// enters a wait state.



// The process execution will have entered the first wait state

// in state 's'. So the main path of execution is not

// positioned in state 's'

assertSame(processDefinition.getNode("s"), token.getNode());



// Let's send another signal. This will resume execution by

// leaving the state 's' over its default transition.

/*

* 璁╂垜浠彂閫佸彟涓涓俊鍙楓傝繖灝嗘墽琛岀寮鐘舵乻鐨勮漿鍚戙?br />
* */

token.signal();

// Now the signal method returned because the process instance

// has arrived in the end-state.



assertSame(processDefinition.getNode("end"), token.getNode());

}

鍙傝冿細(xì)

1錛岃鍙風(fēng)被錛屼唬琛ㄤ竴涓伐浣滃鐞嗗畾涔夌殑涓鏉″伐浣滄祦紼嬨?br />
public class Token

extends java.lang.Object

implements java.io.Serializable

represents one path of execution and maintains a pointer to a node in the ProcessDefinition. Most common way to get a hold of the token objects is with ProcessInstance.getRootToken() or ProcessInstance.findToken(String).

榪欎釜綾諱唬琛ㄤ簡涓涓繃紼嬬殑鎵ц嫻佺▼銆備嬌鐢?br />
public void signal()

provides a signal to the token. this method activates this token and leaves the current state over the default transition.

鏂規(guī)硶鎵ц涓姝ャ?br />


2錛屽伐浣滃鐞嗗疄渚?綾?br />
public class ProcessInstance

extends java.lang.Object

implements java.io.Serializable

is one execution of a ProcessDefinition. To create a new process execution of a process definition, just use the ProcessInstance(ProcessDefinition).

榪欎釜綾繪牴鎹綔涓篗odel鏁版嵁瀹瑰櫒綾葷殑ProcessDefinition宸ヤ綔澶勭悊瀹氫箟綾葷殑涓涓疄渚嬪垱寤恒備唬琛ㄤ竴涓伐浣滃鐞嗗畾涔夌殑鎵ц銆備富瑕佸叧娉ㄤ簬宸ヤ綔澶勭悊鐩稿叧鐨勬搷浣溿?br />


getRootToken
public TokengetRootToken()
寰楀埌宸ヤ綔澶勭悊瀹氫箟鐨勪粠start鐘舵佸紑濮嬬殑涓鏉¤鍙?---宸ヤ綔嫻佺▼銆?br />




findToken
public TokenfindToken(java.lang.String tokenPath)
looks up the token in the tree, specified by the slash-separated token path.

Parameters:

tokenPath - is a slash-separated name that specifies a token in the tree.

Returns:

the specified token or null if the token is not found.

鍦ㄥ伐浣滃鐞嗗畾涔夌殑鏍?wèi)涓Q屾牴鎹鍙瘋礬寰?宸ヤ綔嫻佺▼璺緞寰楀埌涓鏉″伐浣滄祦紼?br />
銆?br />




3.2. Database example

鏁版嵁搴撲緥瀛?br />
One of the basic features of jBPM is the ability to persist executions of processes in the database when they are in a wait state. The next example will show you how to store a process instance in the jBPM database. The example also suggests a context in which this might occur. Separate methods are created for different pieces of user code. E.g. an piece of user code in a web application starts a process and persists the execution in the database. Later, a message driven bean loads the process instance from the database and resumes its execution.

jBPM鐨勪竴涓熀鏈殑鐗規(guī)ф槸錛屽畠鑳藉鍦ㄤ笟鍔″鐞嗗浜庣瓑寰呯姸鎬佹椂錛屾妸涓氬姟澶勭悊鐨勬墽琛岀粨鏋滃偍瀛樺埌鏁版嵁搴撲腑銆備笅涓涓緥瀛愯鍛婅瘔浣犳庢牱鎶婁竴涓笟鍔″鐞嗙殑瀹炰緥淇濆瓨榪沯BPM鏁版嵁搴撱備緥瀛愪篃灞曠ず浜嗗彲鑳藉彂鐢熻繖縐嶆儏鍐電殑鍦烘櫙銆傚錛岀敤鎴風(fēng)殑涓氬姟澶勭悊浠g爜鐢卞嚑涓嫭绔嬬殑鏂規(guī)硶緇勬垚錛屼緥濡傦紝涓閮ㄥ垎鐢ㄦ埛浠g爜鏄紝鍦ㄤ竴涓猈eb搴旂敤紼嬪簭涓紑濮嬩竴涓鐞嗭紝騫朵笖鎶婅繖涓鐞嗕繚瀛樿繘鏁版嵁搴撱傜劧鍚庯紝涓涓秷鎭┍鍔ㄧ殑bean浠庢暟鎹簱涓紩瀵艱繖涓笟鍔″鐞嗗疄渚?---涔熷氨鏄笟鍔″鐞嗗畾涔夌殑涓涓墽琛岀殑瀹炰緥錛堟敞鎰?ProcessDefinition涓氬姟澶勭悊瀹氫箟鏄竴涓狹odel錛屼繚瀛榵ml鏍煎紡鐨勪笟鍔″鐞嗗浘琛紝涓縐岲SL鐗瑰畾棰嗗煙璇█錛涜孭rocessInstance涓氬姟澶勭悊瀹炰緥錛屼篃鏄竴涓狹odel錛屽畠鏄繚瀛樹笟鍔″鐞嗗畾涔夌殑涓嬈℃墽琛岀殑淇℃伅銆傚叿浣撶殑鎿嶄綔鐢變粠瀹冨緱鍒扮殑Token璁板彿綾繪墽琛屻俆oken綾繪槸Action綾伙紝鐪熸鎵ц涓氬姟澶勭悊鐨勬祦紼嬨俆oken綾誨簲璇ュ彨鍋?#8220;宸ヤ綔嫻佺▼綾?#8221;錛屼唬琛ㄤ簡涓氬姟澶勭悊鐨勪竴鏉″伐浣滄祦紼嬶級(jí)錛屾仮澶嶅畠鐨勬墽琛屻?br />
榪欐牱錛宩BPM鐨勪笟鍔″鐞嗗叿鏈夊垎孌點(diǎn)佸紓姝ユ墽琛岀殑鑳藉姏銆?br />


More about the jBPM persistence can be found in Chapter 7, Persistence.

API鍙傝冿細(xì)

1,Jbpm閰嶇疆

public class JbpmConfiguration

extends java.lang.Object

implements java.io.Serializable

configuration of one jBPM instance.涓涓猨BPM瀹炰緥鐨勯厤緗備篃灝辨槸璇達(dá)紝jBPM鍙互浣跨敤澶氫釜jBPM閰嶇疆銆傚熀鏈笂錛屼竴涓猨BPM鐨勪笟鍔″鐞嗗彲浠ヤ嬌鐢ㄤ竴涓狫bpmConfiguration瀵硅薄鐨勫疄渚嬨?br />
During process execution, jBPM might need to use some services. A JbpmConfiguration contains the knowledge on how to create those services.

鍦ㄤ笟鍔″鐞嗙殑鎵ц榪囩▼涓紝jBPM鍙兘闇瑕佷嬌鐢ㄤ竴浜涙湇鍔°備竴涓狫bpm閰嶇疆綾誨寘鍚簡鎬庢牱鍒涘緩榪欎簺鏈嶅姟鐨勭煡璇嗐?br />
A JbpmConfiguration is a thread safe object and serves as a factory for JbpmContexts, which means one JbpmConfiguration can be used to create JbpmContexts for all threads. The single JbpmConfiguration can be maintained in a static member or in the JNDI tree if that is available.

涓涓狫bpmConfiguration鑳藉琚敤鏉ヤ負(fù)鎵鏈夌殑綰跨▼鍒涘緩JbpmContext銆侸bpmConfiguration.createJbpmContext()錛涙柟娉曞垱寤篔bpm涓婁笅鏂囩幆澧冪被鐨勪竴涓疄渚嬨?br />
JbpmConfiguration搴旇浣跨敤鍗曚緥錛屽闈欐佹垚鍛橈紝鎴栬匤NDI鏍?wèi)锛屾垨鑰匢OC瀹瑰櫒綆$悊鐨勫崟渚嬬瓑銆?

A JbpmConfiguration can be obtained in following ways:

from a resource (by default jbpm.cfg.xml is used):
· JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();



or

String myXmlResource = "...";

JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance(myXmlResource);

from an XML string:
· JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(

· "" +

· ...

· ""

· );



By specifying a custom implementation of an object factory. This can be used to specify a JbpmConfiguration in other bean-style notations such as used by JBoss Microcontainer or Spring.
閫氳繃鎸囧畾涓涓璞″伐鍘傜殑瀹氬埗瀹炵幇銆傝鐢ㄥ湪JBoss鎴栬匰pring瀹瑰櫒涓?br />


· ObjectFactory of = new MyCustomObjectFactory();

· JbpmConfiguration.Configs.setDefaultObjectFactory(of);

· JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();



JbpmConfigurations can be configured using a spring-like XML notation (in relax ng compact notation):

datatypes xs = "http://www.w3.org/2001/XMLSchema-datatypes"



start = element beans { element object* }



object = {

jbpm-context |

bean |

ref |

map |

list |

string |

int |

long |

float |

double |

char |

bool |

true |

false |

null

}



jbpm-context = element jbpm-context {

( attribute name {xsd:string},

service*,

save-operations?

)

}



service = element service {

( attribute name {xsd:string},

( attribute factory {xsd:string} ) |

( factory )

)

}



factory = element factory {

( bean |

ref

)

}



save-operations = element save-operations {

( save-operation* )

}



save-operation = element save-operation {

( ( attribute class {xsd:string} ) |

( bean |

ref

)

)

}



bean = element bean {

( attribute ref-name {xsd:string} ) |

( attribute name {xsd:string}?,

attribute class {xsd:string}?,

attribute singleton { "true" | "false" }?,

constructor*,

field*,

property*

)

}



ref = element ref {

( attribute bean (xsd:string) )

}



constructor = element constructor {

attribute class {xsd:string}?,

( attribute factory {xsd:string},

attribute method {xsd:string}

)?,

parameter*

}



parameter = element parameter {

attribute class {xsd:string},

object

}



field = element field {

attribute name {xsd:string},

object

}



property = element property {

( attribute name {xsd:string} |

attribute setter {xsd:string}

),

object

}



map = element map {

entry*

}



entry = element entry {

key,

value

}



key = element key {

object

}



value = element value {

object

}



list = element list {

object*

}



string = element string {xsd:string}

int = element integer {xsd:integer}

long = element long {xsd:long}

float = element float {xsd:string}

double = element string {xsd:double}

char = element char {xsd:character}

bool = element bool { "true" | "false" }

true = element true {}

false = element false {}

null = element null {}



Other configuration properties

jbpm.msg.wait.timout


jbpm.files.dir


jbpm.types







2錛孞bpm涓婁笅鏂囩幆澧?br />
public class JbpmContext

extends java.lang.Object

implements java.io.Serializable

is used to surround persistent operations to processes.

琚敤鏉ヨ礋璐d笟鍔″鐞嗙殑鎸佷箙鍖栨搷浣溿傚畠搴曞眰浣跨敤Hibernate絳夋暟鎹簱鎸佷箙鍖栨妧鏈潵涓庢暟鎹簱涓殑淇濆瓨涓氬姟澶勭悊鍥捐〃銆佷笟鍔″鐞嗙殑鎵ц絳夌殑鏁版嵁搴撹〃浜や簰銆?br />
Obtain JbpmContext's via JbpmConfiguration.createJbpmContext() and put it in a try-finally block like this:

浣滀負(fù)涓涓暟鎹簱鎸佷箙鍖栬祫婧愶紝蹇呴』瑕佸叧闂?br />
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();

try {

TaskInstance taskInstance = ...



...do your process operations...



// in case you update a process object that was not fetched

// with a ...ForUpdate method, you have to save it.

/*





*/

jbpmContext.save(processInstance);

finally {

jbpmContext.close();

}



A JbpmContext separates jBPM from a sprecific environment. For each service that jBPM uses, there is an interface specified in the jBPM codebase. jBPM also includes implementations that implement these services by using services in a specific environment. e.g. a hibernate session, a JMS asynchronous messaging system, ...

JbpmContext浠庝竴涓猨BPM瀹炰緥鐨勭幆澧冧腑鍒嗙鑰屾潵銆傛瘡涓涓猨BPM浣跨敤鐨勬湇鍔★紝鍦╦BPM鐨勪唬鐮佸簱涓湁鎸囧畾鐨勫熷彛銆俲BPM涔熷寘鎷湪涓涓壒瀹氱幆澧冧腑浣跨敤榪欎簺鏈嶅姟鐨勫疄鐜扮被銆?br />
A JbpmContext can demarcate a transaction. When a PersistenceService is fetched from the JbpmContext, the default implementation for the persistence service will create a hibernate session and start a transaction. So that transactions can be configured in the hibernate configuration.

JbpmContext鑳藉浣跨敤浜嬪姟銆傚鏋滀竴涓寔涔呭寲鏈嶅姟鏄粠JbpmContext涓潵鐨勶紝閭d箞榛樿鐨勬寔涔呭寲瀹炵幇鏄疕ibernate錛岄偅涔堝皢浼?xì)鍒涘晦Z竴涓狧ibernate浼?xì)璇濆拰浜嬪姟銆?br />
A JbpmContext allows the user to overwrite閲嶅啓 (or make complete) the configuration by injecting objects programmatically緙栫▼娉ㄥ叆瀵硅薄. like e.g. a hibernate session factory or a hibernate session or any other resource that can be fetched or created from the configuration.

Last but not least, JbpmContext provides convenient鏂逛究鐨?access to the most common operations such as getTaskList(String), newProcessInstance(String)loadTaskInstanceForUpdate(long) and save(ProcessInstance).

All the ...ForUpdate(...) methods will automatically save the loaded objects at jbpmContext.close();

鎵鏈夎繖浜涙秹鍙?qiáng)鍒版暟鎹簱鏇存柊鐨勬搷浣滃Q岄兘浼?xì)鍦╦bpmContext.close()璋冪敤鏃惰鑷姩淇濆瓨鍒版暟鎹簱涓?br />


3錛孏raphSession綾?涓氬姟澶勭悊鍥捐〃浼?xì)璇澗c伙紝鏇寸‘鍒囩殑鍚嶅瓧錛氫笟鍔″鐞嗗畾涔?浼?xì)璇澗c?br />






/*

* JBoss, Home of Professional Open Source

* Copyright 2005, JBoss Inc., and individual contributors as indicated

* by the @authors tag. See the copyright.txt in the distribution for a

* full listing of individual contributors.

*

* This is free software; you can redistribute it and/or modify it

* under the terms of the GNU Lesser General Public License as

* published by the Free Software Foundation; either version 2.1 of

* the License, or (at your option) any later version.

*

* This software is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

* Lesser General Public License for more details.

*

* You should have received a copy of the GNU Lesser General Public

* License along with this software; if not, write to the Free

* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA

* 02110-1301 USA, or see the FSF site: http://www.fsf.org.

*/

package org.jbpm.tutorial.db;



import java.util.List;



import junit.framework.TestCase;



import org.jbpm.JbpmConfiguration;

import org.jbpm.JbpmContext;

import org.jbpm.db.GraphSession;

import org.jbpm.graph.def.ProcessDefinition;

import org.jbpm.graph.exe.ProcessInstance;

import org.jbpm.graph.exe.Token;



public class HelloWorldDbTest extends TestCase {



static JbpmConfiguration jbpmConfiguration = null;



static {

// An example configuration file such as this can be found in

// 'src/config.files'. Typically the configuration information is in the

// resource file 'jbpm.cfg.xml', but here we pass in the configuration

// information as an XML string.



// First we create a JbpmConfiguration statically. One JbpmConfiguration

// can be used for all threads in the system, that is why we can safely

// make it static.

/**

*鍗曚緥瀵硅薄銆?br />
*JbpmConfiguration鑳藉琚郴緇熶腑鎵鏈夌嚎紼嬫墍浣跨敤銆?br />
*jbpm.cfg.xml榪欎釜鍛藉悕鏂瑰紡鍜孒ibernate閰嶇疆鏂囦歡鐨勫懡鍚嶆柟寮忎竴鑷淬?br />
*

*/



jbpmConfiguration = JbpmConfiguration.parseXmlString(

"" +



// A jbpm-context mechanism separates the jbpm core

// engine from the services that jbpm uses from

// the environment.

/*jbpm-context鏈哄埗鍦ㄧ幆澧冧腑鎶妀bpm鏍稿績寮曟搸鍜宩bpm浣跨敤鐨勬湇鍔″垎寮銆?br />
* 鎸佷箙鍖栨湇鍔℃槸jbpm鏍稿績寮曟搸浣跨敤鐨勪竴涓湇鍔°?br />
*

* */



" " +

" " +

"
" +



// Also all the resource files that are used by jbpm are

// referenced from the jbpm.cfg.xml

/*

*string錛岄厤緗簡鎵鏈塲bpm浣跨敤鐨勮祫婧愭枃浠剁殑璺緞銆?br />
* */



" " +

" " +

" " +

" " +

" " +

" " +

" " +

"
"

);

}



public void setUp() {

//鍒涘緩璁″垝

jbpmConfiguration.createSchema();

}



public void tearDown() {

//鍒犻櫎璁″垝

jbpmConfiguration.dropSchema();

}



public void testSimplePersistence() {

// Between the 3 method calls below, all data is passed via the

// database. Here, in this unit test, these 3 methods are executed

// right after each other because we want to test a complete process

// scenario鎯呰妭. But in reality, these methods represent different

// requests to a server.



// Since we start with a clean, empty in-memory database, we have to

// deploy the process first. In reality, this is done once by the

// process developer.

/**

* 榪欎釜鏂規(guī)硶鎶婁笟鍔″鐞嗗畾涔夐氳繃Hibernate淇濆瓨鍒版暟鎹簱涓?br />
*/

deployProcessDefinition();



// Suppose we want to start a process instance (=process execution)

// when a user submits a form in a web application...

/*鍋囪褰撲竴涓敤鎴鋒彁浜や竴涓〃鍗曟椂錛屾垜浠寮濮嬩竴涓笟鍔″鐞嗙殑瀹炰緥/鎵ц銆?br />
* 榪欏彲浠ュ湪Action涓墽琛屽鐞嗐?br />
*/

processInstanceIsCreatedWhenUserSubmitsWebappForm();



// Then, later, upon the arrival of an asynchronous message the

// execution must continue.

/*

* 鐒跺悗錛岀洿鍒板紓姝ユ秷鎭潵鍒幫紝鎵嶇戶緇墽琛屼笟鍔″鐞嗗疄渚嬬殑浣欎笅鐨勫伐浣滄祦紼嬨?br />
* */

theProcessInstanceContinuesWhenAnAsyncMessageIsReceived();

}



public void deployProcessDefinition() {

// This test shows a process definition and one execution

// of the process definition. The process definition has

// 3 nodes: an unnamed start-state, a state 's' and an

// end-state named 'end'.

/*

* 榪欎釜鏂規(guī)硶鎶婁笟鍔″鐞嗗畾涔夐氳繃Hibernate淇濆瓨鍒版暟鎹簱涓?br />
*

* */

ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(

" " +

" " +

" " +

"
" +

" " +

" " +

"
" +

" " +

"
"

);



// Lookup the pojo persistence context-builder that is configured above

JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();

try {

// Deploy the process definition in the database

jbpmContext.deployProcessDefinition(processDefinition);



} finally {

// Tear down the pojo persistence context.

// This includes flush the SQL for inserting the process definition

// to the database.

/*

* 鍏抽棴jbpm涓婁笅鏂囥傚垹闄ojo鎸佷箙鍖栦笂涓嬫枃銆?br />
* 榪欏寘鎷埛鏂癝QL鏉ョ湡姝g殑鎶婁笟鍔″鐞嗗畾涔夋彃鍏ュ埌鏁版嵁搴撲腑銆?br />
* */

jbpmContext.close();

}

}



public void processInstanceIsCreatedWhenUserSubmitsWebappForm() {

// The code in this method could be inside a struts-action

// or a JSF managed bean.



// Lookup the pojo persistence context-builder that is configured above

JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();

try {

/*

* 鍥捐〃浼?xì)璇濆Q屾槸鍥捐〃瀹氫箟/涓氬姟澶勭悊瀹氫箟 鐩稿叧鐨勬暟鎹簱灞傞潰鐨勪細(xì)璇濄傚簲璇ヤ篃鏄竴涓狧ibernate浼?xì)璇濄?br />
* 鍙互浠嶫Bpm涓婁笅鏂囪繖涓暟鎹簱----涓氬姟澶勭悊瀹氫箟銆佸疄渚嬬瓑 寰楀埌 涓氬姟澶勭悊瀹氫箟浼?xì)璇濄?br />
*

* */

GraphSession graphSession = jbpmContext.getGraphSession();

//浠庢暟鎹簱涓牴鎹笟鍔″鐞嗗畾涔夌殑鍚嶅瓧寰楀埌涓涓笟鍔″鐞嗗畾涔夈?br />
ProcessDefinition processDefinition =

graphSession.findLatestProcessDefinition("hello world");



// With the processDefinition that we retrieved from the database, we

// can create an execution of the process definition just like in the

// hello world example (which was without persistence).

/*

* 鍒涘緩涓氬姟澶勭悊瀹氫箟鐨勪竴涓疄渚嬨?br />
*

* */

ProcessInstance processInstance =

new ProcessInstance(processDefinition);



Token token = processInstance.getRootToken();

assertEquals("start", token.getNode().getName());

// Let's start the process execution

token.signal();

// Now the process is in the state 's'.

assertEquals("s", token.getNode().getName());



// Now the processInstance is saved in the database. So the

// current state of the execution of the process is stored in the

// database.

/*

* 鎵ц涓姝ュ伐浣滄祦紼嬪悗錛屼嬌鐢╦bpmContext淇濆瓨榪欎釜涓氬姟澶勭悊瀹炰緥榪涙暟鎹簱銆?br />
* 鎵浠ョ幇鍦ㄥ氨鎶婁笟鍔″鐞嗗疄渚嬬殑鎵ц鐘舵佷篃淇濆瓨榪涗簡鏁版嵁搴撱?br />
* 鍥犱負(fù)錛屼笟鍔″鐞嗗畾涔夌殑瀹炰緥 榪欎釜綾諱篃鏄竴涓狹odel綾伙紝鐢ㄤ簬綆$悊涓涓笟鍔″鐞嗗畾涔夌殑鎵ц鐨勬墍鏈変俊鎭紝

* 鏄竴涓渚嬫ā寮忕殑Model銆?br />
*

* */

jbpmContext.save(processInstance);

// The method below will get the process instance back out

// of the database and resume execution by providing another

// external signal.



} finally {

// Tear down the pojo persistence context.

jbpmContext.close();

}

}



public void theProcessInstanceContinuesWhenAnAsyncMessageIsReceived() {

// The code in this method could be the content of a message driven bean.

//榪欎釜鏂規(guī)硶鍙兘鍦ㄦ秷鎭┍鍔˙ean榪欎釜榪滅▼涓氬姟浠g悊綾諱腑銆?br />
// Lookup the pojo persistence context-builder that is configured above

JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();

try {



GraphSession graphSession = jbpmContext.getGraphSession();

// First, we need to get the process instance back out of the database.

// There are several options to know what process instance we are dealing

// with here. The easiest in this simple test case is just to look for

// the full list of process instances. That should give us only one

// result. So let's look up the process definition.



ProcessDefinition processDefinition =

graphSession.findLatestProcessDefinition("hello world");



// Now, we search for all process instances of this process definition.

/*

* 鏍規(guī)嵁涓氬姟澶勭悊瀹氫箟鐨刬d寰楀埌鏁版嵁搴撲腑鎵鏈夌殑涓氬姟澶勭悊瀹炰緥銆傝繖琛ㄦ槑錛屾暟鎹簱涓簲璇ュ瓨鍦?寮犺〃

* 瀹冧滑鏄?涓瀵瑰 鐨勫叧緋匯?br />
*

* */

List processInstances =

graphSession.findProcessInstances(processDefinition.getId());



// Because we know that in the context of this unit test, there is

// only one execution. In real life, the processInstanceId can be

// extracted from the content of the message that arrived or from

// the user making a choice.

ProcessInstance processInstance =

(ProcessInstance) processInstances.get(0);



// Now we can continue the execution. Note that the processInstance

// delegates signals to the main path of execution (=the root token).

processInstance.signal();



// After this signal, we know the process execution should have

// arrived in the end-state.

assertTrue(processInstance.hasEnded());



// Now we can update the state of the execution in the database

jbpmContext.save(processInstance);



} finally {

// Tear down the pojo persistence context.

jbpmContext.close();

}

}

}



3.3. Context example: process variables

涓婁笅鏂囦緥瀛愶細(xì)澶勭悊鍙橀噺

The process variables contain the context information during process executions. The process variables are similar to a java.util.Map that maps variable names to values, which are java objects. The process variables are persisted as a part of the process instance. To keep things simple, in this example we only show the API to work with variables, without persistence.

ContextInstance綾葷殑瀹炰緥淇濆瓨 鍦≒rocessInstance涓傛槸瀹冪殑涓涓垚鍛樺璞°傛槸涓涓狹ap錛屼繚瀛樺悕鍊煎銆傚畠浠細(xì)琚繚瀛樺湪鏁版嵁搴撲腑銆?搴旇鏄竴涓嫭绔嬬殑琛ㄣ傚拰涓氬姟澶勭悊瀹氫箟鐨勫疄渚?鎵ц琛?鏄?#8220;涓瀵瑰”鐨勫叧緋伙紒

鍙互鍦ㄨ繖閲屼繚瀛樹竴浜涘繀瑕佺殑淇℃伅錛岀敤浜庡伐浣滄祦紼嬪鐞嗙殑浜ゆ祦鐨勯渶瑕侊紒

More information about variables can be found in Chapter 10, Context

publicclass ContextTest extends TestCase {



publicvoid testContext() {

// Also this example starts from the hello world process.

// This time even without modification.

ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(

" " +

" " +

" " +

"
" +

" " +

" " +

"
" +

" " +

"
"

);



ProcessInstance processInstance =

new ProcessInstance(processDefinition);



// Fetch the context instance from the process instance

// for working with the process variableInstances.

//寰楀埌涓涓猰ap錛屼笟鍔″鐞嗗疄渚嬬殑涓婁笅鏂囧疄渚婱ap銆傚寘鍚笟鍔″鐞嗗疄渚嬬殑涓浜涗笂涓嬫枃淇℃伅銆?br />
ContextInstance contextInstance =

processInstance.getContextInstance();



// Before the process has left the start-state,

// we are going to set some process variableInstances in the

// context of the process instance.

contextInstance.setVariable("amount", new Integer(500));

contextInstance.setVariable("reason", "i met my deadline");



// From now on, these variableInstances are associated with the

// process instance. The process variableInstances are now accessible

// by user code via the API shown here, but also in the actions

// and node implementations. The process variableInstances are also

// stored into the database as a part of the process instance.



processInstance.signal();



// The variableInstances are accessible via the contextInstance.



assertEquals(new Integer(500),

contextInstance.getVariable("amount"));

assertEquals("i met my deadline",

contextInstance.getVariable("reason"));

}



}



3.4. Task assignment example浠誨姟濮旀淳渚嬪瓙

In the next example we'll show how you can assign a task to a user. Because of the separation between the jBPM workflow engine and the organisational model, an expression language for calculating actors would always be too limited. Therefore, you have to specify an implementation of AssignmentHandler for including the calculation of actors for tasks.

鍦ㄤ笅涓涓緥瀛愪腑錛屾垜浠皢楂樺彅浣犳庢牱緇欎竴涓敤鎴峰垎閰嶄換鍔°傚洜涓簀BPM宸ヤ綔嫻佸紩鎿庡拰緇勭粐鐨勬ā鍨嬫椂鍚勮嚜鐙珛鐨勶紝鐢ㄤ竴縐嶈〃杈懼紡璇█鏉ヨ綆楀姩浣滄墽琛岃呮繪槸澶彈闄愪簡銆傚洜姝わ紝浣犲繀欏繪寚瀹氫竴涓垎媧懼鐞嗗櫒鐨勫疄鐜版潵鍖呮嫭浠誨姟鎵ц鑰呯殑璁$畻宸ヤ綔銆?br />
API鍙傝冿細(xì)

1錛屼換鍔″疄渚?br />
public class TaskInstance

extends VariableContainer

implements Assignable

is one task instance that can be assigned to an actor (read: put in someones task list) and that can trigger the coninuation of execution of the token upon completion.

鏄竴涓換鍔″疄渚嬶紝瀹冭兘澶熻鍒嗛厤緇欎竴涓敤鎴鳳紝鑳藉瑙﹀彂宸ヤ綔嫻佺殑緇х畫鎵ц銆?br />


publicclass TaskAssignmentTest extends TestCase {



publicvoid testTaskAssignment() {

// The process shown below is based on the hello world process.

// The state node is replaced by a task-node. The task-node

// is a node in JPDL that represents a wait state and generates

// task(s) to be completed before the process can continue to

// execute.

/*

* 浠誨姟鑺傜偣鏄竴涓狫PDL鐨勮妭鐐癸紝瀹冭〃紺轟竴涓瓑寰呯姸鎬侊紝鐢熸垚浠誨姟琚畬鎴愪箣鍓嶏紝涓氬姟澶勭悊灝嗕笉鑳芥墽琛屻?br />
*

* */

ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(

" " +

" " +

" " +

"
" +

" " +

" " +

" " +

"
" +

" " +

"
" +

" " +

"
"

);



// Create an execution of the process definition.

ProcessInstance processInstance =

new ProcessInstance(processDefinition);

Token token = processInstance.getRootToken();



// Let's start the process execution, leaving the start-state

// over its default transition.

token.signal();

// The signal method will block until the process execution

// enters a wait state. In this case, that is the task-node.

assertSame(processDefinition.getNode("t"), token.getNode());



// When execution arrived in the task-node, a task 'change nappy'

// was created and the NappyAssignmentHandler was called to determine

// to whom the task should be assigned. The NappyAssignmentHandler

// returned 'papa'.



// In a real environment, the tasks would be fetched from the

// database with the methods in the org.jbpm.db.TaskMgmtSession.

// Since we don't want to include the persistence complexity in

// this example, we just take the first task-instance of this

// process instance (we know there is only one in this test

// scenario.

/*

* 鎵ц鍒頒換鍔℃椂錛岄渶瑕佹墽琛屾寚瀹氱殑綾匯傝繖涓被璁劇疆浜嗘墽琛岃呯殑id銆?br />
* 鍦ㄧ湡瀹炵幆澧冧腑錛屽簲璇ユ槸浠庢暟鎹簱涓繑鍥炰換鍔★紝

* org.jbpm.db.TaskMgmtSession

* TaskInstance鍖呭惈錛歩d,浠誨姟鍚嶏紝鐢ㄦ埛id銆?br />
* 涓氬姟澶勭悊瀹炰緥---浠誨姟

* 1 n

*

* 鐢ㄦ埛-------====浠誨姟

* 1 n

*

* */

TaskInstance taskInstance = (TaskInstance)

processInstance

.getTaskMgmtInstance()

.getTaskInstances()

.iterator().next();



// Now, we check if the taskInstance was actually assigned to 'papa'.

assertEquals("papa", taskInstance.getActorId() );



// Now suppose that 'papa' has done his duties and marks the task

// as done.

taskInstance.end();

// Since this was the last (only) task to do, the completion of this

// task triggered the continuation of the process instance execution.



assertSame(processDefinition.getNode("end"), token.getNode());

}



}

3.5. Custom action example瀹氬埗鍔ㄤ綔渚嬪瓙

Actions are a mechanism to bind your custom java code into a jBPM process. Actions can be associated with its own nodes (if they are relevant in the graphical representation of the process). Or actions can be placed on events like e.g. taking a transition, leaving a node or entering a node. In that case, the actions are not part of the graphical representation, but they are executed when execution fires the events in a runtime process execution.

We'll start with a look at the action implementation that we are going to use in our example : MyActionHandler. This action handler implementation does not do really spectacular things涓嶆槸鐪熺殑鍋氫紵澶х殑浜嬫儏... it just sets the boolean variable isExecuted to true. The variable isExecuted is static so it can be accessed from within the action handler as well as from the action to verify it's value.

More information about actions can be found in Section 9.5, “Actions”

// MyActionHandler represents a class that could execute

// some user code during the execution of a jBPM process.

publicclass ActionTest extends TestCase {



// Each test will start with setting the static isExecuted

// member of MyActionHandler to false.

publicvoid setUp() {

MyActionHandler.isExecuted = false;

}



publicvoid testTransitionAction() {

// The next process is a variant of the hello world process.

// We have added an action on the transition from state s

// to the end-state. The purpose of this test is to show

// how easy it is to integrate java code in a jBPM process.

ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(

" " +

" " +

" " +

"
" +

" " +

//杞悜鎵ц鏃訛紝鎵ц璇ュ姩浣?br />
" " +

" " +

"
" +

"
" +

" " +

"
"

);



// Let's start a new execution for the process definition.

ProcessInstance processInstance =

new ProcessInstance(processDefinition);



// The next signal will cause the execution to leave the start

// state and enter the state 's'

processInstance.signal();



// Here we show that MyActionHandler was not yet executed.

assertFalse(MyActionHandler.isExecuted);

// ... and that the the main path of execution is positioned in

// the state 's'

assertSame(processDefinition.getNode("s"),

processInstance.getRootToken().getNode());



// The next signal will trigger the execution of the root

// token. The token will take the transition with the

// action and the action will be executed during the

// call to the signal method.

processInstance.signal();



// Here we can see that MyActionHandler was executed during

// the call to the signal method.

assertTrue(MyActionHandler.isExecuted);

}

The next example shows the same action, but now the actions are placed on the enter-node榪涘叆鑺傜偣浜嬩歡 and leave-node events 紱誨紑鑺傜偣浜嬩歡respectively. Note that a node has more then one event type in contrast to a transition, which has only one event. Therefore actions placed on a node should be put in an event element.

Transition杞悜鍙湁涓涓妭鐐廣?br />


publicvoid testNodeActions() {

ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(

" " +

" " +

" " +

"
" +

" " +

//鑺傜偣榪涘叆浜嬩歡錛岃繘鍏ヨ妭鐐規(guī)椂錛屼簨浠舵縺媧匯傛墽琛岃鍔ㄤ綔銆?br />
" " +

" " +

"
" +

//鑺傜偣紱誨紑浜嬩歡錛岀寮鑺傜偣鏃訛紝浜嬩歡嬋媧匯傛墽琛岃鍔ㄤ綔銆?br />
" " +

" " +

"
" +

" " +

"
" +

" " +

"
"

);



ProcessInstance processInstance =

new ProcessInstance(processDefinition);



assertFalse(MyActionHandler.isExecuted);

// The next signal will cause the execution to leave the start

// state and enter the state 's'. So the state 's' is entered

// and hence鍥犳 the action is executed.

processInstance.signal();

assertTrue(MyActionHandler.isExecuted);



// Let's reset the MyActionHandler.isExecuted

MyActionHandler.isExecuted = false;



// The next signal will trigger execution to leave the

// state 's'. So the action will be executed again.

processInstance.signal();

// Voila.

assertTrue(MyActionHandler.isExecuted);

}

}





鍔ㄤ綔綾?br />
publicclass MyActionHandler implements ActionHandler {



privatestaticfinallongserialVersionUID = 1L;



// Before each test (in the setUp), the isExecuted member

// will be set to false.

publicstaticbooleanisExecuted = false;



// The action will set the isExecuted to true so the

// unit test will be able to show when the action

// is being executed.

publicvoid execute(ExecutionContext executionContext) {

isExecuted = true;

}

}



API鍙傝冿細(xì)

1錛?br />
ExecutionContext 鎵ц涓婁笅鏂囩被銆?br />
浣滀負(fù)鍙傛暟鍥炶皟妯″紡鐨勫弬鏁幫紝鐢ㄤ簬寰楀埌涓氬姟澶勭悊瀹炰緥鐨勪笢瑗褲?br />
JbpmContext
getJbpmContext()


Node
getNode()


ProcessDefinition
getProcessDefinition()


ProcessInstance
getProcessInstance()



鍙互閫氳繃瀹冨緱鍒版墍鏈?#8220;涓氬姟澶勭悊”鐩稿叧鐨勫璞°?br />


紺肩墿 2007-09-06 12:29 鍙戣〃璇勮
]]>
jBPM3.12鐢ㄦ埛鎸囧崡涓枃緲昏瘧----絎竴绔?緇http://www.tkk7.com/libin2722/articles/143135.html紺肩墿紺肩墿Thu, 06 Sep 2007 04:19:00 GMThttp://www.tkk7.com/libin2722/articles/143135.htmlhttp://www.tkk7.com/libin2722/comments/143135.htmlhttp://www.tkk7.com/libin2722/articles/143135.html#Feedback0http://www.tkk7.com/libin2722/comments/commentRss/143135.htmlhttp://www.tkk7.com/libin2722/services/trackbacks/143135.html        鍚屾椂錛屽浜庡叾涓殑閮ㄥ垎鍐呭錛屾垜浼?xì)鍦ň樆璇戜腑鍋氬國櫑i噴銆?br /> 涓嬮潰鏄粠緗戠粶涓婃壘鍒扮殑絎竴绔狅紝榪欐槸jBPM3.0鐨勭敤鎴鋒寚鍗楃殑璇戞枃銆備絾鏄涓绔狅紝3.0鍜?.1鍐呭鐩稿樊涓嶅ぇ錛屾垜灝變笉鍋氱炕璇戜簡銆傜洿鎺ヤ嬌鐢ㄨ繖涓綃囥?br />

鐩綍

絎竴绔?/span>緇

 JBoss jBPM 鏄竴涓伒媧葷殑錛屾槗鎵╁睍鐨勫伐浣滄祦綆$悊緋葷粺銆?/span>JBoss jBPM鏈変竴濂楃洿瑙傜殑嫻佺▼寤烘ā璇█錛岃繖濂楄璦鑳界敤浠誨姟錛?/span>task錛夛紝寮傛閫氫俊鐨勭瓑寰呯姸鎬侊紙wait state 錛夛紝瀹氭椂鍣紙timer錛夛紝鑷姩鍖栫殑鍔ㄤ綔錛?/span>automated action錛夌瓑鏉ュ浘褰㈠寲鐨勮〃紺轟笟鍔℃祦紼嬨備負(fù)浜嗘妸榪欎簺鎿嶄綔闆嗘垚鍦ㄤ竴

璧鳳紝JBoss jBPM鎷ユ湁寮哄ぇ鐨勶紝鏄撴墿灞曠殑鎺у埗嫻佺▼鏈哄埗銆?/span>

JBoss jBPM瀵瑰渚濊禆紼嬪害寰堝皬錛屼綘瀹屽叏鍙互鍍忕敤java鐨勭被搴撲竴鏍風(fēng)敤瀹冦傚茍涓斿畠涔熷彲浠ヨ閮ㄧ講鍦ㄩ珮鎬ц兘鐨?/span>J2EE闆嗙兢搴旂敤鏈嶅姟鍣ㄤ笂銆?/span>

JBoss jBPM鑳介厤緗湪浠諱綍鏁版嵁搴撲笂錛屽茍涓旇兘琚儴緗插湪浠諱綍鐨勫簲鐢ㄦ湇鍔″櫒涓娿?/span>

1.1 鎬昏

 宸ヤ綔嫻佸拰涓氬姟嫻佺▼澶勭悊鍔熻兘鐨勬牳蹇冮儴鍒嗚鎵撳寘鎴愪竴涓畝鍗曠殑java綾誨簱銆傝繖涓被搴撳寘鎷簡榪欐牱涓涓湇鍔★細(xì)嫻佺▼淇℃伅鐨勫瓨鍌紝鏇存柊錛屽拰浠庢暟鎹簱涓噸鏂板彇鍥炪?/span>

   

鍥?/span>1.1錛?/span>JBoss jBPM緇勬垚妯″潡鐨勬鐣ュ浘

1.2 JBoss jBPM starter kit

starter kit鏄竴涓寘鍚?/span>jbpm鎵鏈夋ā鍧楃殑涓嬭澆鍖呫傝繖涓笅杞藉寘涓寘鎷互涓嬫ā鍧楋細(xì)

·                                 jbpm-server, 涓涓閫夐厤緗ソ鐨刯boss搴旂敤鏈嶅姟鍣ㄣ?/span>

·                                 jbpm-designer, 鍥懼艦鍖栧畾鍒舵祦紼嬬殑eclipse鎻掍歡銆?/span>

·                                 jbpm-db, jBPM鐨勬暟鎹簱鍏煎鍖?(瑙佸悗杈硅榪?銆?/span>

·                                 jbpm, jbpm鐨勬牳蹇冩ā鍧楋紝鍏朵腑鍖呮嫭libs鏂囦歡澶瑰拰榪欎釜鐢ㄦ埛璇存槑銆?/span>

·                                 jbpm-bpel, JBoss jBPM瀵笲PEL鎵╁睍鐨勪竴浜涘弬鑰冭祫鏂?/span>

棰勫厛閰嶇疆濂界殑JBoss搴旂敤鏈嶅姟鍣ㄥ叿鏈夊涓嬬粍鎴愰儴鍒嗭細(xì)

jBPM鏍稿績妯″潡錛岃鎵撳寘鎴愪竴涓敤浜庢彁渚涙湇鍔$殑瀛樻。鏂囦歡

甯︽湁jbpm琛ㄧ殑闆嗘垚鏁版嵁搴?/span>錛氶粯璁ょ殑hypersonic鏁版嵁搴撴嫢鏈?/span>jbpm琛紝騫朵笖榪欎釜琛ㄥ凡緇忔嫢鏈変竴涓祦紼嬩簡銆?/span>

Jbpm鐨?/span>web鎺у埗鍙?/span>錛屽畠鏃㈠彲浠ヨJbpm綆$悊鍛樼敤涔熷彲浠ヨ嫻佺▼鐨勫弬涓庤呬嬌鐢ㄣ?/span>

鎵ц瀹氭椂鍣ㄧ殑Jbpm鐨勮皟搴︾▼搴忥紝榪欎釜璋冨害紼嬪簭鍦?/span>starter kit閲岃竟琚厤緗垚涓涓?/span>servlet銆傝繖涓?/span>servlet浼?xì)漶旂敓涓涓柊鐨勭嚎紼嬫潵鐩戣鍜屾墽琛屽畾鏃跺櫒銆?/span>

涓涓叿浣撴祦紼嬬殑渚嬪瓙錛屽畠宸茬粡琚儴緗插湪jbpm鏁版嵁搴撲腑浜嗐?/span>

1.3 JBoss jBPM 嫻佺▼鍥懼艦瀹氬埗鍣?/span>

JBoss jBPM榪樻嫢鏈変竴濂楀浘褰㈠寲鐨勮璁″伐鍏楓傝繖涓璁″櫒鏄竴涓浘褰㈠寲鐨勪笟鍔℃祦紼嬪畾鍒跺伐鍏楓?/span>

JBoss jBPM嫻佺▼鍥懼艦瀹氬埗鍣ㄦ槸eclipse鐨勪竴涓彃浠躲傚崟鐙畨瑁呰繖涓畾鍒跺櫒闈炲父綆鍗曘?/span>

榪欎釜鍥懼艦璁捐鍣ㄦ渶閲嶈鐨勭壒鎬ф槸錛氫笟鍔″垎鏋愪漢鍛樹篃鑳藉儚鎶鏈紑鍙戜漢鍛樹竴鏍風(fēng)敤瀹冩潵瀹屾垚浠誨姟銆傝繖浣垮緱涓氬姟嫻佺▼寤烘ā鑳藉鉤婊戠殑杞崲鍒板叿浣撴妧鏈疄鐜般?/span>

榪欎釜鎻掍歡鍙互鍒╃敤eclipse鐨勪竴鑸崌綰ф満鍒墮氳繃涓涓崌綰х珯鐐瑰緱鍒板畨瑁咃紙zip鏂囦歡鏍煎紡錛夈備篃鍙互閫氳繃瑙e帇涓涓壒瀹氱殑鍖呭埌eclipse鐨勫畨瑁呯洰褰曟潵瀹夎姝ゆ彃浠躲?/span>

1.4 JBoss jBPM鐨勬牳蹇冩ā鍧?/span>

JBoss jBPM鐨勬牳蹇冩ā鍧楁槸涓涓敤鏉ョ鐞嗘祦紼嬪畾涔夊拰嫻佺▼瀹炰緥鐨勬墽琛岀幆澧冪殑鏅?/span>java紼嬪簭銆?/span>

JBoss jBPM鏄竴涓?/span>java綾誨簱銆傛墍浠ュ畠鍙互琚敤鍦ㄤ換浣?/span>java鐜涓紝姣斿錛?/span>web搴旂敤紼嬪簭錛?/span>swing搴旂敤紼嬪簭錛?/span>EJB錛?/span>web service……銆?/span>JBPM綾誨簱榪樺彲浠ヨ鎵撳寘騫惰褰撴垚鏃犵姸鎬佷細(xì)璇?/span>EJB錛?/span>stateless session EJB錛変嬌鐢ㄣ傝繖鏍峰彲浣垮畠琚儴緗插湪闆嗙兢涓婂茍涓旈傚簲楂樻ц兘搴旂敤銆傝繖浜涙棤鐘舵佷細(xì)璇?/span>EJB蹇呴』絎﹀悎J2EE1.3瑙勮寖榪欐牱鎵嶈兘浣垮畠鍙互琚儴緗插湪浠諱綍搴旂敤鏈嶅姟鍣ㄤ笂銆?/span>

JBoss jBPM鐨勬牳蹇冩ā鍧楄鎵撳寘鎴愪竴涓畝鍗曠殑java搴撴枃浠躲備緷浣犲姛鑳界殑闇瑕侊紝jbpm-3.0.jar榪欎釜搴撴枃浠跺涓浜涚涓夋柟鐨勭被搴撴瘮濡?/span>hibernate, dom4j鏈夋墍渚濊禆銆傝繖浜涗緷璧栧湪絎簲绔狅紙閮ㄧ講錛変腑浣滀簡璇︾粏鐨勮鏄庛?/span>

鑷充簬鎸佷箙鍖栵紝JBPM鍦ㄥ唴閮ㄧ敤浜?/span>hibernate銆傞櫎浜嗕紶緇熺殑O/R鏄犲皠鍔熻兘錛?/span>hibernate榪樿В鍐充簡涓嶅悓鏁版嵁SQL dialect宸紓鐨勯棶棰橈紝榪欎嬌寰?/span>JBPM鑳介傚簲鐜板湪鎵鏈夌殑鏁版嵁搴撱?/span>

JBoss jBPM API鍙互琚綘宸ョ▼涓換浣曠殑java浠g爜璋冪敤錛屾瘮濡傦紝浣犵殑web搴旂敤紼嬪簭錛?/span>EJB錛?/span>web service 妯″潡錛屾秷鎭┍鍔?/span>bean鎴栧叾瀹冧換浣?/span>java妯″潡銆?/span>

1.5 JBoss jBPM web搴旂敤紼嬪簭鐨勬帶鍒跺彴

jBPM web搴旂敤紼嬪簭鐨勬帶鍒跺彴鎻愪緵涓ょ鏈嶅姟銆傞鍏堬紝瀹冭鐢ㄦ潵褰撲綔涓涓敤鏉ュ拰嫻佺▼鎵ц榪囩▼涓駭鐢熺殑浠誨姟榪涜浜や簰鐨勪富瑕佺敤鎴鋒帴鍙o紝鍏舵錛屽畠榪樻槸涓涓敤鏉ユ鏌ュ拰鎿嶄綔榪愯瀹炰緥鐨勭鐞嗗拰鐩戞帶騫沖彴銆?/span>

1.6 JBoss jBPM浜哄憳緇勭粐妯″潡

JBoss jBPM鍙互鍜屼換浣曞寘鎷漢鍛樺拰鍏朵粬緇勭粐淇℃伅鐨勫叕鍙哥粨鏋勯泦鎴愬湪涓璧楓備絾鏄閭d簺緇勭粐緇撴瀯淇℃伅妯″潡寰堥毦鑾峰彇鐨勯」鐩紝JBoss jBPM鎻愪緵浜嗚繖涓ā鍧椼傝繖涓ā鍧椾嬌鐢ㄧ殑妯″瀷瑕佹瘮浼犵粺鐨?/span>servlet, ejb,portlet妯″瀷涓板瘜鐨勫銆?/span>

鏇村淇℃伅錛岃鍙傜収絎節(jié)绔犵涔?jié)鑺?/span>浜哄憳緇勭粐妯″潡

1.7 JBoss jBPM璋冨害紼嬪簭

JBoss jBPM璋冨害紼嬪簭鏄竴涓敤鏉ョ洃嫻嬪拰鎵ц鍦ㄦ祦紼嬫墽琛岃繃紼嬩腑璁劇疆鐨勫畾鏃跺櫒鐨勬ā鍧椼?/span>

瀹氭椂鍣ㄦā鍧楄鎵撳寘鍦?/span>jbpm鐨勬牳蹇冨寘涓紝浣嗘槸瀹冨繀欏昏閮ㄧ講鍦ㄤ互涓嬬幆澧冧腑錛氭垨鑰呬綘蹇呴』璁㈠埗涓涓皟搴?/span>servlet錛屽畠鏉ヤ駭鐢熶竴涓洃嫻嬬嚎紼嬶紝鎴栬呬綘蹇呴』鍚姩涓涓崟鐙殑JVM鏉ユ墽琛岃皟搴︾▼搴忋?/span>

1.8 JBoss jBPM 鏁版嵁搴撳吋瀹瑰寘

JBoss jBPM 鏁版嵁搴撳吋瀹瑰寘鏄竴涓笅杞藉寘錛屽畠鍖呮嫭鎵鏈夌殑璧勬枡錛?/span>drivers鍜?/span>scripts,鐢ㄨ繖浜涗綘鍙互浣?/span>jbpm榪愯鍦ㄤ綘閫夋嫨鐨勬暟鎹簱涓娿?/span>

1.9 JBoss jBPM BPE鐨勬墿灞?/span>

JBoss jBPM BPE鐨勬墿灞曟槸涓涓負(fù)浜嗘敮鎸?/span>BPEL鐙珛鐨勬墿灞曞寘銆?/span>BPEL鐨勬湰璐ㄥ氨鏄竴緇勭敤鏉ュ弬鐓у埆鐨?/span>web service鍐?/span>web service鐨?/span>xml鑴氭湰璇█銆?/span>



紺肩墿 2007-09-06 12:19 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 十八禁无码免费网站| 亚洲视频在线免费播放| 国产99精品一区二区三区免费| 国产成人免费ā片在线观看| 亚洲成av人无码亚洲成av人| 午夜网站免费版在线观看| 亚洲人成网站免费播放| 在线免费一区二区| 欧美激情综合亚洲一二区| 国产免费观看黄AV片| 色婷婷精品免费视频| 亚洲精品无码久久不卡| 国产精品无码永久免费888| 国产亚洲av片在线观看18女人| 久久免费国产精品| 亚洲av永久无码精品漫画| 91香蕉在线观看免费高清| 亚洲一区中文字幕在线电影网| 成年女人免费碰碰视频| 性色av极品无码专区亚洲| 免费在线观看黄色毛片| selaoban在线视频免费精品| 亚洲伊人久久大香线蕉综合图片 | 久久久久亚洲AV无码专区体验| 18级成人毛片免费观看| 亚洲AV无码一区二区三区在线| 大学生一级特黄的免费大片视频 | 亚洲熟妇av一区| 免费无码AV电影在线观看| 亚洲国产精华液2020| 亚洲精品网站在线观看不卡无广告| 一级特黄录像免费播放肥| 亚洲成人免费在线| 中文字幕无码免费久久99| 精品久久久久久亚洲中文字幕| 亚洲色偷拍区另类无码专区| 最近中文字幕大全免费版在线| 亚洲第一网站免费视频| 免费无码看av的网站| eeuss影院免费直达入口| 亚洲国产综合专区电影在线 |