deploiment de processdefinition

cancel
Showing results for 
Search instead for 
Did you mean: 
hamizou
Member II

deploiment de processdefinition

Bonjour,
je suis entrain de suivre le livre alfresco guide developping
j'essaye de déployé un workflow publishWhitepaper voila une extrait de processdefinition


?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="scwf:publishWhitepaper">
   <swimlane name="initiator" />

   <swimlane name="marketing">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>#{people.getGroup('GROUP_marketing')}</pooledactors>
      </assignment>
   </swimlane>
   
   <swimlane name="operations">      
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>#{people.getGroup('GROUP_operations')}</pooledactors>
      </assignment>
   </swimlane>

   <start-state name="start">
      <task name="scwf:submitReviewTask" swimlane="initiator" />
      <transition name="" to="Submit"></transition>
   </start-state>
  
   <node name="Submit">
      <event type="node-enter">
         <script>
            <variable name="approveCount" access="read,write"/>
            <expression>
               approveCount = 0;
            </expression>
         </script>
      </event>
      <transition name="" to="fork1"></transition>
   </node>

   <fork name="fork1">
      <transition name="" to="Marketing Review"></transition>
      <transition name="tr2" to="Operations Review"></transition>
   </fork>

   <task-node name="Marketing Review">
      <task name="scwf:marketingReview" swimlane="marketing" />
      <transition name="approve" to="join1">
         <script>
            <variable name="approveCount" access="read,write"/>
            <expression>
                  approveCount = approveCount + 1;
            </expression>
         </script>
      </transition>
      <transition name="reject" to="join1"></transition>
   </task-node>

Lorsque j'ai essayé de déployé le workflow je rencontre un message d'erreur

org.alfresco.service.namespace.NamespaceException: Namespace prefix scwf is not mapped to a namespace URI

je croit que la liaison entre le processdefinition et le model Scworflow n est pas prise en compte, et je comprend pas
ou se fait l'adressage du modele par le processdefinition.

Merci pour votre aide
4 Replies
jayjayecl
Active Member II

Re: deploiment de processdefinition

Peut-on avoir les détails de votre déploiement de ce workflow (liste des fichiers spécifiques créés, le répertoire de livraison etc …), c'est-à-dire la procédure de livraison ?

Aussi, la trace de logs en entier, si possible.
Merci
hamizou
Member II

Re: deploiment de processdefinition

Merci beaucoup pour votre aide, j'ai réussi à surpasser ce problème.
Le problème c'est que j'ai pas bien déclarer le WorkFlow au niveau de someco-model-context.xml
voila le contenu du someco-model-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>
    <!– Registration of new models –>
    <bean id="someco.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/model/scModel.xml</value>
            </list>
        </property>
    </bean>
    <bean id="someco.workflowBootstrap" parent="workflowBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/model/scWorkflowModel.xml</value>
            </list>
        </property>
    </bean>
   
   <!– Registration of resource bundles –>
   <bean id="parallel.workflowBootstrap" parent="workflowDeployer">
        <property name="labels">
                <list>
                <value>alfresco.extension.scWorkflow</value>
            </list>
        </property>
    </bean>
</beans>

Merci encore une foi  Smiley Very Happy
hamizou
Member II

Re: deploiment de processdefinition

