Lorsque je veux ajouter une resource pour lancer...

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

Lorsque je veux ajouter une resource pour lancer...

Bonjour,

Lorsque je veux ajouter une resource pour lancer un workflow, je n'arrives pas à le faire. Du coup j'ai une erreur Smiley Frustrated

Please correct the errors below then click OK.
A system error happened during the operation: Mandatory task properties have not been provided: {http://www.alfresco.org/model/bpm/1.0}package


Je suppose que l'erreur est due à cette impossibilité…

Quelqu'un a-t-il une solution?

Merci d'avance.
11 Replies
abigot
Member II

Re: Lorsque je veux ajouter une resource pour lancer...

il faut regarder les logs du serveur pour avoir plus d'infos sur ton pb.
ldd
Member II

Re: Lorsque je veux ajouter une resource pour lancer...

voici mon erreur dans les logs Smiley Wink

 ERROR [org.alfresco.web.ui.common.Utils] A system error happened during the operation: Mandatory task properties have not been provided: {http://www.alfresco.org/model/bpm/1.0}package
org.alfresco.service.cmr.workflow.WorkflowException: Mandatory task properties have not been provided: {http://www.alfresco.org/model/bpm/1.0}package
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$19.doInJbpm(JBPMEngine.java:1034)
   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
   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.endTask(JBPMEngine.java:1017)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.endTask(WorkflowServiceImpl.java:347)
   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:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:219)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:165)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy22.endTask(Unknown Source)
   at org.alfresco.web.bean.workflow.ManageTaskDialog.transition(ManageTaskDialog.java:389)
   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:585)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
   at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
   at javax.faces.component.UICommand.broadcast(UICommand.java:106)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
   at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:105)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)
abigot
Member II

Re: Lorsque je veux ajouter une resource pour lancer...

cela n'est pas très parlant, peux-tu me joindre le source de ton jbpm designer et celui du wotrflow model
ldd
Member II

Re: Lorsque je veux ajouter une resource pour lancer...

J'ai trouvé quelque chose semblerait-il… http://forums.alfresco.com/viewtopic.php?p=26730
Il semblerait que ce soit un bug dans alfresco Smiley Frustrated
Mon erreur est quasi identique toutefois s'il y a une solution plus simple pour régler ce souci, elle est vraiement la bienvenue. Smiley Very Happy


