[jboss-user] [JBoss jBPM] - get the token in another task-node on a struts application

galvino do-not-reply at jboss.com
Thu Jul 5 10:04:41 EDT 2007


Hi everybody .
I have a  problem to go to next task-node with jbpm in a web application by using struts.

i did a small process like this:
anonymous wrote : start
  | task1
  | task2
  | end

On my first bean in strut, i deploy process and i go to the first task.
But when i write this in order to go to the next task:

anonymous wrote : 
  | TaskMgmtSession taskMgmtSession = jbpmContext.getTaskMgmtSession();
  | 				
  | 			    TaskInstance taskInstance = taskMgmtSession.loadTaskInstance(1);
  | 			    taskInstance.setActorId(jbpmContext.getActorId());
  | 			    taskInstance.start();
  | 			    
  | 			    Token token = graphSession.loadToken(1);
  | 			    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();
  | 			    
  | 			    jbpmContext.save(processInstance);
  | 

there are an error :
anonymous wrote : 
  | Integrity constraint violation - no parent FK_TASKINST_TASK table: JBPM_TASK in statement [insert into JBPM_TASKINSTANCE (NAME_, DESCRIPTION_, ACTORID_, CREATE_, START_, END_, DUEDATE_, PRIORITY_, ISCANCELLED_, ISSUSPENDED_, ISOPEN_, ISSIGNALLING_, ISBLOCKING_, TASK_, TOKEN_, SWIMLANINSTANCE_, TASKMGMTINSTANCE_, CLASS_, ID_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'T', null)]
  | 

what's this error means ?
i think it can't execute *.signal() why ?

Please I need your help !!!

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

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



More information about the jboss-user mailing list