This content has been marked as final.
Show 2 replies
-
1. Re: inserting into my tables from action code
aguizar Oct 18, 2005 4:32 PM (in response to alal007)DO i Need to create hibernate mapping for my table?
No. We encorauge you to do so, for uniformity (jBPM already uses Hibernate) and maintainability (avoid CUD statements all around).is it possible to get handle to connection from [execution] context ?
Not exactly from the context, but from a thread local encapsulated in class JbpmSession:JbpmSession jbpmSession = JbpmSession.getCurrentJbpmSession(); Connection jdbcConnection = jbpmSession.getConnection(); /* now do stuff with the jdbcConnection */
Note that in order for this to work, a jBPM session must have been opened earlier in the current thread. This is the case when you load a token from the database and then signal it.
As an alternative to using the connection directly, you can use Hibernate's native SQL support.is there an issue with doing that?
None, just remember you have to manage your statements but not the connection. -
2. Re: inserting into my tables from action code
alal007 Oct 18, 2005 5:53 PM (in response to alal007)thanks for answering my question.