AnsweredAssumed Answered

Comment grisé un bouton du workflow Avancé

Question asked by huberd on Sep 22, 2009
Bonjour,

Je souhaiterais griser un bouton du Workflow Avancé.

Je m'explique : Un rédacteur soumet à l'approbation un document. Ce document est ensuite envoyé au service qualité de l'entreprise qui doit completer le document et ensuite cliquer sur le boton "Continuer" du Workflow.

Aujourd'hui je n'ai aucun controle sur la mise à jour du document. Le service qualité peut cliquer sur le bouton "Continuer" sans mettre à jour le document, ce qui peut être fort regrétable.

Comment faire donc pour griser ce bouton, tant que le document n'a pas été modifié.

Voici la partie workflow concernant la tâche qualité


   <!–**************************–>
   <!–**     <Task Node>      **–>
   <!–**       quality        **–>
   <!–**************************–>    
   <task-node name="quality">
      <task name="cwf:qualityTask" swimlane="qualitygroup"/>
     
      <event type="task-assign">
         <action class="org.alfresco.community.repo.workflow.jbpm.Actions"/>
      </event>
        
      <event type="task-end">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
               <expression>
                  if (taskInstance.actorId == null)
                     taskInstance.actorId = person.properties.userName;
               </expression>
            </script>
         </action>
      </event>
       
      <transition name="cwf_continue" to="qualityupdate"/>
   </task-node>  

j'ai essayé de mettre la condition suivante :

<transition name="cwf_continue" to="qualityupdate">
  <condition>#{bpm_package.children[0].properties["cm:created"] != bpm_package.children[0].properties["cm:modified"]}</condition>
</transition>     

mais j'obtiens le message d'erreur suivant :

14:27:55,952 ERROR [[localhost].[/alfresco].[JBPMDeployProcessServlet]] "Servlet.service()" pour la servlet JBPMDeployProcessServlet a généré une exception
org.alfresco.service.cmr.workflow.WorkflowException: Failed to deploy workflow definition
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.deployDefinition(JBPMEngine.java:287)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.deployDefinition(WorkflowServiceImpl.java:107)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:256)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy43.deployDefinition(Unknown Source)
   at org.alfresco.web.app.servlet.JBPMDeployProcessServlet.deployArchive(JBPMDeployProcessServlet.java:131)
   at org.alfresco.web.app.servlet.JBPMDeployProcessServlet.service(JBPMDeployProcessServlet.java:70)
   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.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   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.Http11AprProcessor.process(Http11AprProcessor.java:834)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
   at java.lang.Thread.run(Unknown Source)
Caused by: org.jbpm.JbpmException: Failed to parse process definition from jBPM zip archive stream
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.compileProcessDefinition(JBPMEngine.java:1618)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$1.doInJbpm(JBPMEngine.java:274)
   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.deployDefinition(JBPMEngine.java:269)
   … 35 more
Caused by: org.jbpm.jpdl.JpdlException: [[ERROR] line 144: cvc-complex-type.2.4.a: Invalid content was found starting with element 'condition'. One of '{"urn:jbpm.org:jpdl-3.1":action, "urn:jbpm.org:jpdl-3.1":script, "urn:jbpm.org:jpdl-3.1":create-timer, "urn:jbpm.org:jpdl-3.1":cancel-timer, "urn:jbpm.org:jpdl-3.1":exception-handler}' is expected., [WARNING] swimlane 'initiator' does not have an assignment]
   at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:173)
   at org.alfresco.repo.workflow.jbpm.JBPMJpdlArchiveParser.readFromArchive(JBPMJpdlArchiveParser.java:72)
   at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchive.java:81)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.compileProcessDefinition(JBPMEngine.java:1613)
   … 41 more
Merci pour votre aide.

David

Outcomes