cancel
Showing results for 
Search instead for 
Did you mean: 

Select assignee button does not appear

acgrama
Champ in-the-making
Champ in-the-making
I have created a very simple workflow, and it is deployed correctly. However, when I start the workflow, I cannot select an assignee, because the "select" button is not rendered on the page (see attached screenshot).
My Alfresco version is 4.2.a.

I have copied the process definition (bc2process.bpmn) and workflow context (bc2process-workflow-context.xml) to this folder: \alfresco_4.2.a\tomcat\shared\classes\alfresco\extension

The files:

bc2process.bpmn:


<?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"
    typeLanguage="http://www.w3.org/2001/XMLSchema"
    expressionLanguage="http://www.w3.org/1999/XPath"
    targetNamespace="http://www.activiti.org/test">

    <process id="bc2process" name="BC2 Process" isExecutable="true">
        <startEvent id="eventStart" name="Start"></startEvent>
        <userTask id="bc2Task" name="BC2 Task" activiti:formKey="bpm:workflowTask"></userTask>
        <endEvent id="eventEnd" name="End"></endEvent>
        <sequenceFlow id="flow1" sourceRef="eventStart" targetRef="bc2Task"></sequenceFlow>
        <sequenceFlow id="flow2" sourceRef="bc2Task" targetRef="eventEnd"></sequenceFlow>
    </process>
</definitions>



bc2process-workflow-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="wf-bc2process" parent="workflowDeployer">
        <property name="workflowDefinitions">
            <list>
                <props>
                    <prop key="engineId">activiti</prop>
                    <prop key="location">alfresco/extension/bc2process.bpmn</prop>
                    <prop key="mimetype">text/xml</prop>
                    <prop key="redeploy">false</prop>
                </props>
            </list>
        </property>
        <property name="models">
            <list>
                <value>alfresco/model/bpmModel.xml</value>
            </list>
        </property>
    </bean>
</beans>


In \alfresco_4.2.a\tomcat\webapps\share\WEB-INF\classes\alfresco\share-workflow-form-config.xml, I have added the following, to customise the form:



   <config evaluator="string-compare" condition="activiti$bc2process">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:assignee" />
               <show id="packageItems" />
            </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="items" appearance="title" label-id="workflow.set.items" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
               <field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
               <field id="packageItems" set="items" />
            </appearance>
         </form>
      </forms>
   </config>



EDIT: I cannot edit the Tags, as nothing happens when I type in the text field.
6 REPLIES 6

cool123
Champ in-the-making
Champ in-the-making
Tell me make your model first and if you are using exiting model,no need to deploy this model again you can use it.
i am giving you my email id send me your code to me and i will ractify it.
Your BPMN also have errors
1.  <startEvent id="eventStart" name="Start"></startEvent> ,here define the formkey that you want to disply
e.g. <startEvent id="eventStart" name="Start" activiti:formKey="wf:submitAdhocTask" /

if it not working mail the code

oskar201
Champ in-the-making
Champ in-the-making
Hello
I note you're using bpm to deploy your workflow, in my case i'm using activiti and have the same problem, the select assignee button doesn't appear.
I use 3 archive configurations:

excercise11.bpm20.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://www.activiti.org/test">

  <process id="exercise11" name="Final Exercise">
    <extensionElements>
      <activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
        <activiti:field name="script">
          <activiti:string>logger.log("initializing…");</activiti:string>
        </activiti:field>
      </activiti:executionListener>
    </extensionElements>
    <startEvent id="alfrescoStartevent1" name="Alfresco start" activiti:formKey="wfge:startSopReview"></startEvent>
    <userTask id="usertask1" name="Review SOP" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="wfge:sopReview">
      <extensionElements>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>logger.log("task1 complete…");</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
     
    </userTask>
    ….


sopWorkflowModel.xml

<?xml version="1.0" encoding="UTF-8"?>
<model name="wfge:workflow-green-energy" xmlns="http://www.alfresco.org/model/dictionary/1.0">

    <description>example</description>
    <author>Training</author>
    <version>1.1</version>

   <imports>
        <!– Import Alfresco Dictionary Definitions –>
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
        <!– Import Alfresco Content Domain Model Definitions –>
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />  
      <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/training/1.0" prefix="wfge"/>
   </namespaces>

   <types>
   
      <type name="wfge:startSopReview">
         <parent>bpm:startTask</parent>
         <mandatory-aspects>
         <aspect>wfge:instructionAspect</aspect>
         </mandatory-aspects>
      </type>
     
      <type name="wfge:sopReview">
         <parent>wf:activitiReviewTask</parent>
         <mandatory-aspects>
         <aspect>wfge:instructionAspect</aspect>         
         <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>    

      ….
</types>
<aspects>

   <!–    This aspect is used to hold the instructions –>
      <aspect name="wfge:instructionAspect">
         <properties>
             <property name="wfge:instructions">
                <type>d:text</type>
                <mandatory>true</mandatory>
             </property>
         </properties>
      </aspect>
</aspects>   
</model>  


sop-workflow-context.xml


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <!– Registration of workflow models –>   
   <bean id="ge.workflowBootstrap" parent="workflowDeployer">
    <property name="models">
       <list>
         <value>alfresco/extension/sopWorkflowModel.xml</value>
       </list>
     </property>
     <property name="workflowDefinitions">
        <list>
          <props>
       <prop key="engineId">activiti</prop>
       <prop key="location">alfresco/extension/exercise11.bpmn20.xml</prop>
       <prop key="mimetype">text/xml</prop>
       <prop key="redeploy">true</prop>
          </props>
       </list>
     </property>
   </bean>
         
