- 
        1. Re: Problem execute actions on jbossasmo Oct 10, 2006 7:16 AM (in response to asmo)One appendix: 
 I forgot to mention, that there is no error or anything produced from jboss.
- 
        2. Re: Problem execute actions on jbossbelgianbaloo Oct 10, 2006 8:37 AM (in response to asmo)are you sure System.out.println(...); prints something using jBoss server? 
- 
        3. Re: Problem execute actions on jbossasmo Oct 10, 2006 9:18 AM (in response to asmo)I have also tried an log4j info output. but there is also nothing to see on jboss ( the log4j is ok, i can see other info outputs...) 
- 
        4. Re: Problem execute actions on jbossasmo Oct 11, 2006 4:41 AM (in response to asmo)Makes it a differenz, wether the workflow runs i a web application or in a backend? 
 If i put my workflow in the war archiv of my web application, i can execute it without any problem. If i try it in the backend ( jar archiv ), the workflow runs without execute the actions.
 Is there any reason, why jbpm should run in the backend?
- 
        5. Re: Problem execute actions on jbossasmo Oct 11, 2006 8:38 AM (in response to asmo)In the meantime, i could isolate the problem a little bit. 
 If i create a processinstance direct on the parsed processdefinition, jbpm executes the action.
 step 1:try{ JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("jbpm.cfg.xml"); JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext(); GraphSession graphSession = jbpmContext.getGraphSession(); ProcessDefinition processDefinition =ProcessDefinition.parseXmlResource("activityWorkflow.par/processdefinition.xml"); ProcessInstance processInstance = processDefinition.createProcessInstance(); processInstance.signal("startWorkflow"); processInstance.signal("created"); jbpmContext.save(processInstance); }catch(Exception e){ e.printStackTrace(); }finally{ jbpmContext.close(); } }
 If i first save the processInstance and later load it back from the database, the action won't execute.JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("jbpm.cfg.xml"); JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext(); try{ GraphSession graphSession = jbpmContext.getGraphSession(); ProcessDefinition processDefinition =ProcessDefinition.parseXmlResource("activityWorkflow.par/processdefinition.xml"); ProcessInstance processInstance = processDefinition. Long id = Long.valueOf(processInstance.getId()); jbpmContext.deployProcessDefinition(processDefinition); jbpmContext.save(processInstance); }catch(Exception e){ e.printStackTrace; }finally{ jbpmContext.close(); } return id;
 step 2:JbpmConfiguration jbmpConfiguration = JbpmConfiguration.getInstance("jbpm.cfg.xml"); JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext(); try{ GraphSession graphSession = jbpmContext.getGraphSession(); ProcessInstance processInstance = graphSession.loadProcessInstance(processId.longValue()); processInstance.signal(); jbpmContext.save(processInstance); }catch(Exception e){ e.printStackTrace; }finally{ jbpmContext.close(); }
 Is there something wrong in the way i save and load the processInstance?
- 
        6. Re: Problem execute actions on jbossasmo Oct 16, 2006 12:09 PM (in response to asmo)Hello! 
 During the debuging i can see, that of the values of the processInstance, which i loaded from the graphSession are null.
 For example the processDefinition of the processInstance is null.
 In the database, the ProcessDefinition for the ProcessInstance is correctly set.
 So i guess, it is maybe a problem with hibernate.
 Has someone an idee, what i can do?
 It seems, that i am the only one, who has this problem so i guess, it is a really stupid error, i have produced....
- 
        7. Re: Problem execute actions on jbossgrimshieldsson Oct 16, 2006 12:49 PM (in response to asmo)If I undestand you correctly... It works fine in the junit, but not in the war when you load the process from the DB... I would start looking at class loader issues. All of my actions and other JBPM code is in WEB-INF/class. If your putting it somewhere else, you might have issues.. Assuming it is a class loader problem. 
- 
        8. Re: Problem execute actions on jbosskukeltje Oct 16, 2006 1:26 PM (in response to asmo)GrimShieldsson is correct and the pi being null is normal behaviour since the id is generated by hibernate and that is not used in the non-db tests 
- 
        9. Re: Problem execute actions on jbossasmo Oct 17, 2006 3:43 AM (in response to asmo)Thanks for your replies! 
 GrimShieldsson, my problem is a little bit different.
 everything works fine, as all my actions and jbpm code was in the web-inf/class of my war. But than someone told my, that i shouldn't run jbpm in the frontend.
 So i put all the code in the backend and created a stateless session bean. these methods sould called form the jsf-managed beans for starting the process....
 So far so good, i can start the process and the process instance runs through the single steps, but without execute the actions.
 The junit test runs without failure so i guess, the problem is concerned with the jboss.
 is it generally better to run jbpm in the war?
 or is it maybee generally wrong to put the code in the backend?
- 
        10. Re: Problem execute actions on jbossasmo Oct 17, 2006 11:48 AM (in response to asmo)After a little more reading in the forum, i came to the conclusion, that having the jbpm code in the WEB-INF/class dir is the best way. 
 Am i right?
 Is this just best practise or are there fundamental reasons?
 Maybee i should make a new thread, that issue has a little realation to this one....
 
     
     
    