Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plone.api.content.get_state does not work with two workflows #459

Open
sandrarum opened this issue Jul 23, 2021 · 1 comment
Open

plone.api.content.get_state does not work with two workflows #459

sandrarum opened this issue Jul 23, 2021 · 1 comment

Comments

@sandrarum
Copy link

For our project we use two workflows for one object:

  1. Plone Standard Workflow to controll access
  2. Custom Workflow to controll export to another database

The plone.api function returns the state of the first workflow. There is no way to access the second one vie plone.api e.g. by optional parameter providing the wrokflow_id or the state_variable.

@mauritsvanrees
Copy link
Sponsor Member

The lazy (but valid) answer is: plone.api was/is intended for the 20 percent use cases that you use 80 percent of the time. Using two workflows is a corner case that falls far outside of the 20 percent use case, so this is not supported.

It could probably be added, but the danger is that this makes the code for the normal use case twice as complicated. A PR could be considered though.

Easiest might be to copy the code from plone.api and adapt it in your own project.
The code starts here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants