[Zope3-checkins] SVN: Zope3/trunk/src/zope/wfmc/ Now also read descriptions.

Jim Fulton jim at zope.com
Thu Feb 24 09:22:36 EST 2005


Log message for revision 29282:
  Now also read descriptions.
  

Changed:
  U   Zope3/trunk/src/zope/wfmc/publication.xpdl
  U   Zope3/trunk/src/zope/wfmc/xpdl.py
  U   Zope3/trunk/src/zope/wfmc/xpdl.txt

-=-
Modified: Zope3/trunk/src/zope/wfmc/publication.xpdl
===================================================================
--- Zope3/trunk/src/zope/wfmc/publication.xpdl	2005-02-24 14:22:34 UTC (rev 29281)
+++ Zope3/trunk/src/zope/wfmc/publication.xpdl	2005-02-24 14:22:35 UTC (rev 29282)
@@ -95,7 +95,9 @@
                 </Participant>
             </Participants>
             <Applications>
-                <Application Id="prepare"/>
+                <Application Id="prepare" Name="Prepare">
+                    <Description>Prepare the initial draft</Description>
+                </Application>
                 <Application Id="tech_review">
                     <FormalParameters>
                         <FormalParameter Id="publish" Mode="OUT">

Modified: Zope3/trunk/src/zope/wfmc/xpdl.py
===================================================================
--- Zope3/trunk/src/zope/wfmc/xpdl.py	2005-02-24 14:22:34 UTC (rev 29281)
+++ Zope3/trunk/src/zope/wfmc/xpdl.py	2005-02-24 14:22:35 UTC (rev 29282)
@@ -174,6 +174,11 @@
         self.stack[-1].defineApplications(**{str(app.id): app})
     end_handlers[(xpdlns, 'Application')] = application
 
+    def description(self, ignored):
+        if self.stack[-1] is not None:
+            self.stack[-1].description = self.text
+    end_handlers[(xpdlns, 'Description')] = description
+
     ######################################################################
     # Activity definitions
 

Modified: Zope3/trunk/src/zope/wfmc/xpdl.txt
===================================================================
--- Zope3/trunk/src/zope/wfmc/xpdl.txt	2005-02-24 14:22:34 UTC (rev 29281)
+++ Zope3/trunk/src/zope/wfmc/xpdl.txt	2005-02-24 14:22:35 UTC (rev 29282)
@@ -341,3 +341,15 @@
 
     >>> context.decision
     True
+
+Descriptions
+============
+
+Most process elements can have names and descriptions.
+
+    >>> pd.applications['prepare'].__name__
+    u'Prepare'
+
+    >>> pd.applications['prepare'].description
+    u'Prepare the initial draft'
+



More information about the Zope3-Checkins mailing list