本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}