cancel
Showing results for 
Search instead for 
Did you mean: 

Button add person/group don' t appear in form of workflow

dorra87
Champ in-the-making
Champ in-the-making
Hi all,
the button of select group or assignee in the list of workflow dispear when I add my custom workflow to the list.But in the custom workflow I have this button.
this is the code :
C:\Alfresco\tomcat\shared\classes\alfresco\extension\workflows\activiti\demCCT.bpmn20.xml
<?xml version="1.0" encoding="UTF-8" ?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn"
   xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
   xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema"
   expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://alfresco.org">

    <process id="activitiDemCCT" name="Demande d'Elaboration du cahier des charges techniques">

        <startEvent id="start"
            activiti:formKey="wf:submitGroupReviewTaskCCT" />
           
        <sequenceFlow id='flow1'
            sourceRef='start'
            targetRef='reviewTaskCCT'>
            <!– TODO: Once multiInstanceLoopCharacteristics support using expression as loopDataInputRef, remove 'wf_groupMembers' variable  –>
            <extensionElements>
                <activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
                 <activiti:field name="script">
                        <activiti:string>
                           var members = people.getMembers(bpm_groupAssignee);
                           var memberNames = new java.util.ArrayList();
                          
                           for(var i in members)
                           {
                               memberNames.add(members[i].properties.userName);
                           }
                             execution.setVariable('wf_groupMembers', memberNames);
                           execution.setVariable('wf_reviewerCount', memberNames.size());
                        </activiti:string>
                     </activiti:field>
               </activiti:executionListener>
            </extensionElements>
        </sequenceFlow>

        <userTask id="reviewTaskCCT" name="Review Task"
            activiti:formKey="wf:activitiReviewTaskCCT">
           <extensionElements>
               <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
                        if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                        if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
           </extensionElements>
          
           <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${reviewAssignee}</formalExpression>
                </resourceAssignmentExpression>
           </humanPerformer>
          
           <!– For each assignee, task is created –>
           <multiInstanceLoopCharacteristics isSequential="false">
                <loopDataInputRef>wf_groupMembers</loopDataInputRef>
                <inputDataItem name="reviewAssignee" />
           </multiInstanceLoopCharacteristics>
        </userTask>

        <sequenceFlow id='flow2'
           sourceRef='reviewTaskCCT'
            targetRef='reviewDecisionCCT' />

        <exclusiveGateway  id="reviewDecisionCCT" name="Review Decision" />

        <sequenceFlow id='flow3' sourceRef='reviewDecisionCCT' targetRef='approvedCCT' >
           
        </sequenceFlow>

        <sequenceFlow id='flow4'
        sourceRef='reviewDecisionCCT'
            targetRef='rejectedCCT' />

       <userTask id="approvedCCT" name="Document Approved"
            activiti:formKey="wf:approvedParallelTaskCCT" >
            <documentation>
                The document was reviewed and approved.
            </documentation>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>
       
        <userTask id="rejectedCCT" name="Document Rejected"
            activiti:formKey="wf:rejectedParallelTaskCCT" >
            <documentation>
                The document was reviewed and rejected.
            </documentation>
            <extensionElements>
               <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
                        if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                        if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
                       
                        // Set parallel review params on task, to be kept in history
                      
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
            </extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>

        <sequenceFlow id='flow5' sourceRef='approvedCCT'
            targetRef='end' />

        <sequenceFlow id='flow6' sourceRef='rejectedCCT'
            targetRef='end' />

        <endEvent id="end" />

    </process>

   <!– Graphical representaion of diagram –>
   <bpmndi:BPMNDiagram id="BPMNDiagram_activitiDemCCT">
      <bpmndi:BPMNPlane bpmnElement="activitiDemCCT"
         id="BPMNPlane_activitiDemCCT">
         <bpmndi:BPMNShape bpmnElement="start"
            id="BPMNShape_start">
            <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="reviewTaskCCT"
            id="BPMNShape_reviewTaskCCT">
            <omgdc:Bounds height="55" width="105" x="125"
               y="190"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="reviewDecisionCCT"
            id="BPMNShape_reviewDecisionCCT">
            <omgdc:Bounds height="40" width="40" x="290" y="197"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="approvedCCT"
            id="BPMNShape_approvedCCT">
            <omgdc:Bounds height="55" width="105" x="390"
               y="97"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="rejectedCCT"
            id="BPMNShape_rejectedCCT">
            <omgdc:Bounds height="55" width="105" x="390"
               y="297"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
            <omgdc:Bounds height="35" width="35" x="555" y="307"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
            <omgdi:waypoint x="65" y="217"></omgdi:waypoint>
            <omgdi:waypoint x="125" y="217"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
            <omgdi:waypoint x="230" y="217"></omgdi:waypoint>
            <omgdi:waypoint x="290" y="217"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
            <omgdi:waypoint x="310" y="197"></omgdi:waypoint>
            <omgdi:waypoint x="310" y="124"></omgdi:waypoint>
            <omgdi:waypoint x="390" y="124"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
            <omgdi:waypoint x="310" y="237"></omgdi:waypoint>
            <omgdi:waypoint x="310" y="324"></omgdi:waypoint>
            <omgdi:waypoint x="390" y="324"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
            <omgdi:waypoint x="495" y="124"></omgdi:waypoint>
            <omgdi:waypoint x="572" y="124"></omgdi:waypoint>
            <omgdi:waypoint x="572" y="307"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
            <omgdi:waypoint x="495" y="324"></omgdi:waypoint>
            <omgdi:waypoint x="555" y="324"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
      </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
