[CMF-checkins] SVN: CMF/trunk/DCWorkflow/ - Workflow definition instances now have a description field

Jens Vagelpohl jens at dataflake.org
Fri Jun 8 04:56:57 EDT 2007


Log message for revision 76485:
  - Workflow definition instances now have a description field
    (http://www.zope.org/Collectors/CMF/480)
  

Changed:
  U   CMF/trunk/DCWorkflow/DCWorkflow.py
  U   CMF/trunk/DCWorkflow/WorkflowUIMixin.py
  U   CMF/trunk/DCWorkflow/dtml/workflow_properties.dtml
  U   CMF/trunk/DCWorkflow/exportimport.py
  U   CMF/trunk/DCWorkflow/tests/test_exportimport.py
  U   CMF/trunk/DCWorkflow/xml/wtcWorkflowExport.xml

-=-
Modified: CMF/trunk/DCWorkflow/DCWorkflow.py
===================================================================
--- CMF/trunk/DCWorkflow/DCWorkflow.py	2007-06-08 07:55:52 UTC (rev 76484)
+++ CMF/trunk/DCWorkflow/DCWorkflow.py	2007-06-08 08:56:55 UTC (rev 76485)
@@ -67,6 +67,7 @@
     implements(IDCWorkflowDefinition, IWorkflowDefinition)
 
     title = 'DC Workflow Definition'
+    description = ''
 
     state_var = 'state'
     initial_state = None

Modified: CMF/trunk/DCWorkflow/WorkflowUIMixin.py
===================================================================
--- CMF/trunk/DCWorkflow/WorkflowUIMixin.py	2007-06-08 07:55:52 UTC (rev 76484)
+++ CMF/trunk/DCWorkflow/WorkflowUIMixin.py	2007-06-08 08:56:55 UTC (rev 76485)
@@ -53,10 +53,12 @@
     manage_groups = PageTemplateFile('workflow_groups.pt', _dtmldir)
 
     security.declareProtected(ManagePortal, 'setProperties')
-    def setProperties(self, title, manager_bypass=0, props=None, REQUEST=None):
+    def setProperties(self, title, manager_bypass=0, props=None, 
+                      REQUEST=None, description=''):
         """Sets basic properties.
         """
         self.title = str(title)
+        self.description = str(description)
         self.manager_bypass = manager_bypass and 1 or 0
         g = Guard()
         if g.changeFromProperties(props or REQUEST):

Modified: CMF/trunk/DCWorkflow/dtml/workflow_properties.dtml
===================================================================
--- CMF/trunk/DCWorkflow/dtml/workflow_properties.dtml	2007-06-08 07:55:52 UTC (rev 76484)
+++ CMF/trunk/DCWorkflow/dtml/workflow_properties.dtml	2007-06-08 08:56:55 UTC (rev 76485)
@@ -15,6 +15,13 @@
 </tr>
 
 <tr>
+<th align="left">Description</th>
+<td>
+  <textarea cols="45" rows="5" name="description">&dtml-description;</textarea>
+</td>
+</tr>
+
+<tr>
 <th align="left">'Manager' role bypasses guards</th>
 <td>
 <dtml-let cb="manager_bypass and 'checked=\'checked\'' or ''">

Modified: CMF/trunk/DCWorkflow/exportimport.py
===================================================================
--- CMF/trunk/DCWorkflow/exportimport.py	2007-06-08 07:55:52 UTC (rev 76484)
+++ CMF/trunk/DCWorkflow/exportimport.py	2007-06-08 08:56:55 UTC (rev 76485)
@@ -67,10 +67,12 @@
         , worklists
         , permissions
         , scripts
+        , description
         ) = wfdc.parseWorkflowXML(body, encoding)
 
         _initDCWorkflow( self.context
                        , title
+                       , description
                        , state_variable
                        , initial_state
                        , states
@@ -110,6 +112,8 @@
 
           'title' -- the workflow's title property
 
+          'description' -- the workflow's description property
+
         o See '_extractDCWorkflowInfo' below for keys present only for
           DCWorkflow definitions.
 
@@ -119,6 +123,7 @@
         workflow_info = { 'id'          : workflow_id
                         , 'meta_type'   : workflow.meta_type
                         , 'title'       : workflow.title_or_id()
+                        , 'description' : workflow.description
                         }
 
         if workflow.meta_type == DCWorkflowDefinition.meta_type:
@@ -148,6 +153,11 @@
 
         workflow_id = _getNodeAttribute( root, 'workflow_id', encoding )
         title = _getNodeAttribute( root, 'title', encoding )
+        try:
+            description = _getNodeAttribute( root, 'description', encoding )
+        except ValueError:
+            # Don't fail on export files that do not have the description field!
+            description = ''
         state_variable = _getNodeAttribute( root, 'state_variable', encoding )
         initial_state = _getNodeAttribute( root, 'initial_state', encoding )
 
@@ -168,6 +178,7 @@
                , worklists
                , permissions
                , scripts
+               , description
                )
 
     security.declarePrivate( '_workflowConfig' )
