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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to