[JBoss JIRA] Created: (JBPM-1375) Provide a way to determine the node type
by Mauro Molinari (JIRA)
Provide a way to determine the node type
----------------------------------------
Key: JBPM-1375
URL: http://jira.jboss.com/jira/browse/JBPM-1375
Project: JBoss jBPM
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: API
Affects Versions: jPDL 3.2.3
Reporter: Mauro Molinari
If you need to iterate over the nodes of a ProcessDefinition:
final List processNodes = processDefinition.getNodes ();
for (int x = 0; x < processNodes.size (); x++) {
final org.jbpm.graph.def.Node node = (org.jbpm.graph.def.Node) processNodes.get (x);
// ...
}
and you need to determine the actual type of a node, you cannot use instanceof because of the potential use of CGLIB proxies.
So, there's no *clean* way to determine the actual type of a node!!
Using the HibernateProxy workaround cited in the JBoss Forum reference attached, is not acceptable IMHO, because you're loosing the transparency against the underlying persistence technology. Moreover, it doesn't seem to work in the tests we're doing.
Using the alternative toString() workaround is also a dirty trick, because the toString() implementation might change and toString() shouldn't be used for this kind of things.
In another discussion:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156233
another user is experiencing our exact problem with the StartState: but we're not guaranteed that the same issue doesn't happen with other node types.
I can hardly accept the fact that a XXNode instance can't be cast to an XXNode object reference, however if this is the case, I think a clean way to determine the type of a node should then be provided by the jBPM API.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[JBoss JIRA] Created: (JBPM-1757) StaleObjectStateException and Rollback in Join- Node
by Rainer Buss (JIRA)
StaleObjectStateException and Rollback in Join- Node
-----------------------------------------------------
Key: JBPM-1757
URL: https://jira.jboss.org/jira/browse/JBPM-1757
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jPDL 3
Affects Versions: jBPM 3.2.3
Environment: Mac Osx 10.5.5, JBoss AS 4.2.3 GA, jbpm-jpdl-3.2.3-suite, Oracle 10g Express Server 1.1
Reporter: Rainer Buss
Executing a test process inside JBoss 4.2.3 using jbpm-enterprise.ear throws StaleObjectStateException in Join- node. The process consists of two nodes with async = true between fork and join. Please see process- defintion and action- handler in the referenced forum entry. The rollback causes one node action to be executed twice.
Modifications of the distributed ear: I customized the ear by changing the property 'hibernate.dialect' to 'Oracle9iDialect' in hibernate.cfg.xml. As transaction factory I tried JTATransactionFactory as well as CMTTransactionFactory, without change of behaviour in this case. File jbpm.cfg.xml I kept unchanged.
(Setting the node attributes to async=false the instance is processed without error)
I will attach a log with and without sql- tracing.
In my opinion the issue is not dependent on using oracle, because I had the same effect with the preinstalled hsqldb.
--
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
15 years, 11 months