cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow JBPM Alfresco 4

fred_pack
Champ in-the-making
Champ in-the-making
Bonjour,

Je souhaite migrer mon alfresco 3.0 vers la version 4.0 (version v4.0.0 (c 80))
Mon O.S. : Windows 2008 R2

N.B. : j'ai pris la version 4.0c à la place de la version 4.0b à cause d'un bug que je rencontrais lors de recherche de groupes.

Donc, je veux reprendre mes workflows.
Pour cela, j'ai copié mes fichiers :

pac01-processdefinition.xml
pac01-workflow-context.xml
pac01Model.xml
pac01-messages.properties

dans le répertoire /extension

Ensuite j'ai modifié le fichier web-client-config-custom pour prendre en charge l'affichage des paramètres du workflow

A ce stade, aucune erreur dans les logs, et je vois bien mon workflow.
je lance donc le workflow, choisi les intervenants, et clique sur le bouton 'Terminer'

C'est alors que j'ai le message suivant :

Veuillez corriger les erreurs ci-dessous puis cliquez sur Terminer.

    Une erreur système s'est produite lors de l'opération : Namespace prefix espace is not mapped to a namespace URI

Le namespace est pourtant (il me semble… :? ) bien renseigné dans le fichier pac01Model.xml !

Quelqu'un aurait-il une piste ???
Merci

voici les fichiers :

Pac01Model.xml

<?xml version="1.0" encoding="UTF-8"?>
<model name="pac01:pac01" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Infos. –>
   <description>Validation 1 Qualite</description>
   <author>Fred</author>
   <version>1.0</version>

  <imports>
   <!– Import modeles de definitions –>
   <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm"/>
   <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
  </imports>
  <namespaces>
   <!– Import nouveau namespace defini par ce modele –>
   <namespace uri="pac01.pac01" prefix="pac01"/>
  </namespaces>
     
  <types>
   <type name="pac01:debut">
      <parent>bpm:startTask</parent>
      <mandatory-aspects>
         <aspect>pac01:persRedac</aspect>
         <aspect>pac01:persVerif</aspect>
         <aspect>pac01:persApprob</aspect>
      </mandatory-aspects>
   </type>

   <type name="pac01:redac">
      <parent>bpm:workflowTask</parent>

      <overrides>
         <property name="bpm:packageItemActionGroup">
            <default>edit_package_item_actions</default>
         </property>
      </overrides>
   </type>

   <type name="pac01:verif">
      <parent>bpm:workflowTask</parent>
   </type>

   <type name="pac01:approb">
      <parent>bpm:workflowTask</parent>
   </type>

   <type name="pac01:clot">
      <parent>bpm:workflowTask</parent>
   </type>
  </types>


   <aspects>
   <aspect name="pac01:persRedac">
   <associations>
   <association name="pac01:persRedac">
   <source>
      <mandatory>false</mandatory>
      <many>false</many>
   </source>
   <target>
      <class>cm:person</class>
      <mandatory>true</mandatory>
      <many>false</many>
   </target>
   </association>
   </associations>
   </aspect>

   <aspect name="pac01:persVerif">
   <associations>
   <association name="pac01:persVerif">
   <source>
      <mandatory>false</mandatory>
      <many>false</many>
   </source>
   <target>
      <class>cm:person</class>
      <mandatory>true</mandatory>
      <many>false</many>
   </target>
   </association>
   </associations>
   </aspect>

   <aspect name="pac01:persApprob">
   <associations>
   <association name="pac01:persApprob">
   <source>
      <mandatory>false</mandatory>
      <many>false</many>
   </source>
   <target>
      <class>cm:person</class>
      <mandatory>true</mandatory>
      <many>false</many>
   </target>
   </association>
   </associations>
   </aspect>
   </aspects>

</model>


pac01-workflow-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
    <bean id="parallel.workflowBootstrap" parent="workflowDeployer">
      <property name="workflowDefinitions">
         <list>
            <props>
               <prop key="engineId">jbpm</prop>
               <prop key="location">alfresco/extension/pac01-processdefinition.xml</prop>
               <prop key="mimetype">text/xml</prop>
               <prop key="redeploy">true</prop>
            </props>
         </list>
      </property>
      <property name="models">
         <list>
            <!– NOTE: The above process definition relies on the default workflowModel.xml –>
            <!–       which is already registered during Alfresco startup. –>
            <!–       See bootstrap-context.xml (workflowBootstrap). –>

            <value>alfresco/extension/pac01Model.xml</value>
         </list>
      </property>
      <property name="labels">
         <list>
            <!– NOTE: The above process definition relies on the default workflow-messages.properties –>
            <!–       which is already registered during Alfresco startup –>
            <!–       See bootstrap-context.xml (workflowBootstrap). –>

            <value>alfresco/extension/pac01-messages</value>
         </list>
      </property>
   </bean>
