[
https://jira.jboss.org/jira/browse/JBSEAM-2854?page=com.atlassian.jira.pl...
]
Eddie Lewis commented on JBSEAM-2854:
-------------------------------------
The issue is that pageflows are initiated at the beginning of a conversation.
When conversations are started - the @Begin annotation is checked to see if a
"pageflow" attribute is specified.
If a nested conversation is started and no pageflow attribute is specified, then the
processInstance variable in the PageFlow class is null (and the subflow stops working).
End the nested conversation and the parent conversations processInstance variable will
become valid and the pageflow will begin again.
Look at org.jboss.seam.core.ConversationInterceptor (2.0.1.GA)
private void beginConversationIfNecessary(Method method, Object result) {
.......
beginConversation( nested, getProcessDefinitionName(method) );
.......
}
private String getProcessDefinitionName(Method method) {
if ( method.isAnnotationPresent(Begin.class) )
{
return method.getAnnotation(Begin.class).pageflow();
}
.........
//TODO: let them pass a pageflow name as a request parameter
return ""; <------ will return "" in this case
}
private void beginConversation(boolean nested, String pageflowName)
{
if ( !Manager.instance().isLongRunningOrNestedConversation() )
{
Manager.instance().beginConversation( );
beginNavigation(pageflowName); // pageflowName is empty
}
else if (nested)
{
Manager.instance().beginNestedConversation();
beginNavigation(pageflowName); // pageflowName is empty
}
}
private void beginNavigation(String pageflowName)
{
if ( !pageflowName.equals("") )
{
Pageflow.instance().begin(pageflowName); // pageflowName is empty
}
}
In the nested conversation - Pageflow.instance().begin is never called and the
processInstance variable in the PageFlow class ends up null.
The issue is the subflow (or the whole pageflow) that is contained within the parent
conversation has not been passed to the nested conversation with a pointer of where to
start the pageflow.
Just added this comment so that people have an idea as to why nested conversations can
break pageflows.
Provide a way to nest pageflows
-------------------------------
Key: JBSEAM-2854
URL:
https://jira.jboss.org/jira/browse/JBSEAM-2854
Project: Seam
Issue Type: Feature Request
Components: BPM, Core, JSF Controls
Affects Versions: 2.0.1.GA
Environment: All
Reporter: Marcell Barbacena
The current behaviour of pageflow subprocess tag is to include the pageflow definition in
the the current flow, meaning that the parent pageflow is paused until the included
pageflow ends.
However, sometimes it is desired that the parent pageflow do not "pause" and
that the included gain its own flow.
The semantics of this nested pageflow is:
- when starts: provided a nested conversation from the parent pageflow.
- when ends: go back do the state before the nesting. If the parent pageflow is not
associated in any way to the nested, its flow goes without interfering with the nested.
E.g.:
Parent directed graph: startpage1->page1; page1->page2; page1->nested;
nested->page2; page2->page3; page3->endpage1;
Nested graph: startpage2->page5; page5->page6; page6->endpage2
Then we can have:
parent: startpage1->page1;
parent: page1->nested;
nested: startpage2->page5;
nested: page5->page6;
parent: page1->page2;
parent: page2>page3;
nested: page6->endpage2
nested:endpage2->page2;
parent: page3->endpage1;
nested: page2>page3;
nested: page3->endpage1;
See that the nested pageflow gains his own flow, i.e. independent of the parent.
--
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