Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Mayan EDMS Mayan EDMS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 205
    • Issues 205
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mayan EDMS
  • Mayan EDMSMayan EDMS
  • Issues
  • #1044
Closed
Open
Created Oct 11, 2021 by Ludovic Anterieur@lanterieur

[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 set WorkflowTransitionTriggerEventRelationshipFormSet. See mayan/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. See mayan/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" ]
}
Assignee
Assign to
Time tracking