cancel
Showing results for 
Search instead for 
Did you mean: 

Review & Approve activiti process

muralidharand
Star Contributor
Star Contributor
I am using alfresco 4 and exploring the Review and Approve activiti process.
I have downloaded the Review and Approve activiti process (Review.bpmn20.xml) xml by using activi-admin page. In that, just I have changed the process name & Id and deployed as a new one (by uploading the bpmn20.xml file via aciti-admin page).
While creating the new review task I’ve noticed that the create review task form is different. In the new workflow, I’m getting locale , comment textboxes are extra.
Please refer the image and tell me, why I’m getting this difference.

[img]
http://www2.picturepush.com/photo/a/8690785/img/8690785.jpg
[/img]
10 REPLIES 10

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
It would help seeing your workflow definition file and the workflow model as well.

How share creates the forms for workflow depends on the workflow model and how each user task is defined.

Have a look at this wiki page, it explains how it works.

muralidharand
Star Contributor
Star Contributor
I understood your point. When I do the replica of the existing workflow, it should the call the same forms correct. Then why i'm getting the different one ?

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
can you post your workflow model and your workfklow definition?

muralidharand
Star Contributor
Star Contributor
It is the default activiti review approve process workflow.I'm using alfresco version 4.0.2 enterprise version.

Workflow model.

<?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:activitiReviewTask">
            <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>
        </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>
       
      <!– Deprecated workflow task from Alfresco 3.0 –>
      <!– Needs to be defined for patch.InvitationMigration which gets rid of it.  –>
     
      <type name="wf:inviteToSiteTask">
         <parent>bpm:startTask</parent>
         <properties>
            <property name="wf:serverPath">
               <type>d:text</type>
            </property>
            <property name="wf:acceptUrl">
               <type>d:text</type>
            </property>
            <property name="wf:rejectUrl">
               <type>d:text</type>
            </property>
            <property name="wf:inviteTicket">
               <type>d:text</type>
            </property>
            <property name="wf:inviterUserName">
               <type>d:text</type>
            </property>
            <property name="wf:inviteeUserName">
               <type>d:text</type>
            </property>
            <property name="wf:inviteeFirstName">
               <type>d:text</type>
            </property>
            <property name="wf:inviteeLastName">
               <type>d:text</type>
            </property>
            <property name="wf:inviteeGenPassword">
               <type>d:text</type>
            </property>
            <property name="wf:siteShortName">
               <type>d:text</type>
            </property>
            <property name="wf:inviteeSiteRole">
               <type>d:text</type>
            </property>
         </properties>
         <mandatory-aspects>
            <aspect>bpm:assignee</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>
  
   </aspects>

</model>



Workflow definition of review.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="activitiReview" name="Review And Approve Activiti Process">

        <startEvent id="start"
            activiti:formKey="wf:submitReviewTask" />

        <sequenceFlow id='flow1'
            sourceRef='start'
            targetRef='reviewTask' />

        <userTask id="reviewTask" name="Review Task"
            activiti:formKey="wf:activitiReviewTask">
           <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>
               <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
                          execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
           </extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${bpm_assignee.properties.userName}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>

        <sequenceFlow id='flow2'
        sourceRef='reviewTask'
            targetRef='reviewDecision' />

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

        <sequenceFlow id='flow3' sourceRef='reviewDecision' targetRef='approved' >
            <conditionExpression xsi:type="tFormalExpression">${wf_reviewOutcome == 'Approve'}</conditionExpression>
        </sequenceFlow>

        <sequenceFlow id='flow4'
        sourceRef='reviewDecision'
            targetRef='rejected' />

       <userTask id="approved" name="Document Approved"
            activiti:formKey="wf:approvedTask" >
            <documentation>
                The document was reviewed and approved.
            </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;
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
            </extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>
       
        <userTask id="rejected" name="Document Rejected"
            activiti:formKey="wf:rejectedTask" >
            <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;
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
            </extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>

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

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

        <endEvent id="end" />

    </process>
   
   <!– Graphical representaion of diagram –>
   <bpmndi:BPMNDiagram id="BPMNDiagram_activitiReview">
      <bpmndi:BPMNPlane bpmnElement="activitiReview"
         id="BPMNPlane_activitiReview">
         <bpmndi:BPMNShape bpmnElement="start"
            id="BPMNShape_start">
            <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="reviewTask"
            id="BPMNShape_reviewTask">
            <omgdc:Bounds height="55" width="105" x="125"
               y="190"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="reviewDecision"
            id="BPMNShape_reviewDecision">
            <omgdc:Bounds height="40" width="40" x="290" y="197"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="approved"
            id="BPMNShape_approved">
            <omgdc:Bounds height="55" width="105" x="390"
               y="97"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="rejected"
            id="BPMNShape_rejected">
            <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>

