JBoss Community

Re: Migrate app to jBPM - multiple starts

created by jinlin ning in jBPM Development - View the full discussion

This my way to start up in the middle:

 

step 1:

save the Variable in the map when I star the processInstance :

 

map.put("startInMiddle", true);

this.executionService.startProcessInstanceByKey("chooseSite",map);

 

step 2:

 

add the assign-handdler or event-listener to all the activity you don't want to handle

 

like this:

@Override
    public void assign(Assignable assignable,
            OpenExecution execution) throws Exception {

         ExecutionImpl e = (ExecutionImpl) execution;

         e.getVariable("starInMiddle").toString().equals(true){

               e.execution).end();
          }      
    }

Reply to this message by going to Community

Start a new discussion in jBPM Development at Community