cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced workflow multiple text property problem

motion11
Champ in-the-making
Champ in-the-making
Hi,

While developing an advanced workflow I've encountered a problem with the usage of a multiple text property. What I'm trying to do is make an aspect that has a multiple text property field that has a constraint on a predefined list of values. It works fine when I test it on content model BUT it throws error messages in my alfresco.log file when I put the same field in the workflow model.

The aspect code is:

      <aspect name="ziswf:distributionlistgroup">
      <properties>
         <property name="ziswf:distributionlistgroup">
            <title>Distribution list by groups</title>
            <type>d:text</type>
            <multiple>true</multiple>
            <default>ZIS.ALL</default>
            <constraints>
               <constraint ref="zis:workdepartment"/>
            </constraints>
            </property>
      </properties>
      </aspect>

So the previously mentioned aspect should contain a text property that takes multiple values from the zis:workdepartment predefined list of values. As I said, in the content model it works fine, but in the workflow model it throws an error message:

14:54:18,770 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException: java.lang.String
   at org.alfresco.web.ui.repo.renderer.BaseMultiValueRenderer.encodeEnd(BaseMultiValueRenderer.java:164)
   at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
   at org.alfresco.web.ui.common.Utils.encodeRecursive(Utils.java:427)
   at org.alfresco.web.ui.repo.renderer.property.PropertySheetItemRenderer.encodeChildren(PropertySheetItemRenderer.java:109)
   at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
   at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:414)
   at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
   at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
   at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
   at org.alfresco.web.ui.repo.component.property.UIPropertySheet.encodeEnd(UIPropertySheet.java:200)
   at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:498)
   at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:366)
   at org.apache.jsp.jsp.workflow.manage_002dtask_002ddialog_jsp._jspx_meth_r_005fpropertySheetGrid_005f1(manage_002dtask_002ddialog_jsp.java:395)
   at org.apache.jsp.jsp.workflow.manage_002dtask_002ddialog_jsp._jspx_meth_a_005fpanel_005f1(manage_002dtask_002ddialog_jsp.java:368)
   at org.apache.jsp.jsp.workflow.manage_002dtask_002ddialog_jsp._jspService(manage_002dtask_002ddialog_jsp.java:180)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
   at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:594)
   at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
   at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)
   at org.apache.jsp.jsp.dialog.container_jsp._jspService(container_jsp.java:490)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
   at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
   at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
   at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
   at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
   at java.lang.Thread.run(Thread.java:595)

And so on……..

Can anyone help me solve this problem??

Thanks,

Tom
2 REPLIES 2

richard_im
Champ in-the-making
Champ in-the-making
I would suggest posting your constraint as well

motion11
Champ in-the-making
Champ in-the-making
Yes, well here it is:

The constraint:


<constraint name="zis:workdepartment" type="LIST">
         <parameter name="allowedValues">
         <list>
            <value>ZIS.ALL</value>
            <value>ZIS.ACF</value>
            <value>ZIS.ACM</value>
            <value>ZIS.ACM_AMD</value>
            <value>ZIS.ACM_CM</value>
            <value>ZIS.ACM_CRM</value>
            <value>ZIS.BSS</value>
            <value>ZIS.BSS_1st</value>
            <value>ZIS.BSS_2nd</value>
            <value>ZIS.BSS_PrM</value>
            <value>ZIS.EXA</value>
            <value>ZIS.ITO</value>
            <value>ZIS.ITO_DSM</value>
            <value>ZIS.ITO_NSS</value>
            <value>ZIS.MB</value>
            <value>ZIS.MBA</value>
            <value>ZIS.PMD</value>
            <value>ZIS.PMD_PM</value>
            <value>ZIS.PMD_D</value>
            <value>ZIS.INA</value>
            <value>ZIS.IS</value>
            <value>ZIS.LOG</value>
            <value>ZIS.SLM</value>
         </list>
         </parameter>
         </constraint>