@@ -939,6 +950,7 @@
 
 def _initDCWorkflow( workflow
                    , title
+                   , description
                    , state_variable
                    , initial_state
                    , states
@@ -952,6 +964,7 @@
     """ Initialize a DC Workflow using values parsed from XML.
     """
     workflow.title = title
+    workflow.description = description
     workflow.state_var = state_variable
     workflow.initial_state = initial_state
 

Modified: CMF/trunk/DCWorkflow/tests/test_exportimport.py
===================================================================
--- CMF/trunk/DCWorkflow/tests/test_exportimport.py	2007-06-08 07:55:52 UTC (rev 76484)
+++ CMF/trunk/DCWorkflow/tests/test_exportimport.py	2007-06-08 08:56:55 UTC (rev 76485)
@@ -217,6 +217,7 @@
         self.assertEqual( info[ 'id' ], WF_ID )
         self.assertEqual( info[ 'meta_type' ], DCWorkflowDefinition.meta_type )
         self.assertEqual( info[ 'title' ], dcworkflow.title )
+        self.assertEqual( info['description'], dcworkflow.description )
 
         self.assertEqual( info[ 'state_variable' ], dcworkflow.state_var )
 
@@ -470,11 +471,13 @@
 
         WF_ID = 'empty'
         WF_TITLE = 'Empty DCWorkflow'
+        WF_DESCRIPTION = 'This is a empty workflow'
         WF_INITIAL_STATE = 'initial'
 
         site = self._initSite()
         dcworkflow = self._initDCWorkflow( WF_ID )
         dcworkflow.title = WF_TITLE
+        dcworkflow.description = WF_DESCRIPTION
         dcworkflow.initial_state = WF_INITIAL_STATE
 
         configurator = self._makeOne(dcworkflow).__of__(site)
@@ -482,6 +485,7 @@
         self._compareDOM( configurator.generateWorkflowXML()
                         , _EMPTY_WORKFLOW_EXPORT % ( WF_ID
                                                    , WF_TITLE
+                                                   , WF_DESCRIPTION
                                                    , WF_INITIAL_STATE
                                                    ) )
 
@@ -489,11 +493,13 @@
 
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
+        WF_DESCRIPTION = 'Normal Workflow'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
         dcworkflow = self._initDCWorkflow( WF_ID )
         dcworkflow.title = WF_TITLE
+        dcworkflow.description = WF_DESCRIPTION
         dcworkflow.initial_state = WF_INITIAL_STATE
         dcworkflow.permissions = _WF_PERMISSIONS
         self._initVariables( dcworkflow )
@@ -508,6 +514,7 @@
                         , _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID
                             , 'title' : WF_TITLE
+                            , 'description' : WF_DESCRIPTION
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID.replace(' ', '_')
                             } )
@@ -516,14 +523,17 @@
 
         WF_ID_1 = 'dc1'
         WF_TITLE_1 = 'Normal DCWorkflow #1'
+        WF_DESCRIPTION_1 = 'Normal Number 1'
         WF_ID_2 = 'dc2'
         WF_TITLE_2 = 'Normal DCWorkflow #2'
+        WF_DESCRIPTION_2 = 'Normal Numer 2'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
 
         dcworkflow_1 = self._initDCWorkflow( WF_ID_1 )
         dcworkflow_1.title = WF_TITLE_1
