[4.1] [API] Feature Request: Endpoint for workflow transition trigger events
Related and similar to the closed ticket 1043 (Your speed at addressing new tickets is surprising and deeply appreciated. I really wanted to thank the team already.)
Description:
- There are endpoints for transition fields. See
mayan/apps/document_states/url.py
, Line 336 - There are no endpoints for transition trigger events
- The front end handles creation and deletion of transition-trigger_events relationships with a form
WorkflowTransitionTriggerEventRelationshipForm
in a setWorkflowTransitionTriggerEventRelationshipFormSet
. Seemayan/apps/document_states/forms.py
, Line 129. - The front end handles listing trigger_events for a given transition with a html widget
widget_transition_events
. Seemayan/apps/document_states/html_widgets.py
, Line 6
Use case:
Any scenario requiring creation of a workflow through the API with event based automated transitions.
Request:
As each "event-transition" relationship is a Model and and entry in public.document_states_workflowtransitiontriggerevent
, it would make sense to post/put/patch the full list of trigger_events to update the list as is done by the front end form (create & delete).
Having to send the full list to add or remove trigger events adds the need for a list getter similar to the html widget.
- POST: api/v4/workflow_templates/id/transitions/id/actions/
Either with event_type_id:
{
event_type_ids: [1,2,...]
}
or paths
{
event_types: ["namespace.label","namespace.label",...]
}
- GET: api/v4/workflow_templates/id/transitions/id/actions/
{
count: 2,
...
results: [ "namespace.label", "namespace.label" ]
}