Hello everyone,
While testing the workflow manager locally, I encountered an issue when editing and saving transitions. I wanted to confirm whether this is a known problem or unintended behavior before opening a formal issue or preparing a fix.
What I observed
When editing a transition (for example changing the title or another field) and clicking Save changes, the frontend sends a PATCH request to the transitions endpoint: “/@transitions/{workflow_id}/{transition_id}”
The request is sent correctly, but the backend responds with: 500 Internal Server Error
From the backend logs, the error is: “TypeError: Object of type Expression is not JSON serializable”
The traceback indicates that the failure occurs while rendering the JSON response in plone.restapi, suggesting that a workflow object (likely a guard or condition expression) is being returned without being converted to a JSON-serializable format.
Why this seems problematic
Because of this error:
-
Transition edits cannot be reliably saved from the UI.
-
The user receives a server error instead of a structured response.
-
Workflow editing becomes difficult during normal use.
Since transition editing is a core feature, this appears to affect standard workflows rather than an edge case.
My current understanding (please correct me if I’m mistaken)
It looks like the transition serializer or response builder may be returning a DCWorkflow object (such as an Expression) directly, and this is not converted to a JSON-safe value before calling json.dumps().