+        dcworkflow_1.description = WF_DESCRIPTION_1
         dcworkflow_1.initial_state = WF_INITIAL_STATE
         dcworkflow_1.permissions = _WF_PERMISSIONS
         self._initVariables( dcworkflow_1 )
@@ -534,6 +544,7 @@
 
         dcworkflow_2 = self._initDCWorkflow( WF_ID_2 )
         dcworkflow_2.title = WF_TITLE_2
+        dcworkflow_2.description = WF_DESCRIPTION_2
         dcworkflow_2.initial_state = WF_INITIAL_STATE
         dcworkflow_2.permissions = _WF_PERMISSIONS
         self._initVariables( dcworkflow_2 )
@@ -548,6 +559,7 @@
                         , _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID_1
                             , 'title' : WF_TITLE_1
+                            , 'description' : WF_DESCRIPTION_1
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID_1.replace(' ', '_')
                             } )
@@ -558,6 +570,7 @@
                         , _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID_2
                             , 'title' : WF_TITLE_2
+                            , 'description' : WF_DESCRIPTION_2
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID_2.replace(' ', '_')
                             } )
@@ -566,6 +579,7 @@
 
         WF_ID = 'empty'
         WF_TITLE = 'Empty DCWorkflow'
+        WF_DESCRIPTION = 'This is an empty workflow'
         WF_INITIAL_STATE = 'initial'
 
         site = self._initSite()
@@ -582,12 +596,15 @@
         , worklists
         , permissions
         , scripts
+        , description
         ) = configurator.parseWorkflowXML( _EMPTY_WORKFLOW_EXPORT
                                          % ( WF_ID
                                            , WF_TITLE
+                                           , WF_DESCRIPTION
                                            , WF_INITIAL_STATE
                                            ) )
 
+        self.assertEqual(description, WF_DESCRIPTION)
         self.assertEqual( len( states ), 0 )
         self.assertEqual( len( transitions ), 0 )
         self.assertEqual( len( variables ), 0 )
@@ -599,6 +616,7 @@
 
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
+        WF_DESCRIPTION = 'This is a normal DCWorkflow'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
@@ -615,16 +633,19 @@
         , worklists
         , permissions
         , scripts
+        , description
         ) = configurator.parseWorkflowXML(
                           _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID
                             , 'title' : WF_TITLE
+                            , 'description' : WF_DESCRIPTION
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID.replace(' ', '_')
                             } )
 
         self.assertEqual( workflow_id, WF_ID )
         self.assertEqual( title, WF_TITLE )
+        self.assertEqual( description, WF_DESCRIPTION )
         self.assertEqual( state_variable, 'state' )
         self.assertEqual( initial_state, WF_INITIAL_STATE )
 
@@ -632,6 +653,7 @@
 
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
+        WF_DESCRIPTION = 'Normal workflow'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
@@ -648,10 +670,12 @@
         , worklists
         , permissions
         , scripts
+        , description
         ) = configurator.parseWorkflowXML(
                           _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID
                             , 'title' : WF_TITLE
+                            , 'description' : WF_DESCRIPTION
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID.replace(' ', '_')
                             } )
@@ -695,6 +719,7 @@
 
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
+        WF_DESCRIPTION = 'Normal workflow'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
@@ -711,10 +736,12 @@
         , worklists
         , permissions
         , scripts
+        , description 
         ) = configurator.parseWorkflowXML(
                           _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID
                             , 'title' : WF_TITLE
+                            , 'description' : WF_DESCRIPTION
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID.replace(' ', '_')
                             } )
@@ -760,6 +787,7 @@
 
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
+        WF_DESCRIPTION = 'Normal workflow'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
@@ -776,10 +804,12 @@
         , worklists
         , permissions
         , scripts
+        , description
         ) = configurator.parseWorkflowXML(
                           _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID
                             , 'title' : WF_TITLE
+                            , 'description' : WF_DESCRIPTION
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID.replace(' ', '_')
                             } )
@@ -835,6 +865,7 @@
 
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
+        WF_DESCRIPTION = 'Normal workflow'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
@@ -851,10 +882,12 @@
         , worklists
         , permissions
         , scripts
