⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 facadeprocess.java

📁 java实现的可配置的工作流引擎,采用jsp+javabean实现
💻 JAVA
字号:
/*
 * Created on 2004-10-17
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.hongsoft.agile.workflow;
import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.Session;

import com.hongsoft.agile.AgileException;
import com.hongsoft.agile.hpdl.DriveTypeObject;
import com.hongsoft.agile.hpdl.HpdlFacade;
/**
 * @author hongsoft.com
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class FacadeProcess {
	/**
	 * 启动流程:开始流程的一系列第一活动(第一活动有多个)
	 * @param processDefId
	 * @return
	 */
	public static String startProcess(Session session,String processDefId) throws HibernateException,AgileException
	{
		//得到新的流程实例号
		String processInsId=processDefId+"_"+Integer.toString(HibernateProcess.getMaxProcessInsId(session,processDefId)+1);
		//启动start的后面的活动
		List conditionList=HpdlFacade.getNextActivityDefList(processDefId,"start");
		if(conditionList==null)
			throw new AgileException(processDefId+"流程的start活动没有后续活动!");
		for(int i=0;i<conditionList.size();i++)
		{
			//start后面的一个活动的定义id
			DriveTypeObject co=(DriveTypeObject)conditionList.get(i);
			(new HibernateActivity()).startActivity(session,processInsId,co);
		}		
		return processInsId;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -