[Zope3-checkins] CVS: Packages3/workflow/browser - configure.zcml:1.13 definition.py:1.8 importexport_index.pt:1.3
Michael Howitz
mh+zope@gocept.com
Thu, 27 Mar 2003 08:32:24 -0500
Update of /cvs-repository/Packages3/workflow/browser
In directory cvs.zope.org:/tmp/cvs-serv12006/browser
Modified Files:
configure.zcml definition.py importexport_index.pt
Log Message:
now the import of an fix example stateful workflow works
=== Packages3/workflow/browser/configure.zcml 1.12 => 1.13 ===
--- Packages3/workflow/browser/configure.zcml:1.12 Thu Mar 27 05:55:58 2003
+++ Packages3/workflow/browser/configure.zcml Thu Mar 27 08:31:53 2003
@@ -67,6 +67,14 @@
menu="zmi_views" title="Import/Export"
/>
+<browser:pages
+ for="zope.app.interfaces.workflow.IProcessDefinition"
+ permission="zope.workflow.ManageProcessDefinitions"
+ class=".definition.ImportExportView">
+
+ <browser:page name="import.html" attribute="testimport" />
+</browser:pages>
+
<!-- ProcessDefinitionElementContainer -->
=== Packages3/workflow/browser/definition.py 1.7 => 1.8 ===
--- Packages3/workflow/browser/definition.py:1.7 Thu Mar 27 05:55:58 2003
+++ Packages3/workflow/browser/definition.py Thu Mar 27 08:31:53 2003
@@ -63,3 +63,52 @@
data)
def _getUtil(self):
return getUtility(self.context, IProcessDefinitionImportExport)
+
+ def testimport(self):
+ xml = """<?xml version="1.0"?>
+<workflow type="Zope3Workflow" title="PublishReview">
+ <schema name="newssite.workflow.schema.TestSchema"/>
+ <states>
+ <state name="INITIAL" title=""/>
+ <state name="private" title="Private"/>
+ <state name="pending" title="Pending"/>
+ <state name="published" title="Public"/>
+ </states>
+ <transitions>
+
+ <transition destinationState="private"
+ sourceState="INITIAL" title="make private"
+ triggerMode="Automatic"
+ name="initial_private"/>
+
+
+ <transition destinationState="pending"
+ sourceState="private" title="submit"
+ triggerMode="Manual"
+ name="private_pending"/>
+
+
+ <transition destinationState="published"
+ permission="zope.ManageContent"
+ sourceState="pending" title="publicate"
+ triggerMode="Manual"
+ name="pending_published"/>
+
+
+ <transition destinationState="private"
+ sourceState="pending"
+ title="cancel submission"
+ triggerMode="Manual"
+ name="pending_private"/>
+
+
+ <transition destinationState="private"
+ sourceState="published" title="take back"
+ triggerMode="Manual"
+ name="published_private"/>
+
+ </transitions>
+
+</workflow>
+"""
+ return self.doImport(xml)
=== Packages3/workflow/browser/importexport_index.pt 1.2 => 1.3 ===
--- Packages3/workflow/browser/importexport_index.pt:1.2 Thu Mar 27 05:55:58 2003
+++ Packages3/workflow/browser/importexport_index.pt Thu Mar 27 08:31:53 2003
@@ -4,6 +4,9 @@
<p>Import / Export ProcessDefinitions:</p>
+ Import: <a href="@@import.html">testimport</a>
+ <p>
+ Export:<br/>
<pre tal:content="view/doExport" />
</div>