Skip to content
This repository has been archived by the owner on Dec 21, 2020. It is now read-only.

Commit

Permalink
Now also read descriptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Feb 24, 2005
1 parent 82975a2 commit aaa1c07
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion publication.xpdl
Expand Up @@ -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">
Expand Down
5 changes: 5 additions & 0 deletions xpdl.py
Expand Up @@ -174,6 +174,11 @@ def application(self, app):
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

Expand Down
12 changes: 12 additions & 0 deletions xpdl.txt
Expand Up @@ -341,3 +341,15 @@ Now, let's try out our process. We'll follow the same steps we did in

>>> 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'

0 comments on commit aaa1c07

Please sign in to comment.