Voiçi les sources que je test  (fournies par toi même sur le post  http://forum.alfresco-fr.org/viewtopic.php?id=1004) :

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

<model name="wf:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <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"/>
   </imports>

   <namespaces>
      <namespace uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/>
   </namespaces>
     
   <types>

      <!–                               –>
      <!–  Basic Review & Approve Tasks –>              
      <!–                               –>
     
      <type name="wf:submitReviewTask">
         <parent>bpm:startTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:submitConcurrentReviewTask">
         <parent>bpm:startTask</parent>
         <properties>
            <property name="wf:requiredApprovePercent">
                <type>d:int</type>
                <mandatory>true</mandatory>
                <default>50</default>
                <constraints>
                    <constraint type="MINMAX">
                        <parameter name="minValue"><value>1</value></parameter>
                        <parameter name="maxValue"><value>100</value></parameter>
                    </constraint>
                </constraints>
            </property>
         </properties>
      </type>

      <!–  Submit review to multiple people (explicit list) –>
      <type name="wf:submitParallelReviewTask">
         <parent>wf:submitConcurrentReviewTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignees</aspect>
         </mandatory-aspects>
      </type>

      <!–  Submit review to multiple people (as included in a group) –>
      <type name="wf:submitGroupReviewTask">
         <parent>wf:submitConcurrentReviewTask</parent>
         <mandatory-aspects>
            <aspect>bpm:groupAssignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:reviewTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
         </overrides>
      </type>

      <type name="wf:approvedTask">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:rejectedTask">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:rejectedParallelTask">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>wf:parallelReviewStats</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:approvedParallelTask">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>wf:parallelReviewStats</aspect>
         </mandatory-aspects>
      </type>


      <!–                               –>
      <!–  Adhoc Tasks –>              
      <!–                               –>
     
      <type name="wf:submitAdhocTask">
         <parent>bpm:startTask</parent>
         <properties>
            <property name="wf:notifyMe">
               <type>d:boolean</type>
               <default>false</default>
            </property>
         </properties>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:adhocTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageActionGroup">
               <default>add_package_item_actions</default>
            </property>
            <property name="bpm:packageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
         </overrides>
      </type>

      <type name="wf:completedAdhocTask">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>
  
     <!–                               –>
      <!–  Contrat client Tasks –>              
      <!–                               –>
     
      <type name="wf:EmissionvalidationCC">
         <parent>bpm:startTask</parent>
         <mandatory-aspects>
            <aspect>wf:ValidationContratStats</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:ValidationATC">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>wf:ValidationContratStats</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:ValidationUG">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>wf:ValidationContratStats</aspect>
         </mandatory-aspects>
      </type>
   </types>
  
   <aspects>
  
      <aspect name="wf:parallelReviewStats">
         <properties>
            <property name="wf:reviewerCount">
               <type>d:int</type>
            </property>
            <property name="wf:requiredPercent">
               <type>d:int</type>
            </property>
            <property name="wf:approveCount">
               <type>d:int</type>
            </property>
            <property name="wf:actualPercent">
               <type>d:int</type>
            </property>
         </properties>
      </aspect>
  
      <aspect name="wf:ValidationContratStats">
         <properties>
            <property name="wf:DecisionATC">
               <type>d:boolean</type>
            </property>
            <property name="wf:DecisionUG">
               <type>d:boolean</type>
            </property>
         </properties>
      </aspect>
   </aspects>
</model>
jBpm designer :

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

<process-definition
  xmlns="urn:jbpm.org:jpdl-3.2"  name="ValidationContratClient">
   <swimlane name="assignee">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>GROUP_GRP_CONTRAT_ASSUREUR_ATC</pooledactors>
      </assignment>
   </swimlane>
   <swimlane name="initiator"></swimlane>
   <swimlane name="assigneeUG">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>GROUP_GRP_CONTRAT_ASSUREUR_UG</pooledactors>
      </assignment>
   </swimlane>
<!–  ********************************************************************** –>
<!–           tache start                                                   –>
<!– *********************************************************************** –>  
   <start-state name="start">
      <task name="wf:EmissionvalidationCC" swimlane="initiator"></task>
      <transition name="" to="Validation par ATC CC">
      </transition>
   </start-state>
  
  
<!–  ********************************************************************** –>
<!–           tache validation par ATC                                      –>
<!– *********************************************************************** –>  
   <task-node name="Validation par ATC CC">
      <task name="wf:ValidationATC" swimlane="assignee">
         <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>
      </task>
      <transition name="" to="Validation par UG CC"></transition>
   </task-node>
  
<!–  ********************************************************************** –>
<!–           tache validation par UG                                       –>
<!– *********************************************************************** –>  
  
  
   <task-node name="Validation par UG CC">
      <task name="wf:ValidationUG" swimlane="assigneeUG">
          <event type="task-end">
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
              <script>
            <expression>
            if (taskInstance.actorId == null)
                taskInstance.actorId = person.properties.userName;
            var test = bpm_package;
            var child = test.children[0];
            child.properties["hn:Asp-Prop-isActive"] = true;
            child.properties["hn:Asp-Prop-validate"] = new Date();
           
            child.save();
            </expression>
              </script>
            </action>
          </event>
      </task>
      <transition name="" to="CC valide"></transition>
   </task-node>
  
<!–  ********************************************************************** –>
<!–           tache end                                                   –>
<!– *********************************************************************** –>  
  
   <end-state name="CC valide">
           <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>
   </end-state>
</process-definition>
Mais l'ennui c'est que j'ai la même erreur avec les deux workflow de tests intégrés à Alfresco. A savoir : "Review & Approve" et "Adhoc Task"

Merci de ton aide.
abigot
Member II

Re: Lorsque je veux ajouter une resource pour lancer...

as-tu créer les groupes utilisateurs qui sont dans les sources sans le GROUP_ devant sous cette forme:

GRP_CONTRAT_ASSUREUR_UG
GRP_CONTRAT_ASSUREUR_ATC

avec des users
ldd
Member II

Re: Lorsque je veux ajouter une resource pour lancer...

Même lorsque j'assigne le Workflow à un de user des 2 groupes, le problème persiste Smiley Sad
abigot
Member II

Re: Lorsque je veux ajouter une resource pour lancer...

comment fais-tu pour lancer le worklow par l'interface web sur un document donné ou par une règle ?
Chez moi cela fonctionne avec une 2.1 community
ldd
Member II

Re: Lorsque je veux ajouter une resource pour lancer...

Je le lance via la console.

1) use definition jbpm$XX
2) var bpm:assignee* person xxxxx
3) start bpm:assignee

Ensuite j'ai la tâche pour mon user et je veux le lancer via l'interface d'alfresco dans l'écran "Manage Task" mais j'ai mon erreur lorsque je veux faire "Task Done". Que j'essaie d'ajouter une resource ou pas.

Chez moi cela fonctionne avec une 2.1 community
C'est ce qu'il semble être indiqué dans le post : http://forums.alfresco.com/viewtopic.php?p=26730
Mais j'utilise en ce moment la version 2.0 car si j'ai bien compris, la version 2.1 est encore en développement… Et ce que je désir c'est d'utiliser une version stable pour l'entreprise dans laquelle je travaille…

Merci
abigot
Member II

Re: Lorsque je veux ajouter une resource pour lancer...

il me semble que tu devrais d'abord le lancer via l'interface web classique en sélectionnant un document puis en cliquant sut la fleche en bas a droite puis start advanced workflow, l'interface te permet ensuite de saisir des infos complémentaires car les workflow livrés avec alfresco fonctionne même en 2.0.

Ensuite si ça marche je t'explique pour le lancer depuis une regle lorsque tu déposes un doc dans un espace.

Mon worklow est basique, il permet juste de faire valider par deux personnes différentes un docmuent et de le rendre actif sur un de ces aspects avec la date de validation. Les cas de refus ne sont pas encore traites.