listWorkflowsInfo( )
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 list of the site's workflows info.
The listWorkflowsInfo()
function returns a Promise that resolves to a list containing
information about the site's workflows.
Use the options
parameter to specify which workflows to retrieve and in which
order to retrieve them. Workflows can be sorted based on their "name"
.
If no limit
parameter is passed, the first 100 workflows are returned. Sort order
defaults to by "name"
ascending.
Syntax
function listWorkflowsInfo([options: ListOptions]): Promise<WorkflowList>
listWorkflowsInfo Parameters
NAME
TYPE
DESCRIPTION
Options to use when getting the list of workflows.
Returns
Fulfilled - List of retrieved workflows.
Return Type:
NAME
TYPE
DESCRIPTION
List of workflows matching the list options.
Number of items in the current results page.
Total number of workflows in the site.
Number of items returned per page with the current list options.
Total number of results pages.
Index of the current page. Indices are zero-based.
Was this helpful?
Get a list of workflows info
1import { Permissions, webMethod } from 'wix-web-module';2import { workflows } from 'wix-crm-backend';34export const listWorkflowsInfo = webMethod(Permissions.Anyone, () => {5 return workflows.listWorkflowsInfo(6 {7 "limit": 2,8 "skip": 10,9 "order": {10 "field": "name",11 "sort": "asc"12 }13 }14 );15});1617/* Returns a promise that resolves to:18 *19 * {20 * "items": [21 * {22 * "id": "f01971ac-5514-43b0-bf6c-dde93345e4e3",23 * "name": "First Workflow",24 * "createdDate": "2019-03-25T12:19:28.952Z",25 * "description": "First workflow description.",26 * },27 * {28 * "id": "d5a7848d-121b-4ee3-ab53-9ec6f4acaecc",29 * "name": "Second Workflow",30 * "createdDate": "2019-05-05T09:49:16.580Z",31 * "description": "Second workflow description.",32 * }33 * ],34 * "length": 2,35 * "totalCount": 100,36 * "pageSize": 2,37 * "totalPages": 50,38 * "currentPage": 539 * }40 */