cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow task properties forgotten? [SOLVED]

jimcornmell
Champ in-the-making
Champ in-the-making
Hi,

I have a content model for a workflow, which is listed below, but I cannot get it to work quite right.  At each stage in the worflow I want the same information visible, in this case artist and reader, and editable, initially by the user, but ultimately from the workflow itself.  But I want the information remembered as the task moves around the workflow.

At the moment I can see the properties and set their values at each stage, but the info is forgotten at the next stage of the workflow, i.e. it appears to be a new property, set the the default value (Undefined in this case).

Many thanks in advance for your time.

Jim


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

<model name="mywf:myworkflowmodel" 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.my.com/" prefix="mywf"/>
   </namespaces>
     
   <types>

      <type name="mywf:allocateToStudioTask">
         <parent>bpm:startTask</parent>
         <mandatory-aspects>
            <aspect>mywf:workflowAssignees</aspect>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="mywf:createTask">
         <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>
         <mandatory-aspects>
            <aspect>mywf:workflowAssignees</aspect>
         </mandatory-aspects>
      </type>

      <type name="mywf:readingTask">
         <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>
         <mandatory-aspects>
            <aspect>mywf:workflowAssignees</aspect>
         </mandatory-aspects>
      </type>

      <type name="mywf:amendTask">
         <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>
         <mandatory-aspects>
            <aspect>mywf:workflowAssignees</aspect>
         </mandatory-aspects>
      </type>
   </types>

   <aspects>
      <aspect name="mywf:workflowAssignees">
         <properties>
            <property name="mywf:artist">
               <type>d:text</type>
               <default>Undefined</default>
            </property>
            <property name="mywf:reader">
               <type>d:text</type>
               <default>Undefined</default>
            </property>
         </properties>
      </aspect>
   </aspects>
</model>
1 REPLY 1

jimcornmell
Champ in-the-making
Champ in-the-making
Hi All,

I've found the answer.  Basically using:

<default>Undefined</default>

This causes the value to be set to Undefined as it moves through each stage of the workflow.  I've just removed it (see modified aspect below) and all is well.

I have to admit it still seems strange that it is applied at each step around the workflow.  I assumed (incorrectly) this would just be applied initially and that would be that.  Ho hum.

Jim


   <aspects>
      <aspect name="mywf:workflowAssignees">
         <properties>
            <property name="mywf:artist">
               <type>d:text</type>
            </property>
            <property name="mywf:reader">
               <type>d:text</type>
            </property>
         </properties>
      </aspect>
   </aspects>