Salut, j'ai crus que j'ai compris mais,ce n'était pas comme prévu.
Alors j'ai défini un nouvel workflow GrhCongeWorkflowModel.xml

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="scwf:workflowmodel"
   xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>GRH demande de conge Workflow Model</description>
   <author>Hamza Atig</author>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other models –>
   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <import uri="http://www.alfresco.org/model/bpm/1.0"   prefix="bpm" />
      <import uri="http://www.alfresco.org/model/wcmmodel/1.0" prefix="wcm" />
      <import uri="http://www.alfresco.org/model/wcmworkflow/1.0" prefix="wcmwf" />
      <import uri="http://www.alfresco.org/model/wcmappmodel/1.0" prefix="wca"/>      
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <namespaces>
      <namespace uri="http://www.owliancetunis.com/model/workflow/1.0" prefix="grhwf" />
   </namespaces>

      <types>
         
   
         <type name="grhwf:ChefReview">
            <parent>bpm:workflowTask</parent>
            <overrides>
               <property name="bpm:packageItemActionGroup">
                  <default>read_package_item_actions</default>
               </property>
            </overrides>
         </type>
   
         <type name="grhwf:RespReview">
            <parent>bpm:workflowTask</parent>
            <overrides>
               <property name="bpm:packageItemActionGroup">
                  <default>read_package_item_actions</default>
               </property>
            </overrides>
         </type>
   
   
      
         <type name="grhwf:submitNoApprovalTask">
            <parent>wcmwf:startTask</parent>
            <associations>
               <association name="wcmwf:webproject">
                  <source>
                     <mandatory>false</mandatory>
                     <many>false</many>
                  </source>
                  <target>
                     <class>wca:webfolder</class>
                     <mandatory>true</mandatory>
                     <many>false</many>
                  </target>
               </association>
            </associations>
            <mandatory-aspects>
               <aspect>wcmwf:submission</aspect>
            </mandatory-aspects>
         </type>
         
         <type name="grhwf:submitCancelledNoApprovalTask">
            <parent>wcmwf:workflowTask</parent>
            <mandatory-aspects>
               <aspect>wcmwf:submission</aspect>
            </mandatory-aspects>
         </type>
   
         <type name="grhwf:submittedNoApprovalTask">
            <parent>wcmwf:workflowTask</parent>
            <mandatory-aspects>
               <aspect>wcmwf:submission</aspect>
            </mandatory-aspects>
         </type>
         
      </types>
   
      <aspects>
      
   </aspects>
</model>

processdefinition.xml :


<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="grhwf:GestionDeConge">
   <swimlane name="initiator" />

   <swimlane name="Chef">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>#{people.getGroup('GROUP_Chef')}</pooledactors>
      </assignment>
   </swimlane>
   
   <swimlane name="Resp">      
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>#{people.getGroup('GROUP_Resp')}</pooledactors>
      </assignment>
   </swimlane>

   <start-state name="start">
      <task name="grhwf:submitReviewTask" swimlane="initiator" />
      <transition name="" to="chef Review"></transition>
   </start-state>
  

   <task-node name="Resp Review">
      <task name="grhwf:RespReview" swimlane="Resp" />
      <transition to="Approved" name="approve"></transition>
      <transition to="end1" name="rejet Resp"></transition>
   </task-node>
  
   <task-node name="chef Review">

      <task name="grhwf:ChefReview" swimlane="Chef" />
      <transition to="Resp Review" name="approve"></transition>
      <transition to="end1" name="rejet Chef"></transition>
   </task-node>

   <node name="Approved">
      <transition to="end1" name="">
         <action></action>
      </transition>
   </node>

   <end-state name="end1"></end-state>
  
</process-definition>

et j'ai eu le meme probleme malgré que j'ai crus avoir compris d'ou vine le problème


Last command: help
Duration: 32ms
—–

org.alfresco.service.namespace.NamespaceException: Namespace prefix grhwf is not mapped to a namespace URI

Merci pour votre aide
jayjayecl
Active Member II

Re: deploiment de processdefinition

- Quelle version d'Alfresco ?
- Trace de logs complète ?

Juste au passage, dans votre modèle, vous définissez un nouveau prefixe grhwf, ou vous importez le modèle défini par le préfixe scwf.
Ainsi donc, ca ne fait pas de sens de commencer votre fichier xml par


<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="scwf:workflowmodel"
   xmlns="http://www.alfresco.org/model/dictionary/1.0">


Enfin, si vous n'arriviez pas a faire fonctionner le workflow scwf, il y a peu de chance de réussir à faire fonctionner un nouveau workflow qui s'appuie dessus.