[jbpm-issues] [JBoss JIRA] Updated: (JBPM-1375) Provide a way to determine the node type

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Sat Aug 16 03:58:58 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBPM-1375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Diesler updated JBPM-1375:
---------------------------------

    Component/s: jPDL 3
                     (was: API)


> Provide a way to determine the node type
> ----------------------------------------
>
>                 Key: JBPM-1375
>                 URL: https://jira.jboss.org/jira/browse/JBPM-1375
>             Project: JBoss jBPM
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: jPDL 3
>    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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbpm-issues mailing list