schedulerandasyncdbtest.java
来自「jBpm是一个灵活可扩展的工作流管理系统。作为jBpm运行时server输入的业」· Java 代码 · 共 45 行
JAVA
45 行
package org.jbpm.scheduler.exe;
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.scheduler.impl.SchedulerThread;
public class SchedulerAndAsyncDbTest extends AbstractDbTestCase {
public void testTimerInCombinationWithAsyncNode() throws Exception {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state name='start'>" +
" <transition to='timed'/>" +
" </start-state>" +
" <state name='timed'>" +
" <timer name='reminder' " +
" duedate='0 seconds' " +
// " repeat='10 business minutes'" +
" transition='timer fires' />" +
" <transition name='timer fires' to='async'/>" +
" <transition name='normal continuation' to='end'/>" +
" </state>" +
" <node name='async' async='true'>" +
" <transition to='timed'/>" +
" </node>" +
" <end-state name='end' />" +
"</process-definition>"
);
processDefinition = saveAndReload(processDefinition);
// create the process instance
ProcessInstance processInstance = new ProcessInstance(processDefinition);
processInstance.signal();
jbpmContext.save(processInstance);
commitAndCloseSession();
SchedulerThread schedulerThread = new SchedulerThread(jbpmConfiguration);
schedulerThread.executeTimers();
beginSessionTransaction();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?