0 0

jbpm4.4 与spring集成 事务问题15

我把jbpm4.4 和spring整合起来 .
流程文件如下:
<?xml version="1.0" encoding="UTF-8"?>

<process name="leave" xmlns="http://jbpm.org/4.4/jpdl">
   <start g="196,25,48,48" name="start1">
      <transition to="申请"/>
   </start>
   <task assignee="#{owner}" form="leave.htm?method=toFillForm" g="172,118,92,52" name="申请">
      <transition to="managerAudit"/>
   </task>
   <task  assignee="yexs" form="leave.htm?method=toManageAudit" g="175,217,92,52" name="managerAudit">
      <transition g="-32,-8" name="批准" to="exclusive1"/>
      <transition g="128,221;124,165:-42,-18" name="驳回" to="申请"/>
   </task>
   <decision expr="#{day > 3 ? '老板审批' : '结束'}" g="200,308,48,48" name="exclusive1">
      <transition g="-39,-10" name="结束" to="end1"/>
      <transition g="339,342:-71,-17" name="老板审批" to="老板审批"/>
   </decision>
   <task assignee="laoxin" form="leave.htm?method=toBossAudit" g="294,375,92,52" name="老板审批">
      <transition g="339,457:" to="end1"/>
   </task>
   <end g="199,445,48,48" name="end1"/>
</process>

jbpm.cfg.xml
<?xml version="1.0" encoding="UTF-8"?>

<jbpm-configuration>

  <import resource="jbpm.default.cfg.xml" />
  <import resource="jbpm.businesscalendar.cfg.xml" />
  <import resource="jbpm.tx.spring.cfg.xml" />
  <import resource="jbpm.jpdl.cfg.xml" />
  <import resource="jbpm.bpmn.cfg.xml" />
  <import resource="jbpm.identity.cfg.xml" />

  <!-- Job executor is excluded for running the example test cases. -->
  <!-- To enable timers and messages in production use, this should be included. -->
  <!--
  <import resource="jbpm.jobexecutor.cfg.xml" />
  -->

</jbpm-configuration>

applicationContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
	default-autowire="byName">

	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="configLocation">
			<value>classpath:hibernate.cfg.xml</value>
		</property>
	</bean>

		<!-- Jbpm 服务 -->
	<bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper" >
		 <property name="jbpmCfg" value="jbpm/jbpm.cfg.xml"></property>
	</bean>
	<bean id="processEngine" factory-bean="springHelper"
		factory-method="createProcessEngine" />
	<bean id="repositoryService" factory-bean="processEngine"
		factory-method="getRepositoryService" />
	<bean id="executionService" factory-bean="processEngine"
		factory-method="getExecutionService" />
	<bean id="taskService" factory-bean="processEngine"
		factory-method="getTaskService" />
	<bean id="historyService" factory-bean="processEngine"
		factory-method="getHistoryService" />
	<bean id="managementService" factory-bean="processEngine"
		factory-method="getManagementService" />
		
	<!--  装载spring提供的分发组件 -->
	<bean id="paraMethodResolver"
		class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">

		<property name="paramName" value="method" />
		<property name="defaultMethodName" value="list" />
	</bean>

	<!-- 上传文件 -->
	<bean id="multipartResolver"
		class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
		<property name="maxUploadSize">
			<value>4000000000</value>
		</property>
		<property name="maxInMemorySize">
			<value>10000000</value>
		</property>
		<property name="defaultEncoding">
			<value>utf-8</value>
		</property>
		<property name="uploadTempDir">
			<value>/temp</value>
		</property>
	</bean>
	<!-- 装载velocity配置文件 -->
	<bean id="velocityConfig"
		class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
		<property name="resourceLoaderPath">
			<value>/</value>
		</property>
		<property name="configLocation">
			<value>/WEB-INF/classes/velocity.properties</value>
		</property>
	</bean>
	<!-- 装载spring提供的velocity组建 -->
	<bean id="viewResolver"
		class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">
		<property name="requestContextAttribute" value="rc"/>
		<property name="exposeSessionAttributes" value="true" />
		<property name="suffix" value=".html"></property>
		<property name="dateToolAttribute">
			<value>dateTool</value>
		</property>
		<property name="toolboxConfigLocation"><value>/WEB-INF/velocity-toolbox.xml</value>	</property>
	</bean>
	<!-- 接口映射 配置URL请求 -->
	<bean id="simpleUrlMapping"
		class="com.yb.hrm.baselink.util.UrlHandlerMapping">
		<property name="interceptors">
			<list>
				<ref bean="openSessionInViewInterceptor" />
			</list>
		</property>
	</bean>

	<!-- business 服务 -->
	<bean id="baseBusiness"
		class="com.yb.hrm.baselink.business.BaseBusiness" />
	<!-- Service 服务 -->
	<bean id="baseService"
		class="com.yb.hrm.baselink.service.BaseService" />
	<!-- DAO申明	-->
	<bean id="baseDAO" class="com.yb.hrm.baselink.dao.BaseDAOImp">
	</bean>

	<!-- 	 配置事务管理器 -->
	<bean id="transactionManager"
		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory">
			<ref local="sessionFactory" />
		</property>
	</bean>

	<!--	 配置事务的传播特性 -->
	<tx:advice id="txAdvice" transaction-manager="transactionManager">
		<tx:attributes>
			<!--	 在开发的时候可以这样定义,但部署的时候一定要详细定义 -->
			<tx:method name="*" propagation="REQUIRED" />
			<tx:method name="get*" propagation="REQUIRED"
				rollback-for="-Exception" read-only="true" />
			<tx:method name="test*" propagation="REQUIRED"
				rollback-for="-Exception" read-only="true" />
			<tx:method name="find*" propagation="REQUIRED"
				rollback-for="-Exception" read-only="true" />
			<tx:method name="add*" propagation="REQUIRED"
				rollback-for="-Exception" />
			<tx:method name="update*" propagation="REQUIRED"
				rollback-for="-Exception" />
			<tx:method name="batch*" propagation="REQUIRED"
				rollback-for="-Exception" />
			<tx:method name="modify*" propagation="REQUIRED"
				rollback-for="-Exception" />
			<tx:method name="delete*" propagation="REQUIRED"
				rollback-for="-Exception" />
		</tx:attributes>
	</tx:advice>

	<!--	 配置哪些类哪些方法使用事务-->
	<aop:config>
		<aop:pointcut id="allManagerMethod"
			expression="execution(* com.yb.hrm..*.*Business.*(..))" />
		<aop:advisor advice-ref="txAdvice"
			pointcut-ref="allManagerMethod" />
	</aop:config>.....

