Search.../

getWorkflowInfo( )

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.

Description

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.

Syntax

function getWorkflowInfo(workflowId: string): Promise<Workflow>

getWorkflowInfo Parameters

NAME
TYPE
DESCRIPTION
workflowId
string

ID of the workflow to retrieve.

Returns

Fulfilled - Retrieved workflow.

Return Type:

Promise<Workflow>
NAME
TYPE
DESCRIPTION
workflowInfo
WorkflowInfo

Workflow information.

winPhaseId
string

ID of the win phase.

Was this helpful?

Get a workflow

Copy Code
1import { Permissions, webMethod } from 'wix-web-module';
2import { workflows } from 'wix-crm-backend';
3
4export const getWorkflowInfo = webMethod(Permissions.Anyone, (workflowId) => {
5 return workflows.getWorkflowInfo(workflowId);
6});
7
8/* Returns a promise that resolves to:
9 *
10 * {
11 * "name": "My Workflow",
12 * "id": "27cb0001-a464-4e1b-91c2-83d666577b75",
13 * "createdDate": "2019-05-19T12:35:55.408Z",
14 * "description": "Workflow description"
15 * }
16 */