[JBoss JIRA] Created: (JBPM-2792) Data manipulation with HQL / SQL nodes
by Peter Horvath (JIRA)
Data manipulation with HQL / SQL nodes
--------------------------------------
Key: JBPM-2792
URL: https://jira.jboss.org/jira/browse/JBPM-2792
Project: jBPM
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.x
Reporter: Peter Horvath
Currently HQL / SQL nodes only allow you to run queries. It would be great if it was possible to run data manipulation operations (INSERT / UPDATE / DELETE) as well.
It should be quite easy to implement this by adding a new possible flag to the hql / sql node and calling org.hibernate.Query.executeUpdate() from org.jbpm.jpdl.internal.activity.HqlActivity.perform(OpenExecution) method:
if(isUpdate) { // isUpdate: this a new flag that indicates that this is a data manipulation operation
// execute update and store the number of entities / rows affected (inserted, updated or deleted) by this operation into the result variable
result = q.executeUpdate();
} else { if (isResultUnique) {
result = q.uniqueResult();
} else {
result = q.list();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[JBoss JIRA] Created: (JBPM-2605) DbPersistenceServiceFactory should not close SessionFactory if it didn't opened it
by Stefano Travelli (JIRA)
DbPersistenceServiceFactory should not close SessionFactory if it didn't opened it
----------------------------------------------------------------------------------
Key: JBPM-2605
URL: https://jira.jboss.org/jira/browse/JBPM-2605
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 3.2.7
Environment: JBoss 4.2.3, Seam 2.1
Reporter: Stefano Travelli
I configure JBpm with Seam 2.1 so that the JBpm SessionFactory is the same of the underlying SessionFactory used by the EntityManagerFactory in JPA.
In order to do so I include JBpm hibernate.cfg.xml in the persistence-unit. Then I declare the JNDI name in jbpm.cfg.xml:
<persistence-unit name="getin">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/getinDS</jta-data-source>
<propertyies>
<!--- ... --->
<property name="hibernate.session_factory_name" value="java:/getinSessionFactory"/>
<property name="hibernate.ejb.cfgfile" value="jbpm.hibernate.cfg.xml"/>
</properties>
</persistence-unit>
<jbpm-configuration>
<jbpm-context>
<service name="persistence">
<factory>
<bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
<field name="isTransactionEnabled">
<false/>
</field>
<field name="sessionFactoryJndiName">
<string value="java:/getinSessionFactory"/>
</field>
</bean>
</factory>
</service>
<service name="tx" factory="org.jbpm.tx.TxServiceFactory"/>
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory"/>
<service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory"/>
<service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory"/>
<service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory"/>
</jbpm-context>
</jbpm-configuration>
It works fine except that during test execution in the Seam enviroment JBpm context is opened and closed several times while the persistence unit stays.
However, as a JBpm context closes, DbPersistenceServiceFactory also closes the SessionFactory invalidating the EntityManagerFactory.
When DbPersistenceServiceFactory doesn't create the SessionFactory taking it from JNDI, it shouldn't close it as this should be a responsibility of the component who registered it in JNDI in first place.
The patch is simple:
public void close()
{
if (sessionFactory != null && sessionFactoryJndiName == null)
{
log.debug("closing hibernate session factory");
sessionFactory.close();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[JBoss JIRA] Created: (JBPM-2795) Cannot delete or update a parent row: a foreign key constraint fails (`jbpmdb/jbpm4_execution`, CONSTRAINT `FK_EXEC_SUPEREXEC` FOREIGN KEY (`SUPEREXEC_`) REFERENCES `jbpm4_execution` (`DBID_`))
by scarletake b. c. (JIRA)
Cannot delete or update a parent row: a foreign key constraint fails (`jbpmdb/jbpm4_execution`, CONSTRAINT `FK_EXEC_SUPEREXEC` FOREIGN KEY (`SUPEREXEC_`) REFERENCES `jbpm4_execution` (`DBID_`))
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: JBPM-2795
URL: https://jira.jboss.org/jira/browse/JBPM-2795
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.3
Environment: windows xp, jdk1.6, mysql5.1
Reporter: scarletake b. c.
when a case like follow:
a process and it include three sub-processes(fork), when any one of sub-processes reject, the main process will go to End.
it will hit exception:Cannot delete or update a parent row: a foreign key constraint fails
like:
11:26:11,727 ERROR [org.hibernate.util.JDBCExceptionReporter] Cannot delete or update a parent row: a foreign key constraint fails (`jbpmdb/jbpm4_execution`, CONSTRAINT `FK_EXEC_SUPEREXEC` FOREIGN KEY (`SUPEREXEC_`) REFERENCES `jbpm4_execution` (`DBID_`))
11:26:11,727 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
it occur due to hibernate's behavior.
the code:org.jbpm.pvm.internal.model.ExecutionImpl
the method:end|(String state)
move "end all child" to bottom
but i ain't sure it really been solved.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2630) JbpmConfiguration.popJbpmConfiguration() doesn't implement a pop operation
by Toshiya Kobayashi (JIRA)
JbpmConfiguration.popJbpmConfiguration() doesn't implement a pop operation
--------------------------------------------------------------------------
Key: JBPM-2630
URL: https://jira.jboss.org/jira/browse/JBPM-2630
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 3.2.8, jBPM 3.2.7
Reporter: Toshiya Kobayashi
org.jbpm.JbpmConfiguration.java:
=====
synchronized void popJbpmConfiguration() {
getJbpmConfigurationStack().remove(this);
}
=====
List.remove() can break ordering in the jbpmConfigurationStack, then eventually getCurrentJbpmConfiguration() will return an wrong jbpmConfiguration instance.
(List.remove(java.lang.Object) behaves like FIFO if there are multiple elements which refer the same object)
On the other hand, popJbpmContext() pops properly.
=====
void popJbpmContext(JbpmContext jbpmContext) {
List stack = getJbpmContextStack();
int size = stack.size();
if (size == 0) {
...
}
else if (jbpmContext != stack.remove(size - 1)) {
...
}
}
=====
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2573) Process name text input field in properties view does not input characters in the right order
by Carl Allain (JIRA)
Process name text input field in properties view does not input characters in the right order
---------------------------------------------------------------------------------------------
Key: JBPM-2573
URL: https://jira.jboss.org/jira/browse/JBPM-2573
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: GPD
Affects Versions: jBPM 4.1
Environment: Eclipse Platform 3.5.1.M20090917-0800
jBPM 4 Graphical Editor and Tools 1.1.0.v200908252230-31-8s733L3J7D7793
All jBPM 4 Tools Features 4.1.0.v200908252230-775-A0I8_GOdN2MrX_LVTDTlIAAj
jBPM 4 Graphical Editor and Tools Sources 1.1.0.v200908252230-31-8s733L3J7D7793
Windows XP SP3
Reporter: Carl Allain
Priority: Minor
The field "name" in the "properties" view does not work like other fields. Characters entered on the keyboard are always put at the beginning of the current property value, regardless of where the cursor is positionned.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months