Page 1 of 1

Support for PATCH / PUT / DELETE methods in REST "action" for a workflow

Posted: Wed Feb 26, 2020 5:07 pm
by joekhoobyar
In order to enable automated processing of documents in my workflow, I should have support for PATCH / PUT / DELETE methods in a REST "action" for my workflow state.

Today, this is not possible, I can only use a POST. This means that I cannot call a large percentage of the Mayan REST API from my workflow action.

Can we add this feature, easily?

Re: Support for PATCH / PUT / DELETE methods in REST "action" for a workflow

Posted: Thu Feb 27, 2020 6:11 am
by rosarior
Thanks for the request. This is not implemented as it was originally meant to trigger outside actions. With the new possibility of using the HTTP action to trigger Mayan's own API, started and will continue to expand this feature.

It is late in the version 3.3 cycle to add this as that version is stable and in bug fix only mode but now that work on version 4.0 has started, this is something that will be added to the roadmap and implemented after the critical tickets (new API, Django 2.2) are closed.

Thanks for the bringing attention to this, it is a very good idea and something that will bring much benefit for everybody.

Re: Support for PATCH / PUT / DELETE methods in REST "action" for a workflow

Posted: Mon Mar 16, 2020 9:35 pm
by happyquark
I've been monitoring the project very closely for this and it seems it has landed!

https://gitlab.com/mayan-edms/mayan-edm ... 63724a8590

I'm trying to build a dev package to test this and provide feedback but from the code alone it seems that the method selection is open ended. This has the potential to also support WebDAV and flow control methods!

Re: Support for PATCH / PUT / DELETE methods in REST "action" for a workflow

Posted: Fri Mar 20, 2020 6:17 am
by rosarior
Were you able to build the package and test this. I would like to have some feedback now that there is still time to make adjustments.

The instructions for building an installable package are here: https://docs.mayan-edms.com/chapters/de ... eases.html