[jboss-user] [JBoss jBPM] - Re: Persistance and setActorId
frinux
do-not-reply at jboss.com
Thu Mar 12 10:23:18 EDT 2009
Hum the file is in the right place, I mean it is taken because it connects to the database.
I added the mapping files of my classes.
But I think the problem is somewhere else. When I'm debugging my action, I see that everything is going wrong since I step into the signal() function :
boolean response = false;
|
| //required fields, otherwise an exception is thrown...
| if(demande == null || demande.getDemandeur().getUsername().equals("")) {
| return false;
| }
|
| // Lookup the pojo persistence context-builder that is configured above
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| try {
|
|
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("demande/processdefinition.xml");
|
|
| //process definition deployment
| //jbpmContext.getGraphSession().deployProcessDefinition(processDefinition);
|
|
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
|
| //creates the instance variables
| processInstance.getContextInstance().setVariable("demande", demande);
| processInstance.getContextInstance().setVariable("dateEmissionDemande", new Date());
|
| // let's go !
| processInstance.setStart(new Date());
| processInstance.signal();
|
| //we check if the current active node is the right one : validation
| Token currentToken = processInstance.getRootToken();
|
| if(currentToken.getName().equals("validation"))
| {
| response=true;
| }
| else
| {
| response=false;
| }
|
| jbpmContext.save(processInstance);
|
| } finally {
| jbpmContext.close();
| }
|
| return response;
It doesn't go further than processInstance.signal();
It comes directly to the finally.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217478#4217478
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217478
More information about the jboss-user
mailing list