</definitions>
C:\Alfresco\tomcat\shared\classes\alfresco\extension\model\demCCTModel.xml
<?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>
    <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 (as included in a group) –>
      <type name="wf:submitGroupReviewTaskCCT">
         <parent>wf:submitConcurrentReviewTask</parent>
         <mandatory-aspects>
            <aspect>bpm:groupAssignee</aspect>
         <aspect>wf:marketInfo</aspect>
         <aspect>wf:projectInfo</aspect>
         </mandatory-aspects>
      </type>

        <type name="wf:activitiReviewTaskCCT">
            <parent>bpm:activitiOutcomeTask</parent>
            <properties>
                <property name="wf:reviewOutcome">
                    <type>d:text</type>
                    <default>Reject</default>
                    <constraints>
                        <constraint name="wf:reviewOutcomeOptions" type="LIST">
                            <parameter name="allowedValues">
                                <list>
                                    <value>Approve</value>
                                    <value>Reject</value>
                                </list>
                            </parameter>
                        </constraint>
                    </constraints>
                </property>
            </properties>
            <overrides>
                <property name="bpm:packageItemActionGroup">
                    <default>edit_package_item_actions</default>
                </property>
                <property name="bpm:outcomePropertyName">
                    <default>{http://www.alfresco.org/model/workflow/1.0}reviewOutcome</default>
                </property>
            </overrides>
         <mandatory-aspects>
         <aspect>wf:marketInfo</aspect>
         <aspect>wf:projectInfo</aspect>
         </mandatory-aspects>
        </type>


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

      <type name="wf:approvedParallelTaskCCT">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>wf:parallelReviewStats</aspect>
         </mandatory-aspects>
      </type>
   </types>
  
   <aspects>
     <aspect name="wf:marketInfo">
         <properties>
            <property name="wf:marketName">
               <title>Marché</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
      <aspect name="wf:projectInfo">
         <properties>
            <property name="wf:projectName">
              <title>Projet</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
      <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>
   </aspects>

</model>
C:\Alfresco\tomcat\shared\classes\alfresco\extension\messages\demCCT-messages_fr.xml

C:\Alfresco\tomcat\shared\classes\alfresco\web-extension\share-config-custom.xml
<alfresco-config>

<!– Repository Library config section –>
<config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
  <!–
    Whether the link to the Repository Library appears in the header component or not.
  –>
  <visible>true</visible>
 
</config>
   
   <!–workflow demande des cahiers des clauses techniques–>
   <config evaluator="string-compare" condition="activiti$activitiDemCCT">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription"/>
               <show id="bpm:workflowDueDate"/>
               <show id="bpm:workflowPriority"/>
               <show id="wf:projectName"/>
               <show id="wf:marketName"/>
               <show id="bpm:groupAssignee"/>
               <show id="bpm:sendEMailNotifications"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl"/>
               <set id="assignee" appearance="title" label-id="workflow.set.assignee"/>
               <set id="other" appearance="title" label-id="workflow.set.other"/>
               <field id="bpm:workflowDescription" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl">
                     <control-param name="style">width: 95%</control-param>
                  </control>
               </field>
               <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info"/>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="wf:projectName" set="info">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="wf:marketName" set="info">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="bpm:groupAssignee" label-id="workflow.field.review_group" set="assignee"/>
               <field id="bpm:sendEMailNotifications" set="other">
                  <control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl"/>
               </field>
            </appearance>
         </form>
      </forms>
   </config>
   <config evaluator="task-type" condition="wf:submitGroupReviewTaskCCT">
      <forms>
         <form id="workflow-details">
            <field-visibility>
               <show id="bpm:groupAssignee"/>
               <show id="bpm:sendEMailNotifications"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.workflow.more_info"/>
               <set id="items" appearance="title" label-id="workflow.set.items"/>
               <field id="bpm:groupAssignee" label-id="workflow.field.review_group"/>
            </appearance>
         </form>
         <form>
            <field-visibility>
               <show id="message"/>
               <show id="taskOwner"/>
               <show id="bpm:workflowPriority"/>
               <show id="bpm:workflowDueDate"/>
               <show id="bpm:taskId"/>
               <show id="bpm:status"/>
               <show id="wf:projectName"/>
               <show id="wf:marketName"/> 
               <show id="bpm:sendEMailNotifications"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl"/>
               <set id="progress" appearance="title" label-id="workflow.set.task.progress"/>
               <set id="other" appearance="title" label-id="workflow.set.other"/>
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="taskOwner" set="info"/>
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="bpm:workflowDueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:status" set="progress"/>
               <field id="wf:projectName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="wf:marketName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:sendEMailNotifications" set="other"/>
            </appearance>
         </form>
      </forms>
   </config>
      <config evaluator="task-type" condition="wf:activitiReviewTaskCCT">
      <forms>
         <form>
            <field-visibility>
               <show id="message"/>
               <show id="taskOwner"/>
               <show id="bpm:priority"/>
               <show id="bpm:dueDate"/>
               <show id="bpm:taskId"/>
               <show id="bpm:status"/>
               <show id="wf:projectName"/>
               <show id="wf:marketName"/> 
               <show id="bpm:comment"/>
               <show id="wf:reviewOutcome"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl"/>
               <set id="progress" appearance="title" label-id="workflow.set.task.progress"/>
               <set id="response" appearance="title" label-id="workflow.set.response"/>
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="taskOwner" set="info"/>
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="wf:projectName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="wf:marketName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:status" set="progress"/>
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl"/>
               </field>
               <field id="wf:reviewOutcome" label-id="workflow.field.outcome" set="response">
                  <control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl"/>
               </field>
            </appearance>
         </form>
      </forms>
   </config>
   <config evaluator="task-type" condition="wf:approvedParallelTaskCCT">
      <forms>
         <form>
            <field-visibility>
               <show id="message"/>
               <show id="taskOwner"/>
               <show id="bpm:priority"/>
               <show id="bpm:dueDate"/>
               <show id="bpm:taskId"/>
               <show id="bpm:status"/>
               <show id="bpm:comment"/>
               <show id="transitions"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl"/>
               <set id="progress" appearance="title" label-id="workflow.set.task.progress"/>
               <set id="response" appearance="title" label-id="workflow.set.response"/>
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="taskOwner" set="info"/>
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>   
               <field id="bpm:status" set="progress"/>
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl"/>
               </field>
               <field id="transitions" set="response"/>
            </appearance>
         </form>
      </forms>
   </config>
   <config evaluator="task-type" condition="wf:rejectedParallelTaskCCT">
      <forms>
         <form>
            <field-visibility>
               <show id="message"/>
               <show id="taskOwner"/>
               <show id="bpm:priority"/>
               <show id="bpm:dueDate"/>
               <show id="bpm:taskId"/>
               <show id="bpm:status"/>
               <show id="bpm:comment"/>
               <show id="transitions"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl"/>
               <set id="progress" appearance="title" label-id="workflow.set.task.progress"/>
               <set id="response" appearance="title" label-id="workflow.set.response"/>
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="taskOwner" set="info"/>
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:status" set="progress"/>
               <field id="packageItems" set="items"/>
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl"/>
               </field>
               <field id="transitions" set="response"/>
            </appearance>
         </form>
      </forms>
   </config>
   
<config evaluator="string-compare" condition="Remote">
  <remote>
    <endpoint>
      <id>alfresco-noauth</id>
      <name>Alfresco - unauthenticated access</name>
      <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
      <connector-id>alfresco</connector-id>
      <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
      <identity>none</identity>
    </endpoint>

    <endpoint>
      <id>alfresco</id>
      <name>Alfresco - user access</name>
      <description>Access to Alfresco Repository WebScripts that require user authentication</description>
      <connector-id>alfresco</connector-id>
      <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
      <identity>user</identity>
    </endpoint>

    <endpoint>
      <id>alfresco-feed</id>
      <name>Alfresco Feed</name>
      <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
      <connector-id>http</connector-id>
      <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
      <basic-auth>true</basic-auth>
      <identity>user</identity>
    </endpoint>
  </remote>
</config>
</alfresco-config>
C:\Alfresco\tomcat\shared\classes\alfresco\extension\dao-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="dao.workflowBootstrap" parent="workflowDeployer">
      <property name="workflowDefinitions">
         <list>
            <props>
               <prop key="engineId">activiti</prop>
               <prop key="location">alfresco/extension/workflows/activiti/demCCT.bpmn20.xml</prop>
               <prop key="mimetype">text/xml</prop>
               <prop key="redeploy">false</prop>
            </props>
         </list>
      </property>
      <property name="models">
         <list>
             <value>alfresco/extension/model/demCCTModel.xml</value>
         </list>
      </property>
      <property name="labels">
         <list>
             <value>alfresco/extension/messages/demCCT-messages_fr</value>
         </list>
      </property>
   </bean>
</beans>
I add the workflows forms also to
C:\Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\share-workflow-form-config.xml
I want to have the button of select group or person in all the workflow of the list.
Thanks
9 REPLIES 9

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
Hi,

If you check your workflow model, the wf:submitGroupReviewTaskCCT extends from wf:submitConcurrentReviewTask which has no group or user assignee aspect.

You have two options:
    as you expect to add a group you can either extend from wf:submitGroupReviewTask
    add bpm:groupAssignee as a mandatory aspect to your type
Regards,
Adei

dorra87
Champ in-the-making
Champ in-the-making
I did like y say,the button appear only in the workflow demCCT but the other workflow of alfresco it disappear.
this is the code
demCCTModel.xml
<?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>
    <type name="wf:submitConcurrentReviewTask">
         <parent>bpm:startTask</parent>
        <mandatory-aspects>
            <aspect>bpm:groupAssignee</aspect>
         </mandatory-aspects>
      </type>
      <!–  Submit review to multiple people (as included in a group) –>
      <type name="wf:submitGroupReviewTaskCCT">
         <parent>wf:submitConcurrentReviewTask</parent>
         <mandatory-aspects>
            <aspect>bpm:groupAssignee</aspect>
         <aspect>wf:marketInfo</aspect>
         <aspect>wf:projectInfo</aspect>
         </mandatory-aspects>
      </type>

        <type name="wf:activitiReviewTaskCCT">
            <parent>bpm:activitiOutcomeTask</parent>
            <properties>
                <property name="wf:reviewOutcome">
                    <type>d:text</type>
                    <default>Reject</default>
                    <constraints>
                        <constraint name="wf:reviewOutcomeOptions" type="LIST">
                            <parameter name="allowedValues">
                                <list>
                                    <value>Approve</value>
                                    <value>Reject</value>
                                </list>
                            </parameter>
                        </constraint>
                    </constraints>
                </property>
            </properties>
            <overrides>
                <property name="bpm:packageItemActionGroup">
                    <default>edit_package_item_actions</default>
                </property>
                <property name="bpm:outcomePropertyName">
                    <default>{http://www.alfresco.org/model/workflow/1.0}reviewOutcome</default>
                </property>
            </overrides>
         <mandatory-aspects>
         <aspect>wf:marketInfo</aspect>
         <aspect>wf:projectInfo</aspect>
         </mandatory-aspects>
        </type>


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

      <type name="wf:approvedParallelTaskCCT">
         <parent>bpm:workflowTask</parent>
      
      </type>
   </types>
  
   <aspects>
     <aspect name="wf:marketInfo">
         <properties>
            <property name="wf:marketName">
               <title>Marché</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
      <aspect name="wf:projectInfo">
         <properties>
            <property name="wf:projectName">
              <title>Projet</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
   </aspects>

</model>
demCCT.bpmn20.xml
<?xml version="1.0" encoding="UTF-8" ?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn"
   xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
   xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema"
   expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://alfresco.org">

    <process id="activitiDemCCT" name="Demande d'Elaboration du cahier des charges techniques">

        <startEvent id="start"
            activiti:formKey="wf:submitGroupReviewTaskCCT" />
           
        <sequenceFlow id='flow1'
            sourceRef='start'
            targetRef='reviewTaskCCT'>
            <!– TODO: Once multiInstanceLoopCharacteristics support using expression as loopDataInputRef, remove 'wf_groupMembers' variable  –>
            <extensionElements>
                <activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
                 <activiti:field name="script">
                        <activiti:string>
                           var members = people.getMembers(bpm_groupAssignee);
                           var memberNames = new java.util.ArrayList();
                          
                           for(var i in members)
                           {
                               memberNames.add(members[i].properties.userName);
                           }
                             execution.setVariable('wf_groupMembers', memberNames);
                           execution.setVariable('wf_reviewerCount', memberNames.size());
                        </activiti:string>
                     </activiti:field>
               </activiti:executionListener>
            </extensionElements>
        </sequenceFlow>

        <userTask id="reviewTaskCCT" name="Review Task"
            activiti:formKey="wf:activitiReviewTaskCCT">
           <extensionElements>
               <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
                        if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                        if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
           </extensionElements>
          
           <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${reviewAssignee}</formalExpression>
                </resourceAssignmentExpression>
           </humanPerformer>
          
           <!– For each assignee, task is created –>
           <multiInstanceLoopCharacteristics isSequential="false">
                <loopDataInputRef>wf_groupMembers</loopDataInputRef>
                <inputDataItem name="reviewAssignee" />
           </multiInstanceLoopCharacteristics>
        </userTask>

        <sequenceFlow id='flow2'
           sourceRef='reviewTaskCCT'
            targetRef='reviewDecisionCCT' />

        <exclusiveGateway  id="reviewDecisionCCT" name="Review Decision" />

        <sequenceFlow id='flow3' sourceRef='reviewDecisionCCT' targetRef='approvedCCT' >
           
        </sequenceFlow>

        <sequenceFlow id='flow4'
        sourceRef='reviewDecisionCCT'
            targetRef='rejectedCCT' />

       <userTask id="approvedCCT" name="Document Approved"
            activiti:formKey="wf:approvedParallelTaskCCT" >
            <documentation>
                The document was reviewed and approved.
            </documentation>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>
       
        <userTask id="rejectedCCT" name="Document Rejected"
            activiti:formKey="wf:rejectedParallelTaskCCT" >
            <documentation>
                The document was reviewed and rejected.
            </documentation>
            <extensionElements>
               <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
                        if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                        if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
                       
                        // Set parallel review params on task, to be kept in history
                      
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
            </extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>

        <sequenceFlow id='flow5' sourceRef='approvedCCT'
            targetRef='end' />

        <sequenceFlow id='flow6' sourceRef='rejectedCCT'
            targetRef='end' />

        <endEvent id="end" />

    </process>

   <!– Graphical representaion of diagram –>
   <bpmndi:BPMNDiagram id="BPMNDiagram_activitiDemCCT">
      <bpmndi:BPMNPlane bpmnElement="activitiDemCCT"
         id="BPMNPlane_activitiDemCCT">
         <bpmndi:BPMNShape bpmnElement="start"
            id="BPMNShape_start">
            <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="reviewTaskCCT"
            id="BPMNShape_reviewTaskCCT">
            <omgdc:Bounds height="55" width="105" x="125"
               y="190"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="reviewDecisionCCT"
            id="BPMNShape_reviewDecisionCCT">
            <omgdc:Bounds height="40" width="40" x="290" y="197"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="approvedCCT"
            id="BPMNShape_approvedCCT">
            <omgdc:Bounds height="55" width="105" x="390"
               y="97"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="rejectedCCT"
            id="BPMNShape_rejectedCCT">
            <omgdc:Bounds height="55" width="105" x="390"
               y="297"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
            <omgdc:Bounds height="35" width="35" x="555" y="307"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
            <omgdi:waypoint x="65" y="217"></omgdi:waypoint>
            <omgdi:waypoint x="125" y="217"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
            <omgdi:waypoint x="230" y="217"></omgdi:waypoint>
            <omgdi:waypoint x="290" y="217"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
            <omgdi:waypoint x="310" y="197"></omgdi:waypoint>
            <omgdi:waypoint x="310" y="124"></omgdi:waypoint>
            <omgdi:waypoint x="390" y="124"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
            <omgdi:waypoint x="310" y="237"></omgdi:waypoint>
            <omgdi:waypoint x="310" y="324"></omgdi:waypoint>
            <omgdi:waypoint x="390" y="324"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
            <omgdi:waypoint x="495" y="124"></omgdi:waypoint>
            <omgdi:waypoint x="572" y="124"></omgdi:waypoint>
            <omgdi:waypoint x="572" y="307"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
            <omgdi:waypoint x="495" y="324"></omgdi:waypoint>
            <omgdi:waypoint x="555" y="324"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
      </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
</definitions>
share-config-custom.xml
<config evaluator="string-compare" condition="activiti$activitiDemCCT">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription"/>
               <show id="bpm:workflowDueDate"/>
               <show id="bpm:workflowPriority"/>
               <show id="wf:projectName"/>
               <show id="wf:marketName"/>
               <show id="bpm:groupAssignee"/>
               <show id="bpm:sendEMailNotifications"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl"/>
               <set id="assignee" appearance="title" label-id="workflow.set.assignee"/>
               <set id="other" appearance="title" label-id="workflow.set.other"/>
               <field id="bpm:workflowDescription" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl">
                     <control-param name="style">width: 95%</control-param>
                  </control>
               </field>
               <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info"/>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="wf:projectName" set="info">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="wf:marketName" set="info">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="bpm:groupAssignee" label-id="workflow.field.review_group" set="assignee"/>
               <field id="bpm:sendEMailNotifications" set="other">
                  <control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl"/>
               </field>
            </appearance>
         </form>
      </forms>
   </config>
   <config evaluator="task-type" condition="wf:submitGroupReviewTaskCCT">
      <forms>
         <form id="workflow-details">
            <field-visibility>
               <show id="bpm:groupAssignee"/>
               <show id="bpm:sendEMailNotifications"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.workflow.more_info"/>
               <set id="items" appearance="title" label-id="workflow.set.items"/>
               <field id="bpm:groupAssignee" label-id="workflow.field.review_group"/>
            </appearance>
         </form>
         <form>
            <field-visibility>
               <show id="message"/>
               <show id="taskOwner"/>
               <show id="bpm:workflowPriority"/>
               <show id="bpm:workflowDueDate"/>
               <show id="bpm:taskId"/>
               <show id="bpm:status"/>
               <show id="wf:projectName"/>
               <show id="wf:marketName"/> 
               <show id="bpm:sendEMailNotifications"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl"/>
               <set id="progress" appearance="title" label-id="workflow.set.task.progress"/>
               <set id="other" appearance="title" label-id="workflow.set.other"/>
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="taskOwner" set="info"/>
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="bpm:workflowDueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:status" set="progress"/>
               <field id="wf:projectName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="wf:marketName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:sendEMailNotifications" set="other"/>
            </appearance>
         </form>
      </forms>
   </config>
      <config evaluator="task-type" condition="wf:activitiReviewTaskCCT">
      <forms>
         <form>
            <field-visibility>
               <show id="message"/>
               <show id="taskOwner"/>
               <show id="bpm:priority"/>
               <show id="bpm:dueDate"/>
               <show id="bpm:taskId"/>
               <show id="bpm:status"/>
               <show id="wf:projectName"/>
               <show id="wf:marketName"/> 
               <show id="bpm:comment"/>
               <show id="wf:reviewOutcome"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl"/>
               <set id="progress" appearance="title" label-id="workflow.set.task.progress"/>
               <set id="response" appearance="title" label-id="workflow.set.response"/>
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="taskOwner" set="info"/>
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="wf:projectName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="wf:marketName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:status" set="progress"/>
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl"/>
               </field>
               <field id="wf:reviewOutcome" label-id="workflow.field.outcome" set="response">
                  <control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl"/>
               </field>
            </appearance>
         </form>
      </forms>
   </config>
   <config evaluator="task-type" condition="wf:approvedParallelTaskCCT">
      <forms>
         <form>
            <field-visibility>
               <show id="message"/>
               <show id="taskOwner"/>
               <show id="bpm:priority"/>
               <show id="bpm:dueDate"/>
               <show id="bpm:taskId"/>
               <show id="bpm:status"/>
               <show id="bpm:comment"/>
               <show id="transitions"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl"/>
               <set id="progress" appearance="title" label-id="workflow.set.task.progress"/>
               <set id="response" appearance="title" label-id="workflow.set.response"/>
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="taskOwner" set="info"/>
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>   
               <field id="bpm:status" set="progress"/>
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl"/>
               </field>
               <field id="transitions" set="response"/>
            </appearance>
         </form>
      </forms>
   </config>
   <config evaluator="task-type" condition="wf:rejectedParallelTaskCCT">
      <forms>
         <form>
            <field-visibility>
               <show id="message"/>
               <show id="taskOwner"/>
               <show id="bpm:priority"/>
               <show id="bpm:dueDate"/>
               <show id="bpm:taskId"/>
               <show id="bpm:status"/>
               <show id="bpm:comment"/>
               <show id="transitions"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl"/>
               <set id="progress" appearance="title" label-id="workflow.set.task.progress"/>
               <set id="response" appearance="title" label-id="workflow.set.response"/>
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="taskOwner" set="info"/>
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:status" set="progress"/>
               <field id="packageItems" set="items"/>
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl"/>
               </field>
               <field id="transitions" set="response"/>
            </appearance>
         </form>
      </forms>
   </config>
and I put the same code as share-config-custom in share-workflow-form-config.xml.
thanks

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
Which other workflow?

Sorry I'm confused…

dorra87
Champ in-the-making
Champ in-the-making
Alfresco default workflows:like adhoc,parallel review we found in the list of workflows.
I found when I add the dao-context.xml file the buttons in these workflows despear and when I remove the button apprear in these default workflow.
I don't understund why it happend.
Thanks a lot for yr reply

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
Oh,

The thing is, you're defining the http://www.alfresco.org/model/workflow/1.0 model, which alfresco already defines.

What you should do is create your own one. Example for decCCTModel.xml:


<?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"/>
      <import uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/>
   </imports>
   <namespaces>
      <namespace uri="http://www.alfresco.org/model/decCCT/1.0" prefix="cct"/>
   </namespaces>  
   <types>
      <!–  Submit review to multiple people (as included in a group) –>
      <type name="cct:submitGroupReviewTaskCCT">
         <parent>wf:submitConcurrentReviewTask</parent>
         <mandatory-aspects>
            <aspect>bpm:groupAssignee</aspect>
         <aspect>wf:marketInfo</aspect>
         <aspect>wf:projectInfo</aspect>
         </mandatory-aspects>
      </type>

        <type name="cct:activitiReviewTaskCCT">
            <parent>wf:activitiReviewTask</parent>
         <mandatory-aspects>
         <aspect>cct:marketInfo</aspect>
         <aspect>cct:projectInfo</aspect>
         </mandatory-aspects>
        </type>
   </types>
  
   <aspects>
     <aspect name="cct:marketInfo">
         <properties>
            <property name="cct:marketName">
               <title>Marché</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
      <aspect name="cct:projectInfo">
         <properties>
            <property name="cct:projectName">
              <title>Projet</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
   </aspects>

</model>

Then you change the demCCT.bpmn20.xml to match your new model:

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

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn"
   xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
   xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema"
   expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://alfresco.org">

    <process id="activitiDemCCT" name="Demande d'Elaboration du cahier des charges techniques">

        <startEvent id="start"
            activiti:formKey="cct:submitGroupReviewTaskCCT" />
          
        <sequenceFlow id='flow1'
            sourceRef='start'
            targetRef='reviewTaskCCT'>
            <!– TODO: Once multiInstanceLoopCharacteristics support using expression as loopDataInputRef, remove 'wf_groupMembers' variable  –>
            <extensionElements>
                <activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
                 <activiti:field name="script">
                        <activiti:string>
                           var members = people.getMembers(bpm_groupAssignee);
                           var memberNames = new java.util.ArrayList();
                          
                           for(var i in members)
                           {
                               memberNames.add(members[i].properties.userName);
                           }
                             execution.setVariable('wf_groupMembers', memberNames);
                           execution.setVariable('wf_reviewerCount', memberNames.size());
                        </activiti:string>
                     </activiti:field>
               </activiti:executionListener>
            </extensionElements>
        </sequenceFlow>

        <userTask id="reviewTaskCCT" name="Review Task"
            activiti:formKey="cct:activitiReviewTaskCCT">
           <extensionElements>
               <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
                        if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                        if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
           </extensionElements>
          
           <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${reviewAssignee}</formalExpression>
                </resourceAssignmentExpression>
           </humanPerformer>
          
           <!– For each assignee, task is created –>
           <multiInstanceLoopCharacteristics isSequential="false">
                <loopDataInputRef>wf_groupMembers</loopDataInputRef>
                <inputDataItem name="reviewAssignee" />
           </multiInstanceLoopCharacteristics>
        </userTask>

        <sequenceFlow id='flow2'
           sourceRef='reviewTaskCCT'
            targetRef='reviewDecisionCCT' />

        <exclusiveGateway  id="reviewDecisionCCT" name="Review Decision" />

        <sequenceFlow id='flow3' sourceRef='reviewDecisionCCT' targetRef='approvedCCT' >
           
        </sequenceFlow>

        <sequenceFlow id='flow4'
        sourceRef='reviewDecisionCCT'
            targetRef='rejectedCCT' />

       <userTask id="approvedCCT" name="Document Approved"
            activiti:formKey="wf:approvedParallelTask" >
            <documentation>
                The document was reviewed and approved.
            </documentation>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>
       
        <userTask id="rejectedCCT" name="Document Rejected"
            activiti:formKey="wf:rejectedParallelTask" >
            <documentation>
                The document was reviewed and rejected.
            </documentation>
            <extensionElements>
               <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
                        if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                        if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
                       
                        // Set parallel review params on task, to be kept in history
                      
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
            </extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>

        <sequenceFlow id='flow5' sourceRef='approvedCCT'
            targetRef='end' />

        <sequenceFlow id='flow6' sourceRef='rejectedCCT'
            targetRef='end' />

        <endEvent id="end" />

    </process>

   <!– Graphical representaion of diagram –>
   <bpmndi:BPMNDiagram id="BPMNDiagram_activitiDemCCT">
      <bpmndi:BPMNPlane bpmnElement="activitiDemCCT"
         id="BPMNPlane_activitiDemCCT">
         <bpmndi:BPMNShape bpmnElement="start"
            id="BPMNShape_start">
            <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="reviewTaskCCT"
            id="BPMNShape_reviewTaskCCT">
            <omgdc:Bounds height="55" width="105" x="125"
               y="190"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="reviewDecisionCCT"
            id="BPMNShape_reviewDecisionCCT">
            <omgdc:Bounds height="40" width="40" x="290" y="197"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="approvedCCT"
            id="BPMNShape_approvedCCT">
            <omgdc:Bounds height="55" width="105" x="390"
               y="97"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="rejectedCCT"
            id="BPMNShape_rejectedCCT">
            <omgdc:Bounds height="55" width="105" x="390"
               y="297"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
            <omgdc:Bounds height="35" width="35" x="555" y="307"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
            <omgdi:waypoint x="65" y="217"></omgdi:waypoint>
            <omgdi:waypoint x="125" y="217"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
            <omgdi:waypoint x="230" y="217"></omgdi:waypoint>
            <omgdi:waypoint x="290" y="217"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
            <omgdi:waypoint x="310" y="197"></omgdi:waypoint>
            <omgdi:waypoint x="310" y="124"></omgdi:waypoint>
            <omgdi:waypoint x="390" y="124"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
            <omgdi:waypoint x="310" y="237"></omgdi:waypoint>
            <omgdi:waypoint x="310" y="324"></omgdi:waypoint>
            <omgdi:waypoint x="390" y="324"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
            <omgdi:waypoint x="495" y="124"></omgdi:waypoint>
            <omgdi:waypoint x="572" y="124"></omgdi:waypoint>
            <omgdi:waypoint x="572" y="307"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
            <omgdi:waypoint x="495" y="324"></omgdi:waypoint>
            <omgdi:waypoint x="555" y="324"></omgdi:waypoint>
         </bpmndi:BPMNEdge>
      </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
</definitions>

The same with your share-config-custom.xml:

<config evaluator="string-compare" condition="activiti$activitiDemCCT">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription"/>
               <show id="bpm:workflowDueDate"/>
               <show id="bpm:workflowPriority"/>
               <show id="cct:projectName"/>
               <show id="cct:marketName"/>
               <show id="bpm:groupAssignee"/>
               <show id="bpm:sendEMailNotifications"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl"/>
               <set id="assignee" appearance="title" label-id="workflow.set.assignee"/>
               <set id="other" appearance="title" label-id="workflow.set.other"/>
               <field id="bpm:workflowDescription" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl">
                     <control-param name="style">width: 95%</control-param>
                  </control>
               </field>
               <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info"/>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="cct:projectName" set="info">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="cct:marketName" set="info">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl"/>
               </field>
               <field id="bpm:groupAssignee" label-id="workflow.field.review_group" set="assignee"/>
               <field id="bpm:sendEMailNotifications" set="other">
                  <control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl"/>
               </field>
            </appearance>
         </form>
      </forms>
   </config>
   <config evaluator="task-type" condition="cct:submitGroupReviewTaskCCT">
      <forms>
         <form id="workflow-details">
            <field-visibility>
               <show id="bpm:groupAssignee"/>
               <show id="bpm:sendEMailNotifications"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.workflow.more_info"/>
               <set id="items" appearance="title" label-id="workflow.set.items"/>
               <field id="bpm:groupAssignee" label-id="workflow.field.review_group"/>
            </appearance>
         </form>
         <form>
            <field-visibility>
               <show id="message"/>
               <show id="taskOwner"/>
               <show id="bpm:workflowPriority"/>
               <show id="bpm:workflowDueDate"/>
               <show id="bpm:taskId"/>
               <show id="bpm:status"/>
               <show id="cct:projectName"/>
               <show id="cct:marketName"/> 
               <show id="bpm:sendEMailNotifications"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl"/>
               <set id="progress" appearance="title" label-id="workflow.set.task.progress"/>
               <set id="other" appearance="title" label-id="workflow.set.other"/>
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="taskOwner" set="info"/>
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="bpm:workflowDueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:status" set="progress"/>
               <field id="cct:projectName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="cct:marketName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:sendEMailNotifications" set="other"/>
            </appearance>
         </form>
      </forms>
   </config>
      <config evaluator="task-type" condition="cct:activitiReviewTaskCCT">
      <forms>
         <form>
            <field-visibility>
               <show id="message"/>
               <show id="taskOwner"/>
               <show id="bpm:priority"/>
               <show id="bpm:dueDate"/>
               <show id="bpm:taskId"/>
               <show id="bpm:status"/>
               <show id="cct:projectName"/>
               <show id="cct:marketName"/> 
               <show id="bpm:comment"/>
               <show id="wf:reviewOutcome"/>
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info"/>
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl"/>
               <set id="progress" appearance="title" label-id="workflow.set.task.progress"/>
               <set id="response" appearance="title" label-id="workflow.set.response"/>
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="taskOwner" set="info"/>
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl"/>
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="cct:projectName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="cct:marketName" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl"/>
               </field>
               <field id="bpm:status" set="progress"/>
               <field id="bpm:comment" label-id="workflow.field.comment" set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl"/>
               </field>
               <field id="wf:reviewOutcome" label-id="workflow.field.outcome" set="response">
                  <control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl"/>
               </field>
            </appearance>
         </form>
      </forms>
   </config>


Adei

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
Note that you don't need to create the types for approved and rejected as you're not adding any extra properties that the existing wf:rejectedParallelTask or wf:approvedParallelTask don't have.

You can reuse the existing types, just need to create yours if you are adding extra fields or constraints or aspects

dorra87
Champ in-the-making
Champ in-the-making
there is an error
2012-04-13 17:29:49,739  ERROR [extensions.webscripts.AbstractRuntime] [http-8080-4] Exception from executeScript - redirecting to status template error: 03130002 Wrapped Exception (with status template): Namespace prefix wf is not mapped to a namespace URI
org.springframework.extensions.webscripts.WebScriptException: 03130002 Wrapped Exception (with status template): Namespace prefix wf is not mapped to a namespace URI

We can't do <import uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/>
<?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"/>
      <import uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/>
   </imports>
   <namespaces>
      <namespace uri="http://www.alfresco.org/model/decCCT/1.0" prefix="cct"/>
   </namespaces>  
   <types>
      <!–  Submit review to multiple people (as included in a group) –>
      <type name="cct:submitGroupReviewTaskCCT">
         <parent>wf:submitConcurrentReviewTask</parent>
         <mandatory-aspects>
            <aspect>bpm:groupAssignee</aspect>
         <aspect>cct:marketInfo</aspect>
         <aspect>cct:projectInfo</aspect>
         </mandatory-aspects>
      </type>

        <type name="cct:activitiReviewTaskCCT">
            <parent>wf:activitiReviewTask</parent>
         <mandatory-aspects>
         <aspect>cct:marketInfo</aspect>
         <aspect>cct:projectInfo</aspect>
         </mandatory-aspects>
        </type>
   </types>
  
   <aspects>
     <aspect name="cct:marketInfo">
         <properties>
            <property name="cct:marketName">
               <title>Marché</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
      <aspect name="cct:projectInfo">
         <properties>
            <property name="cct:projectName">
              <title>Projet</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
   </aspects>

</model>
I'm checking how to correct it

dorra87
Champ in-the-making
Champ in-the-making
I put some changes in the context file and it work,thank you so much Adei.

<?xml version="1.0" encoding="UTF-8"?>
<model name="cct: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/decCCT/1.0" prefix="cct"/>
   </namespaces>  
   <types>
    <type name="cct:submitConcurrentReviewTask">
         <parent>bpm:startTask</parent>
      </type>
      <!–  Submit review to multiple people (as included in a group) –>
      <type name="cct:submitGroupReviewTaskCCT">
         <parent>cct:submitConcurrentReviewTask</parent>
         <mandatory-aspects>
            <aspect>bpm:groupAssignee</aspect>
         <aspect>cct:marketInfo</aspect>
         <aspect>cct:projectInfo</aspect>
         </mandatory-aspects>
      </type>
  <type name="cct:activitiReviewTask">
            <parent>bpm:activitiOutcomeTask</parent>
            <overrides>
                <property name="bpm:packageItemActionGroup">
                    <default>edit_package_item_actions</default>
                </property>
                <property name="bpm:outcomePropertyName">
                    <default>{http://www.alfresco.org/model/workflow/1.0}reviewOutcome</default>
                </property>
            </overrides>
        </type>
        <type name="cct:activitiReviewTaskCCT">
            <parent>cct:activitiReviewTask</parent>
         <mandatory-aspects>
         <aspect>cct:marketInfo</aspect>
         <aspect>cct:projectInfo</aspect>
         </mandatory-aspects>
        </type>
   </types>
  
   <aspects>
     <aspect name="cct:marketInfo">
         <properties>
            <property name="cct:marketName">
               <title>Marché</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
      <aspect name="cct:projectInfo">
         <properties>
            <property name="cct:projectName">
              <title>Projet</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
   </aspects>
</model>

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
Glad you got it working!