[jboss-user] [JBoss jBPM] - Re: Timers and JBPM 3.2.1
luukey
do-not-reply at jboss.com
Sat Jul 21 09:09:59 EDT 2007
Ok. This code works for me:public class Test2
| {
| public static void main(String[] args)
| {
| try
| {
| JbpmConfiguration conf = JbpmConfiguration.getInstance("src/main/config/jbpm.cfg.xml");
| JbpmContext ctx = conf.createJbpmContext();
| ProcessDefinition pDef = ProcessDefinition.parseXmlInputStream(new FileInputStream("src/main/jpdl/test1/processdefinition.xml"));
|
| ctx.deployProcessDefinition(pDef);
| conf.startJobExecutor();
|
| ProcessInstance pInst = ctx.newProcessInstance("test1");
| long pId = pInst.getId();
| ctx.close();
|
| ctx = conf.createJbpmContext();
| pInst = ctx.loadProcessInstance(pId);
| pInst.signal();
| ctx.close();
|
| System.in.read();
|
| ctx = conf.createJbpmContext();
| pInst = ctx.loadProcessInstance(pId);
| pInst.signal();
| ctx.close();
|
| System.in.read();
|
| conf.getJobExecutor().stop();
|
| }
| catch (Exception ex)
| {
| ex.printStackTrace();
| }
| }
| }
No direct transaction playing, just stopping and starting context. Is this the right way ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066401#4066401
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066401
More information about the jboss-user
mailing list