Skip to content

fetchWorkflowTransition ​

Overview ​

Fetches the transitions the authenticated user is permitted to run on a model and caches them in workflowTransitions.

A cached list resolves at once, and a cached error rejects at once. A request already in flight for the same model is shared. The list is empty when workflow is off or the model does not enable it.

Signature ​

fetchWorkflowTransition(app, model)

Parameters ​

NameTypeRequiredDescription
appstringyesDjango app label.
modelstringyesModel name.

Returns ​

Promise

A promise for the permitted transitions, or undefined when the server sends an empty response. It rejects with WorkflowPermissionDeniedError on a 403, and with WorkflowError for other failures.

Source ​

client/lib/stores/storeWorkflow.js:332