I made some modifications and now I´m facing a new exception... :-(
Here is the complete listActivities page
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
template="layout/template.xhtml">
<ui:define name="body">
<h:form>
<a4j:outputPanel id="pooledTasks">
<h:outputText value="#{messages['listactivities.pooledtasks.message']}"/>
<h:outputText value="#{messages['srprocess.notasks.messages']}" rendered="#{empty pooledTaskInstanceList}"/>
<rich:dataTable value="#{pooledTaskInstanceList}" var="task" rendered="#{not empty pooledTaskInstanceList}">
<rich:column>
<f:facet name="header">#{messages['task.name']}</f:facet>
#{task.name}
</rich:column>
<rich:column>
<f:facet name="header">#{messages['task.description']}</f:facet>
#{task.description}
</rich:column>
<rich:column>
<f:facet name="header">#{messages['task.date']}</f:facet>
<h:outputText value="#{task.create}">
<f:convertDateTime pattern="dd/MM/yyyy HH:mm"/>
</h:outputText>
</rich:column>
<rich:column>
<s:link action="#{pooledTask.assignToCurrentActor}" value="#{messages['task.assign']}" taskInstance="#{task}" propagation="none">
<a4j:support event="onclick" ajaxSingle="true" reRender="pooledTasks, myTasks"/>
</s:link>
</rich:column>
</rich:dataTable>
<rich:spacer height="15px"/>
<rich:separator height="10px"/>
<rich:spacer height="15px"/>
</a4j:outputPanel>
<a4j:outputPanel id="myTasks">
<h:outputText value="#{messages['listactivities.mytasks.message']}"/>
<h:outputText value="#{messages['srprocess.notasks.messages']}" rendered="#{empty taskInstanceList}"/>
<rich:dataTable value="#{taskInstanceList}" var="_task" rendered="#{not empty taskInstanceList}">
<rich:column>
<f:facet name="header">#{messages['task.name']}</f:facet>
#{_task.name}
</rich:column>
<rich:column>
<f:facet name="header">#{messages['task.description']}</f:facet>
#{_task.description}
</rich:column>
<rich:column>
<f:facet name="header">#{messages['task.date']}</f:facet>
<h:outputText value="#{_task.create}">
<f:convertDateTime pattern="dd/MM/yyyy HH:mm"/>
</h:outputText>
</rich:column>
<rich:column>
<s:link action="#{pageDecisionHandler.redirectToPage}"
taskInstance="#{_task}"
value="#{messages['task.execute']}" />
</rich:column>
</rich:dataTable>
</a4j:outputPanel>
</h:form>
</ui:define>
</ui:composition>
I removed the following code from pages.xml
<page view-id="/listActivities.xhtml">
<begin-conversation join="true"/>
</page>
and now I can debug the redirectToPage() method. However, after execution of method, this exception it´s throw on seam debug page.
Exception during request processing:
Caused by java.lang.NullPointerException with message: ""
org.jboss.seam.bpm.BusinessProcess.startTask(BusinessProcess.java:178)
org.jboss.seam.navigation.TaskControl.beginOrEndTask(TaskControl.java:36)
org.jboss.seam.navigation.Page.preRender(Page.java:290)
org.jboss.seam.navigation.Pages.preRender(Pages.java:351)
org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:561)
org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:472)
org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:148)
org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:118)
com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Unknown Source)
Here is the code on pages.xml related to fillContext.xhtml
<page view-id="/fillContext.xhtml">
<begin-conversation join="true"/>
<start-task/>
</page>
The fillContext.xhtml is quite simple...
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
template="layout/template.xhtml">
<ui:define name="body">
<h:form id="fillContextForm">
<rich:panel>
<div align="center">
<f:facet name="header">#{messages['srprocess.fillcontext.page.title']}</f:facet>
<h:outputText value="#{messages['srprocess.fillcontext.page.description']}"/><br/>
<rich:editor value="#{srprotocol.context}" width="640" height="480"/>
<div style="clear:both"/>
</div>
</rich:panel>
<div class="actionButtons">
<h:commandButton value="#{messages['button.next']}" action="#{contextAction.endFillContext}">
<f:param name="taskId" value="#{taskInstance.id}"/>
<s:conversationPropagation type="join"/>
</h:commandButton>
<s:button propagation="end"
id="cancel"
value="#{messages['button.cancel']}"
view="/listActivities.xhtml"/>
</div>
</h:form>
</ui:define>
</ui:composition>
Finnaly, the contextAction component
@Name("contextAction")
@Scope(ScopeType.CONVERSATION)
public class ContextAction {
@In @Out(scope=ScopeType.BUSINESS_PROCESS, required=false)
protected SRProtocol srprotocol;
@In
private JbpmContext jbpmContext;
@In
private Actor actor;
@In
private StatusMessages statusMessages;
public SRProtocol getSrprotocol() {
return srprotocol;
}
public void setSrprotocol(SRProtocol srprotocol) {
this.srprotocol = srprotocol;
}
@EndTask(transition="context done")
public String endFillContext() {
statusMessages.addFromResourceBundle("srprocess.fillcontext.page.sucess");
return "/fillObjectivies.xhtml";
}
}
The ideia here is to continue to execute the process and redirect to another page so the user can fill the information related with next task
Please, I´m sorry for any inconvenience but there is no much people on my job to help me with this issue
Thanks a lot!