Skip to main content

GenericSetup importer and exporter for workflow definitions that uses CSV instead of XML

Project description

by Martin Aspeli <optilude@gmail.com>

This package contains tools for working with DC Workflow definitions via spreadsheets (or rather, CSV format) as well as debugging aids to make it easier to work with security and workflow in Zope 2 and Plone.

It consists of:

  • A GenericSetup exporter that can dump a workflow definition to a CSV file

  • A GenericSetup importer that can create a workflow definition from a CSV file

  • An in-browser tool to sanity-check a workflow

  • A browser view to dump a workflow in the site to CSV as a one-off

  • A browser view to show the roles of a user in a given context

CSV import/export

Please note that the CSV format is not completely equivalent to the standard XML-based GenericSetup format to import/export workflow definitions. If you require the full power of DCWorkflow, you should continue to use the XML based format. This is not (just) due to laziness - the CSV format has been simplified to make common operations easy.

For an example CSV file, see

collective/wtf/tests/profiles/testing/test_wf.csv.

To be imported as part of a GenericSetup extension profile, a file like this would normally go in

profiles/default/workflow_csv/wf_name.csv

where wf_name is the name of the workflow in portal_workflow.

Note that if a full workflow definition does exist (e.g. in profiles/default/workflows/my_workflow/definition.xml), the CSV importer will not attempt to run an import, so as not to conflict or overwrite changes.

To download a workflow definition in CSV format as a one-off, type a URL like this into your browser:

http://localhost:8080/Plone/portal_workflow/my_workflow/@@to-csv

Here, “Plone” is the name of the Plone instance and “my_workflow” is the name of your workflow definition. You will be asked to download a CSV file.

Workflow sanity checker

To invoke the sanity checker, type a URL like this into your browser:

http://localhost:8080/Plone/portal_workflow/my_workflow/@@sanity-check

Again, “Plone” is the name of the Plone instance and “my_workflow” is the name of the workflow definition. The output will be written to the browser window in plain text.

Other debugging aids

To view the current roles of a given user in a given context, type a URL like this into your browser when logged in as a Manager user:

http://localhost:8080/Plone/context/@@display-roles-in-context?user=<user>

Again, “Plone” is the name of the Plone instance. “context” could be any object. <user> should be replaced by the login name/id of the user you want to fetch roles for. The output will be written to the browser window in plain text.

Changelog

1.0b2

  • Add the ability to display roles in any context via a simple browser view [optilude]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.wtf-1.0b4.tar.gz (17.4 kB view hashes)

Uploaded source

Built Distribution

collective.wtf-1.0b4-py2.4.egg (48.6 kB view hashes)

Uploaded 2 4

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page