当前位置: 首页>>代码示例>>Java>>正文


Java RuntimeManager.close方法代码示例

本文整理汇总了Java中org.kie.api.runtime.manager.RuntimeManager.close方法的典型用法代码示例。如果您正苦于以下问题:Java RuntimeManager.close方法的具体用法?Java RuntimeManager.close怎么用?Java RuntimeManager.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kie.api.runtime.manager.RuntimeManager的用法示例。


在下文中一共展示了RuntimeManager.close方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testDeleteProcess

import org.kie.api.runtime.manager.RuntimeManager; //导入方法依赖的package包/类
@Test
public void testDeleteProcess() {

	RuntimeManager manager = createRuntimeManager("approval.bpmn");
	RuntimeEngine engine = getRuntimeEngine(null);
	KieSession ksession = engine.getKieSession();
	KieRuntimeLogger log = KieServices.Factory.get().getLoggers().newThreadedFileLogger(ksession, "test", 1000);
	ksession.getWorkItemManager().registerWorkItemHandler("Send Task", new SendTaskHandler());

	TaskService taskService = engine.getTaskService();

	long processInstanceId = startProcess(ksession, taskService);

	callDelete(taskService);

	assertProcessInstanceCompleted(processInstanceId);

	System.out.println("Process instance completed");
	log.close();

	manager.disposeRuntimeEngine(engine);
	manager.close();
}
 
开发者ID:awizen,项目名称:gangehi,代码行数:24,代码来源:ApprovalProcessTest.java

示例2: testEvaluationProcess

import org.kie.api.runtime.manager.RuntimeManager; //导入方法依赖的package包/类
@Test
public void testEvaluationProcess() {

	RuntimeManager manager = createRuntimeManager("approval.bpmn");
	RuntimeEngine engine = getRuntimeEngine(null);
	KieSession ksession = engine.getKieSession();
	KieRuntimeLogger log = KieServices.Factory.get().getLoggers().newThreadedFileLogger(ksession, "test", 1000);
	ksession.getWorkItemManager().registerWorkItemHandler("Send Task", new SendTaskHandler());

	TaskService taskService = engine.getTaskService();

	long processInstanceId = startProcess(ksession, taskService);

	approveTask(taskService, "userA", "userB");
	assertNodeTriggered(processInstanceId, "notify next approver");
	List<TaskSummary> tasks = taskService.getTasksOwned("userB", "en-UK");
	assertEquals(1, tasks.size());

	approveTask(taskService, "userB", "userC");
	assertNodeTriggered(processInstanceId, "notify next approver");
	tasks = taskService.getTasksOwned("userC", "en-UK");
	assertEquals(1, tasks.size());


	approveTask(taskService, "userC", "userD");
	tasks = taskService.getTasksOwned("userD", "en-UK");
	assertEquals(1, tasks.size());

	approveTask(taskService, "userD", null);

	assertNodeTriggered(processInstanceId, "authorised");

	System.out.println("Process instance completed");
	log.close();

	manager.disposeRuntimeEngine(engine);
	manager.close();
}
 
开发者ID:awizen,项目名称:gangehi,代码行数:39,代码来源:ApprovalProcessTest.java

示例3: testRejectAbortProcess

import org.kie.api.runtime.manager.RuntimeManager; //导入方法依赖的package包/类
@Test
public void testRejectAbortProcess() {

	RuntimeManager manager = createRuntimeManager("approval.bpmn");
	RuntimeEngine engine = getRuntimeEngine(null);
	KieSession ksession = engine.getKieSession();
	KieRuntimeLogger log = KieServices.Factory.get().getLoggers().newThreadedFileLogger(ksession, "test", 1000);
	ksession.getWorkItemManager().registerWorkItemHandler("Send Task", new SendTaskHandler());

	TaskService taskService = engine.getTaskService();

	long processInstanceId = startProcess(ksession, taskService);

	approveTask(taskService, "userA", "userB");
	assertNodeTriggered(processInstanceId, "notify next approver");
	List<TaskSummary> tasks = taskService.getTasksOwned("userB", "en-UK");
	assertEquals(1, tasks.size());

	rejectTask(taskService, "userB", "userC");
	assertNodeTriggered(processInstanceId, "notify originator");
	tasks = taskService.getTasksOwned("userC", "en-UK");
	assertEquals(1, tasks.size());

	TaskSummary taskSummary = tasks.get(0);
	assertEquals("edit approval item", taskSummary.getName());

	abortTask(taskService, "userC");
	assertNodeTriggered(processInstanceId, "aborted");

	System.out.println("Process instance completed");
	log.close();

	manager.disposeRuntimeEngine(engine);
	manager.close();
}
 
开发者ID:awizen,项目名称:gangehi,代码行数:36,代码来源:ApprovalProcessTest.java

示例4: main

import org.kie.api.runtime.manager.RuntimeManager; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
       RuntimeManager manager = Util.getRuntimeManager();
       RuntimeEngine engine = manager.getRuntimeEngine(EmptyContext.get());
       KieSession kSession = engine.getKieSession();
	for (int i = 0; i < 50000; i++) {
		System.out.println("Starting process number " + i);
		kSession.startProcess("org.fxapps.bpms.helloProcess");
	}
	manager.disposeRuntimeEngine(engine);
	manager.close();
}
 
开发者ID:jesuino,项目名称:bpms6-examples,代码行数:12,代码来源:HelloWorldProcessRunner.java

示例5: main

import org.kie.api.runtime.manager.RuntimeManager; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
       RuntimeManager manager = Util.getRuntimeManager();
       RuntimeEngine engine = manager.getRuntimeEngine(EmptyContext.get());
       KieSession kSession = engine.getKieSession();
       TaskService taskService = engine.getTaskService();
	Long piid = kSession.startProcess("org.fxapps.bpms.HT").getId();
	Long tid = taskService.getTasksByProcessInstanceId(piid).iterator().next();
	taskService.start(tid, "bpmsAdmin");
	taskService.complete(tid, "bpmsAdmin", null);
	manager.disposeRuntimeEngine(engine);
	manager.close();
}
 
开发者ID:jesuino,项目名称:bpms6-examples,代码行数:13,代码来源:HTProcessRunner.java

示例6: main

import org.kie.api.runtime.manager.RuntimeManager; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
       RuntimeManager manager = Util.getRuntimeManager();
       RuntimeEngine engine = manager.getRuntimeEngine(EmptyContext.get());
       KieSession kSession = engine.getKieSession();
	for (int i = 0; i < 100; i++) {
		System.out.println("Starting process number " + i);
		kSession.startProcess("org.fxapps.bpms.helloProcess");
	}
	manager.disposeRuntimeEngine(engine);
	manager.close();
}
 
开发者ID:jesuino,项目名称:bpms6-examples,代码行数:12,代码来源:HelloWorldProcessRunner.java


注:本文中的org.kie.api.runtime.manager.RuntimeManager.close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。