AnsweredAssumed Answered

Configurin Task Dialog for Advanced Workflows

Question asked by jonnygranati on Apr 1, 2008
I’m trying to follow this tutorial: http://wiki.alfresco.com/wiki/WorkflowAdministration

In step 1, I created the Process Definition with the JBoss jBPM Process Designer and deployed it successfully. The file is called processdefinition.xml and looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="wf:adhoc">
   <swimlane name="initiator"></swimlane>
   <start-state name="start">
      <task name="wf:submitAdhocTask" swimlane="initiator"/>
      <transition to="adhoc"/>
   </start-state>   
   <swimlane name="assignee"/>
   <task-node name="adhoc">
      <task name="wf:adhocTask" swimlane="assignee"/>
      <transition to="completed"/>
   </task-node>
   <task-node name="completed">
      <task name="wf:completedTask" swimlane="initiator"/>
      <transition to="end"/>
   </task-node>
   <end-state name="end"/>
</process-definition>

In step 2, I created a new Content Model called my-workflowmodel.xml and put it in C:\Alfresco\tomcat\shared\classes\alfresco\extension. The file looks like this:

<?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:submitAdhocTask">
        <parent>bpm:startTask</parent>        
        <properties>
           <property name="wf:notifyMe">
              <type>d:boolean</type>
              <default>true</default>
           </property>
        </properties>
        <mandatory-aspects>
           <aspect>bpm:assignee</aspect>
        </mandatory-aspects>
     </type>
     <type name="wf:adhocTask">
        <parent>bpm:workflowTask</parent>
     </type>
     <type name="wf:completedTask">
        <parent>bpm:workflowTask</parent>
     </type>
  </types>
</model>

Note that I set the default value for the notification to true, just to test if the association with the Task Dialog works.
In the same directory I have a file called extension-context.xml that looks like this:

<?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="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/my-workflowmodel.xml</value>
            </list>
        </property>
    </bean>
</beans>

When I start that workflow on a file, I get the normal dialog as for the out-of-the-box advanced workflows, but the notify-me box is not selected.
Does someone have any ideas, why this is? Thanks in advance.

Outcomes