+        , description
         ) = configurator.parseWorkflowXML(
                           _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID
                             , 'title' : WF_TITLE
+                            , 'description' : WF_DESCRIPTION
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID.replace(' ', '_')
                             } )
@@ -894,6 +927,7 @@
 
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
+        WF_DESCRIPTION = 'Normal workflow'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
@@ -910,10 +944,12 @@
         , worklists
         , permissions
         , scripts
+        , description
         ) = configurator.parseWorkflowXML(
                           _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID
                             , 'title' : WF_TITLE
+                            , 'description' : WF_DESCRIPTION
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID.replace(' ', '_')
                             } )
@@ -928,6 +964,7 @@
 
         WF_ID = 'normal'
         WF_TITLE = 'Normal DCWorkflow'
+        WF_DESCRIPTION = 'Normal workflow'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
@@ -944,10 +981,12 @@
         , worklists
         , permissions
         , scripts
+        , description
         ) = configurator.parseWorkflowXML(
                           _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID
                             , 'title' : WF_TITLE
+                            , 'description': WF_DESCRIPTION
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID.replace(' ', '_')
                             } )
@@ -1245,6 +1284,7 @@
 <dc-workflow
     workflow_id="%s"
     title="%s"
+    description="%s"
     state_variable="state"
     initial_state="%s">
 </dc-workflow>
@@ -1500,6 +1540,7 @@
 <dc-workflow
     workflow_id="%(workflow_id)s"
     title="%(title)s"
+    description="%(description)s"
     state_variable="state"
     initial_state="%(initial_state)s">
  <permission>Open content for modifications</permission>
@@ -1761,8 +1802,10 @@
 
         WF_ID_NON = 'non_dcworkflow'
         WF_TITLE_NON = 'Non-DCWorkflow'
+        WF_DESCRIPTION_NON = 'Not a DCWorkflow'
         WF_ID_DC = 'dcworkflow'
         WF_TITLE_DC = 'DCWorkflow'
+        WF_DESCRIPTION_DC = 'I am a DCWorkflow'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
@@ -1770,10 +1813,12 @@
         wf_tool = site.portal_workflow
         nondcworkflow = DummyWorkflow( WF_TITLE_NON )
         nondcworkflow.title = WF_TITLE_NON
+        nondcworkflow.description = WF_DESCRIPTION_NON
         wf_tool._setObject( WF_ID_NON, nondcworkflow )
 
         dcworkflow = self._initDCWorkflow( WF_ID_DC )
         dcworkflow.title = WF_TITLE_DC
+        dcworkflow.description = WF_DESCRIPTION_DC
         dcworkflow.initial_state = WF_INITIAL_STATE
         dcworkflow.permissions = _WF_PERMISSIONS
         self._initVariables( dcworkflow )
@@ -1799,6 +1844,7 @@
                         , _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID_DC
                             , 'title' : WF_TITLE_DC
+                            , 'description' : WF_DESCRIPTION_DC
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID_DC.replace(' ', '_')
                             } )
@@ -1815,12 +1861,14 @@
 
         WF_ID_DC = 'name with spaces'
         WF_TITLE_DC = 'DCWorkflow with spaces'
+        WF_DESCRIPTION_DC = 'Workflow w/spaces'
         WF_INITIAL_STATE = 'closed'
 
         site = self._initSite()
 
         dcworkflow = self._initDCWorkflow( WF_ID_DC )
         dcworkflow.title = WF_TITLE_DC
+        dcworkflow.description = WF_DESCRIPTION_DC
         dcworkflow.initial_state = WF_INITIAL_STATE
         dcworkflow.permissions = _WF_PERMISSIONS
         self._initVariables( dcworkflow )
@@ -1847,6 +1895,7 @@
                         , _NORMAL_WORKFLOW_EXPORT
                           % { 'workflow_id' : WF_ID_DC
                             , 'title' : WF_TITLE_DC
+                            , 'description' : WF_DESCRIPTION_DC
                             , 'initial_state' : WF_INITIAL_STATE
                             , 'workflow_filename' : WF_ID_DC.replace(' ', '_')
                             } )
