so i do this code program on th esecond form :

anonymous wrote : 
  | 
jbpmContext=this.getJbpmContext(request).getJbpmConfiguration().getCurrentJbpmContext();
  |                             graphSession=jbpmContext.getGraphSession();
  |                             /*System.out.println("\n 
StartProcessInstance.jbpmContext:    "+jbpmContext+"\n");
  |                             System.out.println("\n Actor:    
"+jbpmContext.getActorId()+"\n");
  |                             
  |                             ProcessDefinition 
processDefinition=graphSession.getProcessDefinition(1);*/
  |                             
  |                             /*ProcessInstance 
instance=jbpmContext.getProcessInstance(1);
  |                             System.out.println("..............id:  
"+instance.getId());
  |                             System.out.println("..............Version:  
"+instance.getVersion()+"\n");*/
  |                             
  |                             TaskMgmtSession taskMgmtSession = 
jbpmContext.getTaskMgmtSession();
  |                             
  |                         TaskInstance taskInstance = 
taskMgmtSession.loadTaskInstance(1);
  |                         taskInstance.setActorId(jbpmContext.getActorId());
  |                         taskInstance.start();
  |                         
  |                         System.out.println("......"+taskInstance.getName());
  |                         
  |                         Token token = taskInstance.getToken();
  |                         Transition transition=null;
  |                         String transitionName=null;
  |                         
  |                             if 
(token.getNode().getLeavingTransitions().isEmpty() == false) {
  |                                     Iterator availableTransitionsIterator = 
token.getNode().getLeavingTransitions().iterator();
  |                                     while 
(availableTransitionsIterator.hasNext()) {
  |                                             transition = (Transition) 
availableTransitionsIterator.next();
  |                                     }
  |                                             
transitionName=transition.getName();
  |                             }
  |                                                 
  |                         //token.signal(transitionName);     
  |                         ProcessInstance processInstance = 
token.getProcessInstance();
  |                         
  |                         Map<String, String> taskVariables = new 
HashMap<String, String>();
  |                         taskVariables.put("nom", "maldini");
  |                         taskVariables.put("prenom", "paolo");
  |                         taskVariables.put("decision", "no");  
  |                         taskInstance.addVariables(taskVariables);
  | 
  |                         taskInstance.end();
  |                         
  |                         jbpmContext.save(processInstance);
  | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061150
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to