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
| Name | Type | Required | Description |
|---|---|---|---|
| app | string | yes | Django app label. |
| model | string | yes | Model 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