@@ -1864,18 +1913,19 @@
 
     layer = ExportImportZCMLLayer
 
-    def _importNormalWorkflow( self, wf_id, wf_title, wf_initial_state ):
+    def _importNormalWorkflow( self, wf_id, wf_title, 
+                               wf_description, wf_initial_state ):
         from Products.CMFCore.exportimport.workflow import importWorkflowTool
 
         site, context = self._prepareImportNormalWorkflow(
-            wf_id, wf_title, wf_initial_state)
+            wf_id, wf_title, wf_description, wf_initial_state)
 
         importWorkflowTool(context)
 
         return site.portal_workflow
 
-    def _prepareImportNormalWorkflow(self, wf_id, wf_title, wf_initial_state,
-                                     site=None, purge=True):
+    def _prepareImportNormalWorkflow(self, wf_id, wf_title, wf_description, 
+                                     wf_initial_state, site=None, purge=True):
         if site is None:
             site = self._initSite()
         workflow_filename = wf_id.replace(' ', '_')
@@ -1891,6 +1941,7 @@
                       ] = ( _NORMAL_WORKFLOW_EXPORT
                             % { 'workflow_id' : wf_id
                               , 'title' : wf_title
+                              , 'description' : wf_description
                               , 'initial_state' : wf_initial_state
                               , 'workflow_filename' : workflow_filename
                               }
@@ -2065,16 +2116,18 @@
 
         WF_ID = 'dcworkflow_purge'
         WF_TITLE = 'DC Workflow testing purge'
+        WF_DESCRIPTION = 'Test Purge'
         WF_INITIAL_STATE = 'closed'
 
         # Import a first time
         site, context = self._prepareImportNormalWorkflow(
-            WF_ID, WF_TITLE, WF_INITIAL_STATE)
+            WF_ID, WF_TITLE, WF_DESCRIPTION, WF_INITIAL_STATE)
         importWorkflowTool(context)
 
         # Now reimport without purge
         site, context = self._prepareImportNormalWorkflow(
-            WF_ID, WF_TITLE, WF_INITIAL_STATE, site=site, purge=False)
+            WF_ID, WF_TITLE, WF_DESCRIPTION, WF_INITIAL_STATE, 
+            site=site, purge=False)
         importWorkflowTool(context)
         workflow = site.portal_workflow.objectValues()[1]
 
@@ -2101,9 +2154,11 @@
 
         WF_ID = 'dcworkflow_tool'
         WF_TITLE = 'DC Workflow testing tool'
+        WF_DESCRIPTION = 'Testing Tool'
         WF_INITIAL_STATE = 'closed'
 
-        tool = self._importNormalWorkflow( WF_ID, WF_TITLE, WF_INITIAL_STATE )
+        tool = self._importNormalWorkflow( WF_ID, WF_TITLE,
+                                           WF_DESCRIPTION, WF_INITIAL_STATE )
 
         self.assertEqual( len( tool.objectIds() ), 2 )
         self.assertEqual( tool.objectIds()[ 1 ], WF_ID )
@@ -2112,9 +2167,11 @@
 
         WF_ID = 'dcworkflow_attrs'
         WF_TITLE = 'DC Workflow testing attrs'
+        WF_DESCRIPTION = 'Testing Attributes'
         WF_INITIAL_STATE = 'closed'
 
-        tool = self._importNormalWorkflow( WF_ID, WF_TITLE, WF_INITIAL_STATE )
+        tool = self._importNormalWorkflow( WF_ID, WF_TITLE,
+                                           WF_DESCRIPTION, WF_INITIAL_STATE )
 
         workflow = tool.objectValues()[ 1 ]
         self.assertEqual( workflow.meta_type, DCWorkflowDefinition.meta_type )
@@ -2126,9 +2183,11 @@
 
         WF_ID = 'dcworkflow_permissions'
         WF_TITLE = 'DC Workflow testing permissions'
+        WF_DESCRIPTION = 'Testing Permissions'
         WF_INITIAL_STATE = 'closed'
 
-        tool = self._importNormalWorkflow( WF_ID, WF_TITLE, WF_INITIAL_STATE )
+        tool = self._importNormalWorkflow( WF_ID, WF_TITLE,
+                                           WF_DESCRIPTION, WF_INITIAL_STATE )
 
         workflow = tool.objectValues()[ 1 ]
 
