[jboss-user] [JBoss jBPM] - Accessing the underlaying hibernate session / transaction

harrylette do-not-reply at jboss.com
Thu Aug 31 06:47:06 EDT 2006


Hi all!

I am evaluating JBPM for as the workflow engine for my company. I am quite enthusiastic about this nice piece of software. Since a week I surfed this forum and it helped me a lot. Know I am at a point to begin coding my enine, but there is one crucial question:

Am I allowed to use code like this in a Node's ActionHandler:


  | public void execute(ExecutionContext executionContext) throws Exception {
  | 		
  | 		this.jbpmContext = executionContext.getJbpmContext();
  | 		jbpmContext.getSession().beginTransaction();
  | 		try {
  | 			doSth();
  | 		} catch (MdcInstanceExistsExcepiton e) {
  | 			handleSth{}
  | 		}		
  | 		
  | 		jbpmContext.save(executionContext.getProcessInstance());
  | 		jbpmContext.getSession().getTransaction().commit();
  | 		
  | 		executionContext.getNode().leave(executionContext);
  | 		
  | 	}
  | 

My Comments:

1 I KNOW that you do not advise to save sth. in an actionhandler, but we have here some
situations where I have to guarantee that data is really written to the database.

3 I have seen that similar methods in JbpmSession are deprecated. Why?

2 This code works fine within my tests.

My question:

Does this approach actually break anything of the inner workflow of the surrounding jbpmContext?

By the way: Is there a tool out there, that shows me the actual state of all processes? Sth. like
a "JBPM shell" or "JBPM Webmin"? I only know about the StartersKit webapp...

Best Regards & any help is greatfully appreciated!!

Harry


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

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



More information about the jboss-user mailing list