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 192
    • Issues 192
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 9
    • Merge requests 9
  • 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 EDMSMayan EDMS
  • Mayan EDMSMayan EDMS
  • Issues
  • #1043
Closed
Open
Created Oct 09, 2021 by Ludovic Anterieur@lanterieur

[4.1] [API] Feature Request: Endpoint for workflow state action

Description:

  • Front End API View has five urls dedicated to workflows/workflow_templates/states/<workflow_template_state_id>/actions mayan/apps/document_states/urls.py#L123
  • API urls do not exist mayan/apps/document_states/urls.py#L275
  • API views are not defined for state actions mayan/apps/document_states/api_views/workflow_template_api_views.py

Use case:

Our use case is related to consumption of documents with EXIF data which condition the document type. We wish to have an external manager for the pairs "file EXIF data"-"document type". The API manager has to be able to create document types and then immediately create an action on an existing state that changes document types based on the value. We do not wish to use the external manager to feed documents one by one to Mayan EDMS, documents are dumped in bulk to a watched folder by multiple workers. We would like to avoid to have to manually create the workflow state action (essentially change doc type with a string comparison condition)

We have other use cases, this one is the most critical.

Request:

  • POST: api/v4/workflow_templates/id/states/id/actions/
{
"label": <string>,
"enabled": <boolean>,
"when": <integer>,
"action_path": <string>,
"action_data": <string>,
"condition": <string>
}
  • GET: api/v4/workflow_templates/id/states/id/actions/id/
  • PUT/PATCH: api/v4/workflow_templates/id/states/id/actions/id/
  • DELETE: api/v4/workflow_templates/id/states/id/actions/id/
Assignee
Assign to
Time tracking