@@ -2142,9 +2201,11 @@
 
         WF_ID = 'dcworkflow_variables'
         WF_TITLE = 'DC Workflow testing variables'
+        WF_DESCRIPTION = 'Testing Variables'
         WF_INITIAL_STATE = 'closed'
 
-        tool = self._importNormalWorkflow( WF_ID, WF_TITLE, WF_INITIAL_STATE )
+        tool = self._importNormalWorkflow( WF_ID, WF_TITLE,
+                                           WF_DESCRIPTION, WF_INITIAL_STATE )
 
         workflow = tool.objectValues()[ 1 ]
 
@@ -2174,9 +2235,11 @@
 
         WF_ID = 'dcworkflow_states'
         WF_TITLE = 'DC Workflow testing states'
+        WF_DESCRIPTION = 'Testing States'
         WF_INITIAL_STATE = 'closed'
 
-        tool = self._importNormalWorkflow( WF_ID, WF_TITLE, WF_INITIAL_STATE )
+        tool = self._importNormalWorkflow( WF_ID, WF_TITLE,
+                                           WF_DESCRIPTION, WF_INITIAL_STATE )
 
         workflow = tool.objectValues()[ 1 ]
 
@@ -2231,9 +2294,11 @@
 
         WF_ID = 'dcworkflow_transitions'
         WF_TITLE = 'DC Workflow testing transitions'
+        WF_DESCRIPTION = 'Testing Transitions'
         WF_INITIAL_STATE = 'closed'
 
-        tool = self._importNormalWorkflow( WF_ID, WF_TITLE, WF_INITIAL_STATE )
+        tool = self._importNormalWorkflow( WF_ID, WF_TITLE,
+                                           WF_DESCRIPTION, WF_INITIAL_STATE )
 
         workflow = tool.objectValues()[ 1 ]
 
@@ -2273,9 +2338,11 @@
 
         WF_ID = 'dcworkflow_worklists'
         WF_TITLE = 'DC Workflow testing worklists'
+        WF_DESCRIPTION = 'Testing Worklists'
         WF_INITIAL_STATE = 'closed'
 
-        tool = self._importNormalWorkflow( WF_ID, WF_TITLE, WF_INITIAL_STATE )
+        tool = self._importNormalWorkflow( WF_ID, WF_TITLE, 
+                                           WF_DESCRIPTION, WF_INITIAL_STATE )
 
         workflow = tool.objectValues()[ 1 ]
 
@@ -2339,9 +2406,11 @@
 
         WF_ID = 'dcworkflow_scripts'
         WF_TITLE = 'DC Workflow testing scripts'
+        WF_DESCRIPTION = 'Testing Scripts'
         WF_INITIAL_STATE = 'closed'
 
-        tool = self._importNormalWorkflow( WF_ID, WF_TITLE, WF_INITIAL_STATE )
+        tool = self._importNormalWorkflow( WF_ID, WF_TITLE, 
+                                           WF_DESCRIPTION, WF_INITIAL_STATE )
 
         workflow = tool.objectValues()[ 1 ]
 

Modified: CMF/trunk/DCWorkflow/xml/wtcWorkflowExport.xml
===================================================================
--- CMF/trunk/DCWorkflow/xml/wtcWorkflowExport.xml	2007-06-08 07:55:52 UTC (rev 76484)
+++ CMF/trunk/DCWorkflow/xml/wtcWorkflowExport.xml	2007-06-08 08:56:55 UTC (rev 76485)
@@ -3,12 +3,14 @@
         xmlns:tal="http://xml.zope.org/namespaces/tal"
         workflow_id="dcworkflow"
         title="Some DCWorkflow"
+        description="Some Description"
         state_variable="review_state" 
         initial_state="visible" 
         tal:define="info python: here.getWorkflowInfo(
                                                 options[ 'workflow_id' ] )"
         tal:attributes="workflow_id info/id;
                         title info/title;
+                        description info/description;
                         state_variable info/state_variable;
                         initial_state info/initial_state">
  <permission



More information about the CMF-checkins mailing list