Support Article
onclick event tries to invoke it’s own workflow again
SA-5283
Summary
<tr:goLink> tag onclick event tries to invoke it’s own workflow again, but issue is not happening in facelets pages.
Error Messages
<Mon Dec 29 14:39:20 EST 2014> <1419881960468> <ERROR> <Thd=[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <com.chordiant.ic.internal.jxw.JxwIcTaskDescriptorHelper.createWorkflowInputContexts()> <Missing Required Input Contexts for name(s) accountID , interactionID , language , cardNumber>
<Mon Dec 29 14:39:20 EST 2014> <1419881960469> <ERROR> <Thd=[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <com.chordiant.ic.internal.jxw.JxwIcService.startProcess()> <Unknown error occured during process initialization. Rolling back Transaction <com.chordiant.ic.exception.InvalidParameterException: Missing Required Input Contexts for name(s) accountID , interactionID , language , cardNumber
com.chordiant.ic.internal.jxw.JxwIcTaskDescriptorHelper.createWorkflowInputContexts(JxwIcTaskDescriptorHelper.java:120)
com.chordiant.ic.internal.jxw.JxwIcService.startProcess(JxwIcService.java:367)
com.chordiant.ic.service.IcService.start(IcService.java:357)
com.chordiant.ic.service.IcService.processRequest(IcService.java:208)
com.chordiant.service.MasterStatelessServiceBean.processRequest(MasterStatelessServiceBean.java:535)
com.chordiant.service.GatewayHandler.processRequest(GatewayHandler.java:266)
com.chordiant.service.ejb.EJBGatewayServiceBean.processRequestObject(EJBGatewayServiceBean.java:170)
com.chordiant.service.ejb.EJBGatewayServiceBMT_q9usbn_EOImpl.__WL_invoke(Unknown Source)
weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:32)
com.chordiant.service.ejb.EJBGatewayServiceBMT_q9usbn_EOImpl.processRequestObject(Unknown Source)
com.chordiant.service.clientagent.EJBSmartStub.processRequestObject(EJBSmartStub.java:687)
com.chordiant.service.clientagent.BaseSmartStub.baseProcessRequestObject(BaseSmartStub.java:483)
com.chordiant.service.clientagent.ClientAgentBaseClass.processRequestObject(ClientAgentBaseClass.java:78)
com.chordiant.service.clientagent.ClientAgentBaseClass.processRequest(ClientAgentBaseClass.java:442)
com.chordiant.ic.client.IcClientAgent.handleProcessRequest(IcClientAgent.java:434)
com.chordiant.ic.client.IcClientAgent.start(IcClientAgent.java:108)
com.chordiant.web.faces.ic.IcFacesDispatcher.start(IcFacesDispatcher.java:195)
com.chordiant.web.faces.ic.IcFacesDispatcher.start(IcFacesDispatcher.java:147)
com.chordiant.web.faces.ic.IcFacesBackingBeanImpl.start(IcFacesBackingBeanImpl.java:129)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
com.sun.el.parser.AstValue.invoke(AstValue.java:255)
com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)
org.apache.myfaces.el.convert.MethodExpressionToMethodBinding.invoke(MethodExpressionToMethodBinding.java:75)
com.chordiant.web.faces.RenderResponsePhaseListener.beforePhase(RenderResponsePhaseListener.java:56)
org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:73)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:134)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:187)
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:352)
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
com.chordiant.web.faces.filter.ChordiantFacesFilter.doFilter(ChordiantFacesFilter.java:61)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
com.chordiant.web.faces.filter.LoginCheckFilter.doFilter(LoginCheckFilter.java:87)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
com.chordiant.application.ChordiantPerformanceFilter.doFilter(ChordiantPerformanceFilter.java:125)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
com.chordiant.cafe.application.filter.FilterRequestHandler.doFilter(FilterRequestHandler.java:88)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3288)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1512)
weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Steps to Reproduce
Snippet (JSPX):
function doNothing() {
alert("Test");
}
<tr:goLink text="Test" onclick="doNothing();"/>
Root Cause
In OOTB, FlowId attribute should only be added to the JSF pages that are invoked/has icFacesStartQueueItem, icFacesWindowClosed, icFacesOpenRecovery and icFacesRecoverDynamicProcess. However, it is observed from the view source of the JSF page that FlowId attribute gets added to a link (as below) which does not have a server target.
<a onclick="alert('hello');" class="OraLink" href="https://community.pega.com/?%3Cstrong%3EFlowId=-5416003%3C/strong%3E">
The FlowId attribute should not be appended for this request. Due to this, onclick event tries to invoke its own workflow again. And sometimes the links are non-functional/clickable.
Resolution
Provided HotFix-901 that addresses the above issue by putting a check around the commandLink in the addRandomId method of ChordiantFacesFilterResponseWrapper class.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.