Wayne Glover via Plone Community wrote at 2023-6-22 23:00 +0000:
...
i thought there would be an option in the "Destination state" option that would include somehting like: "return to previous state". of course it doesn't, hence the question.
When you design a feature (such as "workflow support"),
it is always possible to put in further functionality -- at
the cost of greater complexity and increased development and
maintenance costs.
Therefore, you have to balance generality and complexity.
The Products.DCWorkflow
design is based on a simple
(easy to understand, implement and maintain) state machine
with states and transitions between (literal) states.
While it would have been possible to specify the transistion target state via
variables (instead of a literal state selected from a state menu)
it would have introduced a lot of conceptional, implementation and UI
complexity -- to the benefit of very few use cases (such as yours).
Therefore, it is not done.
However, Plone (and its underlaying CMFCore
) does not
force you to use DCWorkflow
for the workflow implementation.
You can implement your own workflow tool (likely based on the DCWorkflow
tool) and tell Plone (via GenericSetup
) to base
portal_workflow
on your implementation.
DCWorkflow
targets a large audience; its features must therefore
be easily understandable and thoroughly documented and tested.
Your extension must only satisfy your own requirements;
it therefore may contain ad hoc solutions (e.g. a special
transaction the target state of which is not selected via a
state menu but fixed to be the current state or
the addition of a special entry "remain in state" in the state selection
menu).