</beans>


Et le message d'erreur dans stdout


2011-11-22 18:08:40,782  ERROR [ui.common.Utils] [http-8080-1] Une erreur système s'est produite lors de l'opération : Namespace prefix espace is not mapped to a namespace URI
org.alfresco.service.namespace.NamespaceException: Namespace prefix espace is not mapped to a namespace URI
   at org.alfresco.service.namespace.QName.createQName(QName.java:99)
   at org.alfresco.service.namespace.QName.createQName(QName.java:121)
   at org.alfresco.repo.workflow.WorkflowQNameConverter.convertNameToQName(WorkflowQNameConverter.java:98)
   at org.alfresco.repo.workflow.WorkflowQNameConverter.mapNameToQName(WorkflowQNameConverter.java:71)
   at org.alfresco.repo.workflow.WorkflowObjectFactory.mapNameToQName(WorkflowObjectFactory.java:413)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.getTaskProperties(JBPMEngine.java:2473)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.getTaskProperties(JBPMEngine.java:2418)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.createWorkflowTask(JBPMEngine.java:3302)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.setDefaultTaskProperties(JBPMEngine.java:2770)
   at org.alfresco.repo.workflow.jbpm.WorkflowTaskInstance.create(WorkflowTaskInstance.java:107)
   at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:218)
   at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:174)
   at org.jbpm.graph.def.Node.enter(Node.java:390)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
   at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$d99980e3.enter(<generated>)
   at org.jbpm.graph.def.Transition.take(Transition.java:167)
   at org.jbpm.graph.def.Node.leave(Node.java:479)
   at org.jbpm.graph.def.Node.leave(Node.java:438)
   at org.jbpm.graph.def.Node.execute(Node.java:429)
   at org.jbpm.graph.def.Node.enter(Node.java:390)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
   at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$d99980e3.enter(<generated>)
   at org.jbpm.graph.def.Transition.take(Transition.java:167)
   at org.jbpm.graph.def.Node.leave(Node.java:479)
   at org.jbpm.graph.node.StartState.leave(StartState.java:82)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
   at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$d99980e3.leave(<generated>)
   at org.jbpm.graph.exe.Token.signal(Token.java:223)
   at org.jbpm.graph.exe.Token.signal(Token.java:150)
   at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:490)
   at org.alfresco.repo.workflow.jbpm.WorkflowTaskInstance.end(WorkflowTaskInstance.java:135)
   at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:406)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$29.doInJbpm(JBPMEngine.java:2157)
   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
   at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.endTask(JBPMEngine.java:2132)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.endTask(WorkflowServiceImpl.java:820)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:147)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy70.endTask(Unknown Source)
   at org.alfresco.web.bean.workflow.StartWorkflowWizard.finishImpl(StartWorkflowWizard.java:237)
   at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:123)
   at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:119)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:129)
   at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:593)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
   at javax.faces.component.UICommand.broadcast(UICommand.java:151)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:115)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:191)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
   at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:105)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:80)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:143)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.repo.web.filter.beans.SessionSynchronizedFilter.doFilter(SessionSynchronizedFilter.java:67)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:104)
   at sun.reflect.GeneratedMethodAccessor480.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy237.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:68)
   at sun.reflect.GeneratedMethodAccessor480.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy237.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
   at java.lang.Thread.run(Thread.java:619)

2 REPLIES 2

cleseach
Star Contributor
Star Contributor
Bonjour,

Le problème doit se cacher dans votre processdefinition.xml.
Vous devez utiliser le namespace "espace" (faites une recherche sur "espace:" dans ce document) alors que votre modèle définit "pac01".

Cordialement,
Charles Le Seac'h

fred_pack
Champ in-the-making
Champ in-the-making
Bonjour,

Merci de votre réponse.

J'ai trouvé entre-temps. Oui il y a bien un lien avec le mot espace.

En fait, dans mon processdefinition, je déclare une variable espace_origine…


   <expression>
   var tmp1=bpm_package;
   var tmp2=tmp1.children[0].parent;
   espace_origine=tmp2;
   </expression>
   <variable name="espace_origine" access="write"/>

Il semblerait que alfresco 4, ou plus précisément JBPM n'apprécie plus le caractère _ (cela fonctionnait avec la version 3.0)

J'ai donc renommé ma variable en espaceOrigine, et tout va bien maintenant (en tout cas pour ce problème  Smiley Happy )

Cordialement

Fred.