Workflow Definition of customreview.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="customactivitiReview" name="Custom Review And Approve Activiti Process">

        <startEvent id="start"
            activiti:formKey="wf:submitReviewTask" />

        <sequenceFlow id='flow1'
            sourceRef='start'
            targetRef='reviewTask' />

        <userTask id="reviewTask" name="Review Task"
            activiti:formKey="wf:customactivitiReviewTask">
           <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>
               <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
                          execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
           </extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${bpm_assignee.properties.userName}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>

        <sequenceFlow id='flow2'
        sourceRef='reviewTask'
            targetRef='reviewDecision' />

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

        <sequenceFlow id='flow3' sourceRef='reviewDecision' targetRef='approved' >
            <conditionExpression xsi:type="tFormalExpression">${wf_reviewOutcome == 'Approve'}</conditionExpression>
        </sequenceFlow>

        <sequenceFlow id='flow4'
        sourceRef='reviewDecision'
            targetRef='rejected' />

       <userTask id="approved" name="Document Approved"
            activiti:formKey="wf:approvedTask" >
            <documentation>
                The document was reviewed and approved.
            </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;
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
            </extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>
       
        <userTask id="rejected" name="Document Rejected"
            activiti:formKey="wf:rejectedTask" >
            <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;
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
            </extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>

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

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

        <endEvent id="end" />

    </process>
   
   <!– Graphical representaion of diagram –>
   <bpmndi:BPMNDiagram id="BPMNDiagram_customactivitiReview">
      <bpmndi:BPMNPlane bpmnElement="customactivitiReview"
         id="BPMNPlane_customactivitiReview">
         <bpmndi:BPMNShape bpmnElement="start"
            id="BPMNShape_start">
            <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="reviewTask"
            id="BPMNShape_reviewTask">
            <omgdc:Bounds height="55" width="105" x="125"
               y="190"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="reviewDecision"
            id="BPMNShape_reviewDecision">
            <omgdc:Bounds height="40" width="40" x="290" y="197"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="approved"
            id="BPMNShape_approved">
            <omgdc:Bounds height="55" width="105" x="390"
               y="97"></omgdc:Bounds>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="rejected"
            id="BPMNShape_rejected">
            <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>


Simple copy and paste review.bpmn20.xml file as customreview.bpmn20.xml (just change the id and name) and upload the new file into activiti admin. Now the both worflows will be displayed in alfresco share workflow dropdown and create the workflow to see the difference.

e-no91
Champ in-the-making
Champ in-the-making
May I know where could I get the workflow model??
Thank you!

oleh
Champ in-the-making
Champ in-the-making
You changed the process id, so it can't find the form definition for the start-task.

It's a bit weird to figure out at first, but the process id in the workflow definition needs a
form with that id.

Your process is defined like this:

<process id="customactivitiReview" name="Custom Review And Approve Activiti Process">

Now the form engine expects a form with id "activiti$customactivitiReview"

This is the form that's used for starting the workflow. The rest of the way, you're able to specify the
formKey which the form engine will look for.

Take a look at share-workflow-form-config.xml, look for
<config evaluator="string-compare" condition="activiti$activitiReview">

Copy the whole section and change the condition to activiti$customactivitiReview and you should be fine.

Let me know how it goes

oleh
Champ in-the-making
Champ in-the-making
I should add that you can put the section into share-config-custom.xml instead of hacking directly in share-workflow-form-config.xml

muralidharand
Star Contributor
Star Contributor
Thanks, I got it.

I will make the changes and I'll get back to the forum.

oleh
Champ in-the-making
Champ in-the-making
Cool, I hope it works out for you Smiley Happy

Here's a bit more background:

If you try it right now as it is, you will be able to launch the workflow, but only the first step of the workflow will look weird, the rest of the process will look exactly like the workflow you copied.

Activiti defines the process, Alfresco defines the data-model which you've already taken care of.
For the workflow to function properly, it needs some forms. Activiti handles this by adding a attribute in the process definition f.x:

<startEvent id="start" activiti:formKey="wf:submitReviewTask" />

Notice the activiti:formKey. Share uses this information to lookup a form and use the form engine to process and display it.
So for this example it looks for a form "wf:submitReviewTask".

Look for a file named share-workflow-form-config.xml. If you're using a standard enterprise download with tomcat, it should be located in
tomcat/webapps/share/WEB-INF/classes/alfresco
but i'm not 100% sure on the location (I use maven+jetty myself).

Once you've found the file, inspect it a bit. Look for wf:submitReviewTask, here you'll find the definition of the form - it explains which fields to display and how/where it should do so.
These forms are used all over the place, the wiki should have some in-depth documentation about it.

The only part that is missing is the form that's used for starting the workflow. It's prefixed with [engine]$[processId], in your case activiti$customactivitiReview.

Remember this info when you start developing a workflow from scratch - I certainly had my deal of "whaaat"-moments while doing the first couple of workflows Smiley Wink