[jboss-dev-forums] [Design of JBoss jBPM] - Re: programmatic passing of environment objects

tom.baeyens@jboss.com do-not-reply at jboss.com
Tue Mar 17 05:56:09 EDT 2009


maybe this is better:

TaskService taskService = processEngine.getTaskService();
  | 
  | 
  | try {
  |   Authentication authentication = new UserProvidedAuthentication("johndoe");
  |   taskService.setEnvironmentObject(authentication);
  | 
  |   taskService.take(taskdbid);	
  | 
  | } finally {
  |   taskService.removeEnvironmentObjects();
  | }
  | 

or by name

TaskService taskService = processEngine.getTaskService();
  | 
  | Authentication authentication = new UserProvidedAuthentication("johndoe");
  | taskService.setEnvironmentObject("authentication", authentication);
  | 
  | taskService.take(taskdbid);	
  | 


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4218520#4218520

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4218520



More information about the jboss-dev-forums mailing list