Change workflow state via API

I checked through the API document and realized that there seems to be no function to call to change the workflow state for a specific document.

The purpose is I want to build a simple mobile UI for the end-user to interact with the workflow without going into Mayan. Mayan UI works well on desktop but on mobile where the user cannot change the state using transition, because they cannot tap on it.

If anyone knows how to achieve this, please help me.

Hi taro

I did not use the api yet, but I have an idea to facilitate what you want
you can add a custom field (metadata type) to the document and make the transition in the workflow based on the change of this field (assuming you can change this field through api).

and with the new feature introduced in the last version (thanks to Roberto) you can hide this field from users and from document entry wizard.

Hope this helps.

1 Like

Hi taro,

there is a function to change the document’s workflow state via api, please see:

# Transition a document workflow by creating a new document workflow instance log entry.
# ---
# /documents/{document_id}/workflow_instances/{workflow_instance_id}/log_entries/

and

# Returns a list of all the possible transition choices for the workflow instance.
# ---
# /documents/{document_id}/workflow_instances/{workflow_instance_id}/log_entries/transitions/

Torsten

2 Likes

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.