</beans>


and edite share-config-custom.xml


<config evaluator="string-compare" condition="activiti$exercise11">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:workflowPriority" />
            <show id="bpm:assignee" />
               <show id="packageItems" />
               <show id="wfge:instructions" />
            </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="items" appearance="title" label-id="workflow.set.items" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
               <set id="assignee" appearance="title" label-id="workflow.set.assignee" />
            <field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
               <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="wfge:instructions" label-id="Instructions for Reviewers" set="info">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
                     <control-param name="style">width: 95%</control-param>                 
               </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="packageItems" set="items" />
            </appearance>
         </form>
      </forms>
   </config>
   ….


The workflow deploys successfully, but when I want to run it in the interface the assignee button doesn't appear like in the picture attached  show
please, any help is welcome!


cool123
Champ in-the-making
Champ in-the-making
see your model,
1. model
—————————-
<type name="wfge:startSopReview">

         <parent>bpm:startTask</parent>

         <mandatory-aspects>

         <aspect>bpm:assignee</aspect>

         </mandatory-aspects>

      </type>
you shoud use bpm:assinee in start task as a mandatory aspect.
This is the one mistake
—————————————————————
2. share config file
———————————————
<config evaluator="string-compare" condition="activiti$exercise11">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:workflowPriority" />
            <show id="bpm:assignee" />
               <show id="packageItems" />
               <show id="wfge:instructions" />
            </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="items" appearance="title" label-id="workflow.set.items" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
               <set id="assignee" appearance="title" label-id="workflow.set.assignee" />
            <field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
               <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="wfge:instructions" label-id="Instructions for Reviewers" set="info">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
                     <control-param name="style">width: 95%</control-param>                 
               </field>
            <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info" />        
                    <field set="info" id="bpm:assignee" label="name you want"/>

               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="packageItems" set="items" />
            </appearance>
         </form>
      </forms>
   </config>

this is the correct code i have put..
if this is not working email mail me:kumardocs44@gmail.com
and this content is help,mark it as usefull.

acgrama
Champ in-the-making
Champ in-the-making
This helped, thanks a lot! The corrected files are below, in case someone else has these problems:

bc2process.bpmn


<?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"
    typeLanguage="http://www.w3.org/2001/XMLSchema"
    expressionLanguage="http://www.w3.org/1999/XPath"
    targetNamespace="http://www.activiti.org/test">

    <process id="bc2process" name="BC2 Process" isExecutable="true">
        <startEvent id="eventStart" name="Start" activiti:formKey="epeswf:startBC2ProcessTask"></startEvent>
        <userTask id="bc2Task" name="BC2 Task" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="epeswf:bc2processTask"></userTask>
        <endEvent id="eventEnd" name="End"></endEvent>
        <sequenceFlow id="flow1" sourceRef="eventStart" targetRef="bc2Task"></sequenceFlow>
        <sequenceFlow id="flow2" sourceRef="bc2Task" targetRef="eventEnd"></sequenceFlow>
    </process>
</definitions>



bc2process-workflow-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="wf-bc2process" parent="workflowDeployer">
        <property name="workflowDefinitions">
            <list>
                <props>
                    <prop key="engineId">activiti</prop>
                    <prop key="location">alfresco/extension/bc2process.bpmn</prop>
                    <prop key="mimetype">text/xml</prop>
                    <prop key="redeploy">true</prop>
                </props>
            </list>
        </property>

        <property name="models">
            <list>
                <value>alfresco/extension/bc2processModel.xml</value>
            </list>
        </property>
    </bean>
</beans>



bc2processModel.xml


<?xml version="1.0" encoding="UTF-8"?>
<model name="epeswf:bc2processModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <description>EPES BC2 Workflow Model</description>
   <author>ACG</author>
   <version>1.0</version>
   <imports>
        <!– Import Alfresco Dictionary Definitions –>
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
        <!– Import Alfresco Content Domain Model Definitions –>
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />  
      <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/training/2.0" prefix="epeswf"/>
   </namespaces>  
   <types>
      <type name="epeswf:startBC2ProcessTask">
         <parent>bpm:startTask</parent>
         <mandatory-aspects>
         <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>
      <type name="epeswf:bc2processTask">
         <parent>wf:activitiReviewTask</parent>
      </type>      
    </types>   
</model>



Furthermore, the GUI of the form is customised in alfresco_4.2.a\tomcat\webapps\share\WEB-INF\classes\alfresco\web-extension\share-config-custom.xml, not in the file I wrote in my original post.



   <config evaluator="string-compare" condition="activiti$collaborationProcess">
       <forms>
    <form>
      <field-visibility>
           <show id="bpm:workflowDescription" />
           <show id="bpm:workflowDueDate" />
           <show id="bpm:workflowPriority" />
      <show id="bpm:assignee" />
      <show id="packageItems" />
      </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="items" appearance="title" label-id="workflow.set.items" />
      <set id="other" appearance="title" label-id="workflow.set.other" />
      <set id="assignee" appearance="title" label-id="workflow.set.assignee" />
      <field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
      <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 set="info" id="bpm:assignee" label="Assignee:"/>
      <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
             <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
      </field>
      <field id="packageItems" set="items" />
       </appearance>
     </form>
   </forms>
     </config>

acgrama
Champ in-the-making
Champ in-the-making
Hi,

Have you managed to fix your workflow and get the Assignee to appear?

oskar201
Champ in-the-making
Champ in-the-making
it worked!!
thank you very much!!