[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3107) Jbpm.installPageflowDefinitions() changes order of pageflowDefinitions

Wolfgang Schwendt (JIRA) jira-events at lists.jboss.org
Sat Aug 16 14:57:58 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBSEAM-3107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12425350#action_12425350 ] 

Wolfgang Schwendt commented on JBSEAM-3107:
-------------------------------------------

"Wrong patch attached previously. Here's the correct one."

Excellent!   Pete, please apply Przemyslaw's patch.


"2. Wolfgang, if your only fix is to change this structure it works for you by accident, because PageflowDeploymentHandler processes your classpath in an order which is lucky for you."


Thanks for pointing this out.   I analyzed Seam's sourcecode a lot, but I had NOT enough time to analyze what PageflowDeploymentHandler excactly does  (as already mentioned by me previously).   I am always declaring all pageflows via bpm:pageflow-definitions and I do not consider the loading of (undeclared) pageflows from the classpath useful as long as it is necessary for JPDL's pageflow parser that pageflows are parsed in a partial order.  So my intention was just to temporarily fix the bug (in my local working copy) as far the processing of pageflows declared via bpm:pageflow-definitions  is concerned.


> Jbpm.installPageflowDefinitions() changes order of pageflowDefinitions
> ----------------------------------------------------------------------
>
>                 Key: JBSEAM-3107
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3107
>             Project: Seam
>          Issue Type: Bug
>         Environment: Seam 2.1 SVN trunk
>            Reporter: Wolfgang Schwendt
>            Priority: Blocker
>             Fix For: 2.1.0.BETA2
>
>         Attachments: JBSEAM-3107.FINAL.trunk.diff.txt, JBSEAM-3107.FIXEDFINAL.trunk.diff.txt, JBSEAM-3107.trunk.diff
>
>
> current code in Seam 2.1. SVN-based trunk:
> org.jboss.seam.bpm.Jbpm 
> private void installPageflowDefinitions() {
>       Set<String> mergedPageflowDefinitions = new TreeSet<String>();
> Set semantics is wrong here.  In order to fix the bug described below, please change to 
>      ArrayList<String> mergedPageflowDefinitions = new ArrayList<String>();
>   
> Reason:
> when jPDL tries to parse pageflow  with a <process-state> that calls a sub pageflow via a <sub-process name="subpageflow"/> child element,   it can only parse the process-state if the subpageflow was parsed already.   See org.jbpm.graph.node.ProcessState.read().   If the subpageflow was NOT parsed already before the <process state> of the parent pageflow gets parsed, jBPM's  SubProcessResolver throws a null pointer exception (NPE).  Hence, to avoid a NPE,   we have have to list  all included pageflows in a partial order in components.xml:    The pageflows first listed are the included subpageflows,  the pageflows  listed last are the parent pageflows which call the preceding subpageflows. 
> Now, if installPageflowDefinitions() puts the names of these pageflow definition files in a set (rather than list), the order gets lost and in turn the likelihood increases that jBPM's SubProcessResolver throws a null pointer exception.
>  <!--Pageflow definition  in a special order with subpageflows listed first ->
>  <bpm:jbpm>
>       <bpm:process-definitions></bpm:process-definitions>
>       <bpm:pageflow-definitions> 
>          <value>/WEB-INF/benutzerKontoEroeffnen.jpdl.xml</value>   
>          <value>/WEB-INF/beimSystemAnmelden.jpdl.xml</value>
>          <value>/WEB-INF/beimSystemAnmeldenTopLevel.jpdl.xml</value>
>          <value>/WEB-INF/aufWartelisteSetzen.jpdl.xml</value>         
>          <value>/WEB-INF/persoenlicheDatenBearbeiten.jpdl.xml</value>
>          <value>/WEB-INF/zumSeminarAnmelden.jpdl.xml</value>        
>          <value>/WEB-INF/seminarSuche.jpdl.xml</value>
>          <value>/WEB-INF/seminardatenBearbeiten.jpdl.xml</value>
>          <value>/WEB-INF/seminarbelegungenEinsehen.jpdl.xml</value>
>       </bpm:pageflow-definitions>
>    </bpm:jbpm>

-- 
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 seam-issues mailing list