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.
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
Metadata
Release files for collective.powertoken.workflow 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| collective.powertoken.workflow-0.2.0.tar.gz | 12.7 kB | Without provenance | Details for collective.powertoken.workflow-0.2.0.tar.gz |
Release files / collective.powertoken.workflow-0.2.0.tar.gz
| Download URL | collective.powertoken.workflow-0.2.0.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b798588db02baf1c88cc5b2c34776f9fa8c78124a1cb49f6b09171acae06b27
|
|
BLAKE2b-256 checksum How to use checksums |
88e32e81444c1657019cb56f96ff24d9bf10a9849a5b96ac606d76b414be5c47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for collective.powertoken.workflow 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.