AnsweredAssumed Answered

Bonjour je suis entrain de tester  la fonction motifyme...

Question asked by didier_6401 on Feb 9, 2007
Latest reply on Feb 19, 2007 by michaelh
Bonjour

je suis entrain de tester  la fonction motifyme mais c marche pas

mon code  le voila:

<swimlane name="initiator"/>

   <start-state name="debut">
      <task name="wf:debut" swimlane="initiator"/>
      <transition name="" to="chef"/>
   </start-state>

   <swimlane name="assignee">
      <assignment actor-id="#{bpm_assignee.properties['cm:userName']}"/>
   </swimlane>
  
   <task-node name="chef">
      <task name="wf:chef" swimlane="assignee"></task>
      <transition name="" to=" direction ">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
           <script>
              if (wf_notifyMe)
              {
                 var mail = actions.create("mail");
                 mail.parameters.to = initiator.properties["cm:email"];
                 mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;
                 mail.parameters.from = bpm_assignee.properties["cm:email"];
                 mail.parameters.text = "It's done";
                 mail.execute(bpm_package);
              }
           </script>
         </action>

</transition>
   </task-node>
  
   <task-node name="direction">
      <task name="wf:direction" swimlane="initiator"/>
      <transition name="" to="end"/>
   </task-node>
     
   <end-state name="end"/>
  
</process-definition>

code workflowmodel :

<type name="wf:debut">
         <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:chef">
         <parent>bpm:workflowTask</parent>   
      </type>

      <type name="wf:direction">
         <parent>bpm:workflowTask</parent>
      </type>

code web-client-config-properties.xml :
<config evaluator="node-type" condition="wf:debut" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" />
         <!–<show-property name="wf:notifyMe" />–>
         <separator name="sep2" display-label-id="user_filter_user" component-generator="HeaderSeparatorGenerator" />
         <show-association name="bpm:assignee" display-label-id="wf_adhoc_assignee" />
      </property-sheet>
   </config>
  
   <config evaluator="node-type" condition="wf:chef" replace="true">
      <property-sheet>
      </property-sheet>
   </config>
  
   <config evaluator="node-type" condition="wf:direction" replace="true">
      <property-sheet>
      </property-sheet>
   </config>

Merci par avance

Outcomes