JBoss Community

Re: restart running process

created by gianluc ricciardi in jBPM - View the full discussion

Thanks  Michael  4 your response. I Mean "resume" , then I'll do so. I found the way how to   execute query across jbpm tablels.

Something like this:

 

 

String pid=processEngine.execute(
      new Command<String>() {
         private String id;
        public String execute(Environment environment) throws Exception {
          DbSessionImpl dbSessionImpl = environment.get(DbSessionImpl.class);
          Session session = dbSessionImpl.getSession();
         
         
          List<Variable> list =
          session.createQuery(
                  "from " + org.jbpm.pvm.internal.type.Variable.class.getName()).list();
          Variable var = list.get(0);
          String id_ = var.getExecution().toString();
        
          return id_.substring(id_.indexOf("[")+1,id_.indexOf("]"));
        }
      }
   );

String pid=processEngine.execute(

                 new Command<Void>() {

                    private String id;

                   public String execute(Environment environment) throws Exception {

                     DbSessionImpl dbSessionImpl = environment.get(DbSessionImpl.class);

                     Session session = dbSessionImpl.getSession();

                    

                    

                     List<Variable> list =

                     session.createQuery(

                             "from " + org.jbpm.pvm.internal.type.Variable.class.getName()).list();

          

          

                  ...

                   }

                 }

              );

Reply to this message by going to Community

Start a new discussion in jBPM at Community