Skip to main content

Workflow add-ons for collective.powertoken support for Plone

Project description

Introduction

A workflow action implementation for collective.powertoken.

How to use

Add this product to your Plone installation, then you will be able to register Power Tokens that performs workflow action when consumed.

>>> from collective.powertoken.core.interfaces import IPowerTokenUtility
>>> utility = getUtility(IPowerTokenUtility)
>>> token = utility.enablePowerToken(document, 'workflow.doAction', workflow_action='publish')
>>> results = utility.consumeActions(document, token)
>>> print results
['published']

You will get the new state of the document as result.

You can optionally add a runtime parameter to the action provider, for adding also the workflow state change comment.

>>> token = utility.enablePowerToken(document, 'workflow.doAction', workflow_action='retract')
>>> results = utility.consumeActions(document, token, comment="Hello! I hide this!")
['private']

Parameters

workflow_action (configuration parameter)

Required. You need to provide the workflow action to perform.

comment (runtime parameter)

Optional. Use to save also a comment to the workflow action.

Use case

You can perform a state change for a document, regardless of your roles in the site.

Authors

This product was developed by RedTurtle Technology team.

RedTurtle Technology Site

Changelog

0.2.0 (2012-02-15)

  • added support for comment runtime parameter [keul]

  • fixed documentation [keul]

0.1.0 (2012-01-11)

  • initial release

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.powertoken.workflow-0.2.0.tar.gz (12.7 kB view details)

Uploaded Source

File details

Details for the file collective.powertoken.workflow-0.2.0.tar.gz.

File metadata

File hashes

Hashes for collective.powertoken.workflow-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8b798588db02baf1c88cc5b2c34776f9fa8c78124a1cb49f6b09171acae06b27
MD5 75662d2d23ade132aa897d6b00e4fb52
BLAKE2b-256 88e32e81444c1657019cb56f96ff24d9bf10a9849a5b96ac606d76b414be5c47

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page