Genpact Cora Knowledge Center

Support

POST /ProcessInstancesService.svc/GetData

Returns all items that a user has permission to view for a specific workflow space. Although this call returns data, to support the numerous parameters, this call uses a POST method.

Method

POST

URL

https://localhost/Flowtime/_vti_bin/Flowtime/ProcessInstancesService.svc/GetData


Request Parameters

NameTypeRequiredDescription
PageSizeintegeroptionalNumber of records returned on a page.
PageNumintegeroptionalNumber of the page to retrieve records for.
ContextMenuIdstringoptionalName of menu for the item.
IgnoreUserTimebooleanoptionalEngine time or user time.
SortDirectionenumoptionaldesc = 0, asc = 1
SortFieldstringoptionalName of field by which to sort the returned processes.
FilterExpressionobjectoptionalExpression by which to filter.
WorkflowInstanceStateenumoptionalOpen = 0, Closed = 1
WorkflowSpaceIdguidoptionalGUID of the process.

Example Request

$.ajax({
 type: "POST",
 url: "https://server:port/Flowtime_vti_bin/Flowtime/ProcessInstancesService.svc/GetData",
 data: JSON.stringify(
 { request:
 { 
 "PageSize":20,
"PageNum":1,
"ContextMenuId":"default",
"IgnoreUserTime":false,
"SortDirection":1,
"SortField":"InstanceId",
"FilterExpression":{},
"WorkflowInstanceState":0,
"WorkflowSpaceId":"37bc4c4d-d5d7-4762-a433-76e905fcd0a7",
 }
 }),
 headers:
 {
"uiculture": "en-GB",
"culture": "en-GB",
"theme": "/Flowtime/Shared Resources/Themes/Sequence8/",
"X-SqXsrfToken":xsrf,
"config": "Portal"
 },
 dataType: "json",
 contentType: "application/json; charset=utf-8",
 success: function (data) {


 alert("Return: "+data.CurrentRows+" Items from "+data.TotalRows+" Items.\n The first InstanceId is: "+data.Items[0].InstanceId+".");
 },
 error: function (error) {
 console.log(error);
 }
 });

Response Parameters

NameTypeDescription
CurrentRowsintegerNumber of items returned.
ItemsarrayList of items returned. Each item contains properties as defined in the config file, for example {WorkflowInstance:1 ,[etc.]}.
TotalRowsintegerNumber of total items in the system.