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

📄 flowdiagramtest.java

📁 OBPM是一个开源
💻 JAVA
字号:
package cn.myapps.core.workflow.element;

import java.io.File;

import junit.framework.TestCase;
import cn.myapps.base.dao.PersistenceUtils;
import cn.myapps.base.dao.SessionSignal;
import cn.myapps.core.workflow.engine.StateMachine;
import cn.myapps.core.workflow.engine.WFRunner;
import cn.myapps.core.workflow.storage.definition.ejb.BillDefiProcess;
import cn.myapps.core.workflow.storage.definition.ejb.BillDefiVO;
import cn.myapps.core.workflow.utility.FlowType;
import cn.myapps.util.ProcessFactory;
import cn.myapps.util.property.DefaultProperty;

public class FlowDiagramTest extends TestCase {
	BillDefiProcess bp;

	protected void setUp() throws Exception {
		bp = (BillDefiProcess) ProcessFactory
				.createProcess(BillDefiProcess.class);

		super.setUp();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}

	/*
	 * Test method for
	 * 'cn.myapps.core.workflow.element.FlowDiagram.toJpegImage(File)'
	 */
	public void testToJpegImageFile() throws Exception {
		SessionSignal signal = PersistenceUtils.getSessionSignal(); 
//		signal.sessionSignal++;
		
		BillDefiVO flowVO = (BillDefiVO)bp.doView("1164598740139000");
		WFRunner wfr = new WFRunner(flowVO.getFlow());
		System.out.println(flowVO.getFlow());
		/*FlowDiagram fd = wfr.getFlowDiagram();
		fd.setFlowstatus(FlowType.FLOWSTATUS_OPEN_RUN_RUNNING);
		wfr.toJpegImage(new File("f://flow.jpg"));
		String path = DefaultProperty.getProperty("BILLFLOW_DIAGRAMPATH");
		System.out.println(fd.getFlowstatus());
		System.out.println(wfr.getFlowpath());*/
		PersistenceUtils.closeSession();
	}
}

⌨️ 快捷键说明

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