business 的代码:
public class LeaveBusiness extends BaseBusiness {
	private RepositoryService repositoryService;
	private ExecutionService executionService;
	private TaskService taskService;
	
	public void setTaskService(TaskService taskService) {
		this.taskService = taskService;
	}

	public void setRepositoryService(RepositoryService repositoryService) {
		this.repositoryService = repositoryService;
	}
	
	public void setExecutionService(ExecutionService executionService) {
		this.executionService = executionService;
	}

	/**
	 *部署一个请假流程 
	 */
	public void deploy(){
		ZipInputStream zis = new ZipInputStream(this.getClass()
				.getResourceAsStream("/com/yb/hrm/jbpm/leave/jpdl/leave.zip"));
		repositoryService.createDeployment().addResourcesFromZipInputStream(zis).deploy();
	}
	/**删除流程定义 及其相关数据
	 * @param deployId
	 */
	public void removeDeploy(String deployId){
		repositoryService.deleteDeploymentCascade(deployId);
	}
	/**生成流程实例
	 * @param deployId
	 */
	public void startDefine(String deployId,String loginName){
		Map map = new HashMap();
		map.put("owner", loginName);
		executionService.startProcessInstanceByKey("leave", map);
	}
	
	/**获取流程定义
	 * @return
	 */
	public List getDefinition(){
		return repositoryService.createProcessDefinitionQuery().list();
	}
	/**获取流程定义
	 * @return
	 */
	public ProcessDefinition getDefinitionByPiId(String id){
		return repositoryService.createProcessDefinitionQuery().processDefinitionId(id).uniqueResult();
	}
	/**获取流程实例
	 * @return
	 */
	public List getInstance(){
		return executionService.createProcessInstanceQuery().list();
	}
	/**获取流程实例
	 * @return
	 */
	public ProcessInstance getInstanceById(String id){
		return executionService.findProcessInstanceById(id);
	}
	/**查询用户任务
	 * @param userId
	 * @return
	 */
	public List getTaskByUserId(String loginName){
		return taskService.findPersonalTasks(loginName);
	}
	/**获取当前节点位置
	 * @param userId
	 * @return
	 */
	public ActivityCoordinates getAc(ProcessInstance pi){
		return repositoryService.getActivityCoordinates(pi.getProcessDefinitionId(),pi.findActiveActivityNames().iterator().next());
	}
	/**获取流程图片流
	 * @param userId
	 * @return
	 */
	public InputStream getPicStream(ProcessDefinition pd){
		return repositoryService.getResourceAsStream(pd.getDeploymentId(), "leave.png");
	}
	/**提交请假单
	 * @param userId
	 * @return
	 */
	public void submitForm(Map map,String taskId){
		taskService.completeTask(taskId, map);
	}

当用户提交请假申请单 ,执行taskService.completeTask(taskId, map) 后 ,从后台可以看到该用户的 task 被删除了 ,但是第二步经理的task 并没有生成,流程没有往下走。。。流程始终停留在第一步。
这个问题困扰三天了,实在找不出原因

补充:流程按步骤执行(先新建流程定义,流程实例,再填写申请单--分别在不同的business方法里面执行),流程法继续,停留在第一步。流程一步执行(把新建流程定义,流程实例,填写申请单放在一个business方法里面,也就是同一个事务里面)流程可以继续执行,到达经理审批这一步。
流程分步执行的后台打印代码:
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select rightsobje0_.rightsObjectId as rightsOb1_20_, rightsobje0_.createTime as createTime20_, rightsobje0_.creatorId as creatorId20_, rightsobje0_.modifierId as modifierId20_, rightsobje0_.modifyTime as modifyTime20_, rightsobje0_.name as name20_, rightsobje0_.rightsId as rightsId20_, rightsobje0_.url as url20_ from t_rightsobject rightsobje0_ where rightsobje0_.url=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select taskimpl0_.DBID_ as DBID1_103_0_, taskimpl0_.DBVERSION_ as DBVERSION3_103_0_, taskimpl0_.NAME_ as NAME4_103_0_, taskimpl0_.DESCR_ as DESCR5_103_0_, taskimpl0_.STATE_ as STATE6_103_0_, taskimpl0_.SUSPHISTSTATE_ as SUSPHIST7_103_0_, taskimpl0_.ASSIGNEE_ as ASSIGNEE8_103_0_, taskimpl0_.FORM_ as FORM9_103_0_, taskimpl0_.PRIORITY_ as PRIORITY10_103_0_, taskimpl0_.CREATE_ as CREATE11_103_0_, taskimpl0_.DUEDATE_ as DUEDATE12_103_0_, taskimpl0_.PROGRESS_ as PROGRESS13_103_0_, taskimpl0_.SIGNALLING_ as SIGNALLING14_103_0_, taskimpl0_.EXECUTION_ID_ as EXECUTION15_103_0_, taskimpl0_.ACTIVITY_NAME_ as ACTIVITY16_103_0_, taskimpl0_.HASVARS_ as HASVARS17_103_0_, taskimpl0_.SUPERTASK_ as SUPERTASK18_103_0_, taskimpl0_.EXECUTION_ as EXECUTION19_103_0_, taskimpl0_.PROCINST_ as PROCINST20_103_0_, taskimpl0_.SWIMLANE_ as SWIMLANE21_103_0_, taskimpl0_.TASKDEFNAME_ as TASKDEF22_103_0_ from JBPM4_TASK taskimpl0_ where taskimpl0_.DBID_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select executioni0_.DBID_ as DBID1_94_0_, executioni0_.DBVERSION_ as DBVERSION3_94_0_, executioni0_.ACTIVITYNAME_ as ACTIVITY4_94_0_, executioni0_.PROCDEFID_ as PROCDEFID5_94_0_, executioni0_.HASVARS_ as HASVARS6_94_0_, executioni0_.NAME_ as NAME7_94_0_, executioni0_.KEY_ as KEY8_94_0_, executioni0_.ID_ as ID9_94_0_, executioni0_.STATE_ as STATE10_94_0_, executioni0_.SUSPHISTSTATE_ as SUSPHIS11_94_0_, executioni0_.PRIORITY_ as PRIORITY12_94_0_, executioni0_.HISACTINST_ as HISACTINST13_94_0_, executioni0_.PARENT_ as PARENT14_94_0_, executioni0_.INSTANCE_ as INSTANCE15_94_0_, executioni0_.SUPEREXEC_ as SUPEREXEC16_94_0_, executioni0_.SUBPROCINST_ as SUBPROC17_94_0_ from JBPM4_EXECUTION executioni0_ where executioni0_.DBID_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select executions0_.PARENT_ as PARENT14_1_, executions0_.DBID_ as DBID1_1_, executions0_.PARENT_IDX_ as PARENT18_1_, executions0_.DBID_ as DBID1_94_0_, executions0_.DBVERSION_ as DBVERSION3_94_0_, executions0_.ACTIVITYNAME_ as ACTIVITY4_94_0_, executions0_.PROCDEFID_ as PROCDEFID5_94_0_, executions0_.HASVARS_ as HASVARS6_94_0_, executions0_.NAME_ as NAME7_94_0_, executions0_.KEY_ as KEY8_94_0_, executions0_.ID_ as ID9_94_0_, executions0_.STATE_ as STATE10_94_0_, executions0_.SUSPHISTSTATE_ as SUSPHIS11_94_0_, executions0_.PRIORITY_ as PRIORITY12_94_0_, executions0_.HISACTINST_ as HISACTINST13_94_0_, executions0_.PARENT_ as PARENT14_94_0_, executions0_.INSTANCE_ as INSTANCE15_94_0_, executions0_.SUPEREXEC_ as SUPEREXEC16_94_0_, executions0_.SUBPROCINST_ as SUBPROC17_94_0_ from JBPM4_EXECUTION executions0_ where executions0_.PARENT_=?
2010-9-21 17:46:44 org.jbpm.internal.log.Jdk14Log debug
良好: create variable 'reason' in 'execution[leave.150001]' with value '2'
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select variables0_.EXECUTION_ as EXECUTION7_1_, variables0_.DBID_ as DBID1_1_, variables0_.KEY_ as KEY4_1_, variables0_.DBID_ as DBID1_95_0_, variables0_.DBVERSION_ as DBVERSION3_95_0_, variables0_.KEY_ as KEY4_95_0_, variables0_.CONVERTER_ as CONVERTER5_95_0_, variables0_.HIST_ as HIST6_95_0_, variables0_.EXECUTION_ as EXECUTION7_95_0_, variables0_.TASK_ as TASK8_95_0_, variables0_.LOB_ as LOB9_95_0_, variables0_.DATE_VALUE_ as DATE10_95_0_, variables0_.DOUBLE_VALUE_ as DOUBLE11_95_0_, variables0_.CLASSNAME_ as CLASSNAME12_95_0_, variables0_.LONG_VALUE_ as LONG13_95_0_, variables0_.STRING_VALUE_ as STRING14_95_0_, variables0_.TEXT_VALUE_ as TEXT15_95_0_, variables0_.CLASS_ as CLASS2_95_0_ from JBPM4_VARIABLE variables0_ where variables0_.EXECUTION_=?
2010-9-21 17:46:44 org.jbpm.internal.log.Jdk14Log debug
良好: create variable 'day' in 'execution[leave.150001]' with value '2'
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select historytas0_.DBID_ as DBID1_99_0_, historytas0_.DBVERSION_ as DBVERSION3_99_0_, historytas0_.HPROCI_ as HPROCI4_99_0_, historytas0_.TYPE_ as TYPE5_99_0_, historytas0_.EXECUTION_ as EXECUTION6_99_0_, historytas0_.ACTIVITY_NAME_ as ACTIVITY7_99_0_, historytas0_.START_ as START8_99_0_, historytas0_.END_ as END9_99_0_, historytas0_.DURATION_ as DURATION10_99_0_, historytas0_.TRANSITION_ as TRANSITION11_99_0_, historytas0_.NEXTIDX_ as NEXTIDX12_99_0_, historytas0_.HTASK_ as HTASK13_99_0_ from JBPM4_HIST_ACTINST historytas0_ where historytas0_.DBID_=? and historytas0_.CLASS_='task'
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select historytas0_.DBID_ as DBID1_100_0_, historytas0_.DBVERSION_ as DBVERSION2_100_0_, historytas0_.EXECUTION_ as EXECUTION3_100_0_, historytas0_.OUTCOME_ as OUTCOME4_100_0_, historytas0_.ASSIGNEE_ as ASSIGNEE5_100_0_, historytas0_.PRIORITY_ as PRIORITY6_100_0_, historytas0_.STATE_ as STATE7_100_0_, historytas0_.CREATE_ as CREATE8_100_0_, historytas0_.END_ as END9_100_0_, historytas0_.DURATION_ as DURATION10_100_0_, historytas0_.NEXTIDX_ as NEXTIDX11_100_0_ from JBPM4_HIST_TASK historytas0_ where historytas0_.DBID_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select participat0_.TASK_ as TASK6_1_, participat0_.DBID_ as DBID1_1_, participat0_.DBID_ as DBID1_104_0_, participat0_.DBVERSION_ as DBVERSION2_104_0_, participat0_.GROUPID_ as GROUPID3_104_0_, participat0_.USERID_ as USERID4_104_0_, participat0_.TYPE_ as TYPE5_104_0_, participat0_.TASK_ as TASK6_104_0_, participat0_.SWIMLANE_ as SWIMLANE7_104_0_ from JBPM4_PARTICIPATION participat0_ where participat0_.TASK_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select variables0_.TASK_ as TASK8_1_, variables0_.DBID_ as DBID1_1_, variables0_.KEY_ as KEY4_1_, variables0_.DBID_ as DBID1_95_0_, variables0_.DBVERSION_ as DBVERSION3_95_0_, variables0_.KEY_ as KEY4_95_0_, variables0_.CONVERTER_ as CONVERTER5_95_0_, variables0_.HIST_ as HIST6_95_0_, variables0_.EXECUTION_ as EXECUTION7_95_0_, variables0_.TASK_ as TASK8_95_0_, variables0_.LOB_ as LOB9_95_0_, variables0_.DATE_VALUE_ as DATE10_95_0_, variables0_.DOUBLE_VALUE_ as DOUBLE11_95_0_, variables0_.CLASSNAME_ as CLASSNAME12_95_0_, variables0_.LONG_VALUE_ as LONG13_95_0_, variables0_.STRING_VALUE_ as STRING14_95_0_, variables0_.TEXT_VALUE_ as TEXT15_95_0_, variables0_.CLASS_ as CLASS2_95_0_ from JBPM4_VARIABLE variables0_ where variables0_.TASK_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select subtasks0_.SUPERTASK_ as SUPERTASK18_1_, subtasks0_.DBID_ as DBID1_1_, subtasks0_.DBID_ as DBID1_103_0_, subtasks0_.DBVERSION_ as DBVERSION3_103_0_, subtasks0_.NAME_ as NAME4_103_0_, subtasks0_.DESCR_ as DESCR5_103_0_, subtasks0_.STATE_ as STATE6_103_0_, subtasks0_.SUSPHISTSTATE_ as SUSPHIST7_103_0_, subtasks0_.ASSIGNEE_ as ASSIGNEE8_103_0_, subtasks0_.FORM_ as FORM9_103_0_, subtasks0_.PRIORITY_ as PRIORITY10_103_0_, subtasks0_.CREATE_ as CREATE11_103_0_, subtasks0_.DUEDATE_ as DUEDATE12_103_0_, subtasks0_.PROGRESS_ as PROGRESS13_103_0_, subtasks0_.SIGNALLING_ as SIGNALLING14_103_0_, subtasks0_.EXECUTION_ID_ as EXECUTION15_103_0_, subtasks0_.ACTIVITY_NAME_ as ACTIVITY16_103_0_, subtasks0_.HASVARS_ as HASVARS17_103_0_, subtasks0_.SUPERTASK_ as SUPERTASK18_103_0_, subtasks0_.EXECUTION_ as EXECUTION19_103_0_, subtasks0_.PROCINST_ as PROCINST20_103_0_, subtasks0_.SWIMLANE_ as SWIMLANE21_103_0_, subtasks0_.TASKDEFNAME_ as TASKDEF22_103_0_ from JBPM4_TASK subtasks0_ where subtasks0_.SUPERTASK_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select stringvari_.DBID_, stringvari_.DBVERSION_ as DBVERSION3_95_, stringvari_.KEY_ as KEY4_95_, stringvari_.CONVERTER_ as CONVERTER5_95_, stringvari_.HIST_ as HIST6_95_, stringvari_.EXECUTION_ as EXECUTION7_95_, stringvari_.TASK_ as TASK8_95_, stringvari_.STRING_VALUE_ as STRING14_95_ from JBPM4_VARIABLE stringvari_ where stringvari_.DBID_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select stringvari_.DBID_, stringvari_.DBVERSION_ as DBVERSION3_95_, stringvari_.KEY_ as KEY4_95_, stringvari_.CONVERTER_ as CONVERTER5_95_, stringvari_.HIST_ as HIST6_95_, stringvari_.EXECUTION_ as EXECUTION7_95_, stringvari_.TASK_ as TASK8_95_, stringvari_.STRING_VALUE_ as STRING14_95_ from JBPM4_VARIABLE stringvari_ where stringvari_.DBID_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_VARIABLE (DBVERSION_, KEY_, CONVERTER_, HIST_, EXECUTION_, TASK_, STRING_VALUE_, CLASS_, DBID_) values (?, ?, ?, ?, ?, ?, ?, 'string', ?)
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_VARIABLE (DBVERSION_, KEY_, CONVERTER_, HIST_, EXECUTION_, TASK_, STRING_VALUE_, CLASS_, DBID_) values (?, ?, ?, ?, ?, ?, ?, 'string', ?)
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_EXECUTION set DBVERSION_=?, ACTIVITYNAME_=?, PROCDEFID_=?, HASVARS_=?, NAME_=?, KEY_=?, ID_=?, STATE_=?, SUSPHISTSTATE_=?, PRIORITY_=?, HISACTINST_=?, PARENT_=?, INSTANCE_=?, SUPEREXEC_=?, SUBPROCINST_=? where DBID_=? and DBVERSION_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_HIST_ACTINST set DBVERSION_=?, HPROCI_=?, TYPE_=?, EXECUTION_=?, ACTIVITY_NAME_=?, START_=?, END_=?, DURATION_=?, TRANSITION_=?, NEXTIDX_=?, HTASK_=? where DBID_=? and DBVERSION_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_HIST_TASK set DBVERSION_=?, EXECUTION_=?, OUTCOME_=?, ASSIGNEE_=?, PRIORITY_=?, STATE_=?, CREATE_=?, END_=?, DURATION_=?, NEXTIDX_=? where DBID_=? and DBVERSION_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_VARIABLE set EXECUTION_=?, KEY_=? where DBID_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_VARIABLE set EXECUTION_=?, KEY_=? where DBID_=?
2010-9-21 17:46:44 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: delete from JBPM4_TASK where DBID_=? and DBVERSION_=?
[/color]---[color=blue]这里是删除用户申请这个任务,按理下面应该还会发出:executing activity(managerAudit) 的语句 并生成经理审批的task insert 语句。。这里并没有[/color]

流程放在一个business方法里面执行的代码:
		List<ProcessDefinition> pdList = repositoryService.createProcessDefinitionQuery().list();
		this.startDefine(pdList.get(0).getDeploymentId(), "admin");
		List<Task> tasks = taskService.findPersonalTasks("admin");
		Map map = new HashMap();
		map.put("day", 3);
		map.put("reason", "test");
		System.out.println(tasks.size());
		taskService.completeTask(tasks.get(0).getId(), map);

后台打印代码:
2010-9-21 17:49:12 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select rightsobje0_.rightsObjectId as rightsOb1_20_, rightsobje0_.createTime as createTime20_, rightsobje0_.creatorId as creatorId20_, rightsobje0_.modifierId as modifierId20_, rightsobje0_.modifyTime as modifyTime20_, rightsobje0_.name as name20_, rightsobje0_.rightsId as rightsId20_, rightsobje0_.url as url20_ from t_rightsobject rightsobje0_ where rightsobje0_.url=?
2010-9-21 17:49:12 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select deployment1_.OBJNAME_ as col_0_0_, deployment1_.DEPLOYMENT_ as col_1_0_ from JBPM4_DEPLOYMENT deployment0_, JBPM4_DEPLOYPROP deployment1_, JBPM4_DEPLOYPROP deployment2_, JBPM4_DEPLOYPROP deployment3_ where deployment1_.KEY_='pdid' and deployment1_.DEPLOYMENT_=deployment0_.DBID_ and deployment2_.KEY_='pdkey' and deployment2_.OBJNAME_=deployment1_.OBJNAME_ and deployment2_.DEPLOYMENT_=deployment0_.DBID_ and deployment3_.KEY_='pdversion' and deployment3_.OBJNAME_=deployment1_.OBJNAME_ and deployment3_.DEPLOYMENT_=deployment0_.DBID_
2010-9-21 17:49:12 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select deployment1_.OBJNAME_ as col_0_0_, deployment1_.DEPLOYMENT_ as col_1_0_ from JBPM4_DEPLOYMENT deployment0_, JBPM4_DEPLOYPROP deployment1_, JBPM4_DEPLOYPROP deployment2_, JBPM4_DEPLOYPROP deployment3_ where deployment1_.KEY_='pdid' and deployment1_.DEPLOYMENT_=deployment0_.DBID_ and deployment2_.KEY_='pdkey' and deployment2_.OBJNAME_=deployment1_.OBJNAME_ and deployment2_.DEPLOYMENT_=deployment0_.DBID_ and deployment3_.KEY_='pdversion' and deployment3_.OBJNAME_=deployment1_.OBJNAME_ and deployment3_.DEPLOYMENT_=deployment0_.DBID_ and deployment2_.STRINGVAL_='leave' order by deployment3_.LONGVAL_ desc limit ?
2010-9-21 17:49:12 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select deployment0_.DBID_ as DBID1_92_, deployment0_.DEPLOYMENT_ as DEPLOYMENT2_92_, deployment0_.OBJNAME_ as OBJNAME3_92_, deployment0_.KEY_ as KEY4_92_, deployment0_.STRINGVAL_ as STRINGVAL5_92_, deployment0_.LONGVAL_ as LONGVAL6_92_ from JBPM4_DEPLOYPROP deployment0_ where deployment0_.KEY_='pdid' and deployment0_.STRINGVAL_='leave-1' limit ?
2010-9-21 17:49:12 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select deployment0_.DBID_ as DBID1_91_0_, deployment0_.NAME_ as NAME2_91_0_, deployment0_.TIMESTAMP_ as TIMESTAMP3_91_0_, deployment0_.STATE_ as STATE4_91_0_ from JBPM4_DEPLOYMENT deployment0_ where deployment0_.DBID_=?
2010-9-21 17:49:12 org.jbpm.internal.log.Jdk14Log debug
良好: creating new execution for process 'leave'
2010-9-21 17:49:12 org.jbpm.internal.log.Jdk14Log debug
良好: generated execution id leave.150007
2010-9-21 17:49:12 org.jbpm.internal.log.Jdk14Log debug
良好: create variable 'owner' in 'execution[leave.150007]' with value 'admin'
2010-9-21 17:49:12 org.jbpm.internal.log.Jdk14Log debug
良好: executing activity(start1)
2010-9-21 17:49:12 org.jbpm.internal.log.Jdk14Log debug
良好: executing activity(申请)
2010-9-21 17:49:13 org.jbpm.internal.log.Jdk14Log debug
良好: no cdi bean manager available in jndi
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select historytas_.DBID_, historytas_.DBVERSION_ as DBVERSION2_100_, historytas_.EXECUTION_ as EXECUTION3_100_, historytas_.OUTCOME_ as OUTCOME4_100_, historytas_.ASSIGNEE_ as ASSIGNEE5_100_, historytas_.PRIORITY_ as PRIORITY6_100_, historytas_.STATE_ as STATE7_100_, historytas_.CREATE_ as CREATE8_100_, historytas_.END_ as END9_100_, historytas_.DURATION_ as DURATION10_100_, historytas_.NEXTIDX_ as NEXTIDX11_100_ from JBPM4_HIST_TASK historytas_ where historytas_.DBID_=?
taskService:+org.jbpm.pvm.internal.svc.TaskServiceImpl@c7458f
2010-9-21 17:49:13 org.jbpm.internal.log.Jdk14Log debug
良好: select task from org.jbpm.pvm.internal.task.TaskImpl as task where task.assignee = :assignee order by task.priority desc 
2010-9-21 17:49:13 org.jbpm.internal.log.Jdk14Log debug
良好: setting parameter assignee: admin
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select stringvari_.DBID_, stringvari_.DBVERSION_ as DBVERSION3_95_, stringvari_.KEY_ as KEY4_95_, stringvari_.CONVERTER_ as CONVERTER5_95_, stringvari_.HIST_ as HIST6_95_, stringvari_.EXECUTION_ as EXECUTION7_95_, stringvari_.TASK_ as TASK8_95_, stringvari_.STRING_VALUE_ as STRING14_95_ from JBPM4_VARIABLE stringvari_ where stringvari_.DBID_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_EXECUTION (DBVERSION_, ACTIVITYNAME_, PROCDEFID_, HASVARS_, NAME_, KEY_, ID_, STATE_, SUSPHISTSTATE_, PRIORITY_, HISACTINST_, PARENT_, INSTANCE_, SUPEREXEC_, SUBPROCINST_, CLASS_, DBID_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'pvm', ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_HIST_PROCINST (DBVERSION_, ID_, PROCDEFID_, KEY_, START_, END_, DURATION_, STATE_, ENDACTIVITY_, NEXTIDX_, DBID_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_TASK (DBVERSION_, NAME_, DESCR_, STATE_, SUSPHISTSTATE_, ASSIGNEE_, FORM_, PRIORITY_, CREATE_, DUEDATE_, PROGRESS_, SIGNALLING_, EXECUTION_ID_, ACTIVITY_NAME_, HASVARS_, SUPERTASK_, EXECUTION_, PROCINST_, SWIMLANE_, TASKDEFNAME_, CLASS_, DBID_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'T', ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_HIST_TASK (DBVERSION_, EXECUTION_, OUTCOME_, ASSIGNEE_, PRIORITY_, STATE_, CREATE_, END_, DURATION_, NEXTIDX_, DBID_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_HIST_ACTINST (DBVERSION_, HPROCI_, TYPE_, EXECUTION_, ACTIVITY_NAME_, START_, END_, DURATION_, TRANSITION_, NEXTIDX_, HTASK_, CLASS_, DBID_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'task', ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_VARIABLE (DBVERSION_, KEY_, CONVERTER_, HIST_, EXECUTION_, TASK_, STRING_VALUE_, CLASS_, DBID_) values (?, ?, ?, ?, ?, ?, ?, 'string', ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_EXECUTION set DBVERSION_=?, ACTIVITYNAME_=?, PROCDEFID_=?, HASVARS_=?, NAME_=?, KEY_=?, ID_=?, STATE_=?, SUSPHISTSTATE_=?, PRIORITY_=?, HISACTINST_=?, PARENT_=?, INSTANCE_=?, SUPEREXEC_=?, SUBPROCINST_=? where DBID_=? and DBVERSION_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_TASK set DBVERSION_=?, NAME_=?, DESCR_=?, STATE_=?, SUSPHISTSTATE_=?, ASSIGNEE_=?, FORM_=?, PRIORITY_=?, CREATE_=?, DUEDATE_=?, PROGRESS_=?, SIGNALLING_=?, EXECUTION_ID_=?, ACTIVITY_NAME_=?, HASVARS_=?, SUPERTASK_=?, EXECUTION_=?, PROCINST_=?, SWIMLANE_=?, TASKDEFNAME_=? where DBID_=? and DBVERSION_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_VARIABLE set EXECUTION_=?, KEY_=? where DBID_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select taskimpl0_.DBID_ as DBID1_103_, taskimpl0_.DBVERSION_ as DBVERSION3_103_, taskimpl0_.NAME_ as NAME4_103_, taskimpl0_.DESCR_ as DESCR5_103_, taskimpl0_.STATE_ as STATE6_103_, taskimpl0_.SUSPHISTSTATE_ as SUSPHIST7_103_, taskimpl0_.ASSIGNEE_ as ASSIGNEE8_103_, taskimpl0_.FORM_ as FORM9_103_, taskimpl0_.PRIORITY_ as PRIORITY10_103_, taskimpl0_.CREATE_ as CREATE11_103_, taskimpl0_.DUEDATE_ as DUEDATE12_103_, taskimpl0_.PROGRESS_ as PROGRESS13_103_, taskimpl0_.SIGNALLING_ as SIGNALLING14_103_, taskimpl0_.EXECUTION_ID_ as EXECUTION15_103_, taskimpl0_.ACTIVITY_NAME_ as ACTIVITY16_103_, taskimpl0_.HASVARS_ as HASVARS17_103_, taskimpl0_.SUPERTASK_ as SUPERTASK18_103_, taskimpl0_.EXECUTION_ as EXECUTION19_103_, taskimpl0_.PROCINST_ as PROCINST20_103_, taskimpl0_.SWIMLANE_ as SWIMLANE21_103_, taskimpl0_.TASKDEFNAME_ as TASKDEF22_103_ from JBPM4_TASK taskimpl0_ where taskimpl0_.ASSIGNEE_=? order by taskimpl0_.PRIORITY_ desc
1
2010-9-21 17:49:13 org.jbpm.internal.log.Jdk14Log debug
良好: create variable 'reason' in 'execution[leave.150007]' with value 'test'
2010-9-21 17:49:13 org.jbpm.internal.log.Jdk14Log debug
良好: create variable 'day' in 'execution[leave.150007]' with value '3'
2010-9-21 17:49:13 org.jbpm.internal.log.Jdk14Log debug
良好: signalling activity(申请), signalName=null
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select stringvari_.DBID_, stringvari_.DBVERSION_ as DBVERSION3_95_, stringvari_.KEY_ as KEY4_95_, stringvari_.CONVERTER_ as CONVERTER5_95_, stringvari_.HIST_ as HIST6_95_, stringvari_.EXECUTION_ as EXECUTION7_95_, stringvari_.TASK_ as TASK8_95_, stringvari_.STRING_VALUE_ as STRING14_95_ from JBPM4_VARIABLE stringvari_ where stringvari_.DBID_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select longvariab_.DBID_, longvariab_.DBVERSION_ as DBVERSION3_95_, longvariab_.KEY_ as KEY4_95_, longvariab_.CONVERTER_ as CONVERTER5_95_, longvariab_.HIST_ as HIST6_95_, longvariab_.EXECUTION_ as EXECUTION7_95_, longvariab_.TASK_ as TASK8_95_, longvariab_.LONG_VALUE_ as LONG13_95_ from JBPM4_VARIABLE longvariab_ where longvariab_.DBID_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_VARIABLE (DBVERSION_, KEY_, CONVERTER_, HIST_, EXECUTION_, TASK_, STRING_VALUE_, CLASS_, DBID_) values (?, ?, ?, ?, ?, ?, ?, 'string', ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_VARIABLE (DBVERSION_, KEY_, CONVERTER_, HIST_, EXECUTION_, TASK_, LONG_VALUE_, CLASS_, DBID_) values (?, ?, ?, ?, ?, ?, ?, 'long', ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_EXECUTION set DBVERSION_=?, ACTIVITYNAME_=?, PROCDEFID_=?, HASVARS_=?, NAME_=?, KEY_=?, ID_=?, STATE_=?, SUSPHISTSTATE_=?, PRIORITY_=?, HISACTINST_=?, PARENT_=?, INSTANCE_=?, SUPEREXEC_=?, SUBPROCINST_=? where DBID_=? and DBVERSION_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_HIST_ACTINST set DBVERSION_=?, HPROCI_=?, TYPE_=?, EXECUTION_=?, ACTIVITY_NAME_=?, START_=?, END_=?, DURATION_=?, TRANSITION_=?, NEXTIDX_=?, HTASK_=? where DBID_=? and DBVERSION_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_HIST_TASK set DBVERSION_=?, EXECUTION_=?, OUTCOME_=?, ASSIGNEE_=?, PRIORITY_=?, STATE_=?, CREATE_=?, END_=?, DURATION_=?, NEXTIDX_=? where DBID_=? and DBVERSION_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_VARIABLE set EXECUTION_=?, KEY_=? where DBID_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_VARIABLE set EXECUTION_=?, KEY_=? where DBID_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: delete from JBPM4_TASK where DBID_=? and DBVERSION_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select this_.DBID_ as DBID1_103_0_, this_.DBVERSION_ as DBVERSION3_103_0_, this_.NAME_ as NAME4_103_0_, this_.DESCR_ as DESCR5_103_0_, this_.STATE_ as STATE6_103_0_, this_.SUSPHISTSTATE_ as SUSPHIST7_103_0_, this_.ASSIGNEE_ as ASSIGNEE8_103_0_, this_.FORM_ as FORM9_103_0_, this_.PRIORITY_ as PRIORITY10_103_0_, this_.CREATE_ as CREATE11_103_0_, this_.DUEDATE_ as DUEDATE12_103_0_, this_.PROGRESS_ as PROGRESS13_103_0_, this_.SIGNALLING_ as SIGNALLING14_103_0_, this_.EXECUTION_ID_ as EXECUTION15_103_0_, this_.ACTIVITY_NAME_ as ACTIVITY16_103_0_, this_.HASVARS_ as HASVARS17_103_0_, this_.SUPERTASK_ as SUPERTASK18_103_0_, this_.EXECUTION_ as EXECUTION19_103_0_, this_.PROCINST_ as PROCINST20_103_0_, this_.SWIMLANE_ as SWIMLANE21_103_0_, this_.TASKDEFNAME_ as TASKDEF22_103_0_ from JBPM4_TASK this_ where this_.EXECUTION_=?
2010-9-21 17:49:13 org.jbpm.internal.log.Jdk14Log debug
良好: executing activity(managerAudit)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: select historytas_.DBID_, historytas_.DBVERSION_ as DBVERSION2_100_, historytas_.EXECUTION_ as EXECUTION3_100_, historytas_.OUTCOME_ as OUTCOME4_100_, historytas_.ASSIGNEE_ as ASSIGNEE5_100_, historytas_.PRIORITY_ as PRIORITY6_100_, historytas_.STATE_ as STATE7_100_, historytas_.CREATE_ as CREATE8_100_, historytas_.END_ as END9_100_, historytas_.DURATION_ as DURATION10_100_, historytas_.NEXTIDX_ as NEXTIDX11_100_ from JBPM4_HIST_TASK historytas_ where historytas_.DBID_=?
assignee=admin
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_TASK (DBVERSION_, NAME_, DESCR_, STATE_, SUSPHISTSTATE_, ASSIGNEE_, FORM_, PRIORITY_, CREATE_, DUEDATE_, PROGRESS_, SIGNALLING_, EXECUTION_ID_, ACTIVITY_NAME_, HASVARS_, SUPERTASK_, EXECUTION_, PROCINST_, SWIMLANE_, TASKDEFNAME_, CLASS_, DBID_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'T', ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_HIST_TASK (DBVERSION_, EXECUTION_, OUTCOME_, ASSIGNEE_, PRIORITY_, STATE_, CREATE_, END_, DURATION_, NEXTIDX_, DBID_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: insert into JBPM4_HIST_ACTINST (DBVERSION_, HPROCI_, TYPE_, EXECUTION_, ACTIVITY_NAME_, START_, END_, DURATION_, TRANSITION_, NEXTIDX_, HTASK_, CLASS_, DBID_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'task', ?)
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_EXECUTION set DBVERSION_=?, ACTIVITYNAME_=?, PROCDEFID_=?, HASVARS_=?, NAME_=?, KEY_=?, ID_=?, STATE_=?, SUSPHISTSTATE_=?, PRIORITY_=?, HISACTINST_=?, PARENT_=?, INSTANCE_=?, SUPEREXEC_=?, SUBPROCINST_=? where DBID_=? and DBVERSION_=?
2010-9-21 17:49:13 org.hibernate.jdbc.util.SQLStatementLogger logStatement
良好: update JBPM4_TASK set DBVERSION_=?, NAME_=?, DESCR_=?, STATE_=?, SUSPHISTSTATE_=?, ASSIGNEE_=?, FORM_=?, PRIORITY_=?, CREATE_=?, DUEDATE_=?, PROGRESS_=?, SIGNALLING_=?, EXECUTION_ID_=?, ACTIVITY_NAME_=?, HASVARS_=?, SUPERTASK_=?, EXECUTION_=?, PROCINST_=?, SWIMLANE_=?, TASKDEFNAME_=? where DBID_=? and DBVERSION_=?

2010年9月20日 19:06
目前还没有答案

相关推荐

Global site tag (gtag.js) - Google Analytics