Deprecated. This function is being discontinued in the upcoming months. We are working to provide alternatives, and we'll provide timely updates before implementing any changes. We understand that this transition might present challenges, and we appreciate your patience and understanding.
Retrieves a workflow by ID.
The getWorkflowInfo()
function returns a Promise that resolves to the workflow info
with the specified ID.
This function requires you to specify the ID of a workflow. To learn about retrieving IDs in the Workflow API, see Retrieving IDs.
function getWorkflowInfo(workflowId: string): Promise<Workflow>;
ID of the workflow to retrieve.
import { Permissions, webMethod } from "wix-web-module";
import { workflows } from "wix-crm-backend";
export const getWorkflowInfo = webMethod(Permissions.Anyone, (workflowId) => {
return workflows.getWorkflowInfo(workflowId);
});
/* Returns a promise that resolves to:
*
* {
* "name": "My Workflow",
* "id": "27cb0001-a464-4e1b-91c2-83d666577b75",
* "createdDate": "2019-05-19T12:35:55.408Z",
* "description": "Workflow description"
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.