Show TOC

Filtering ProcessesLocate this document in the navigation structure

You can filter processes in task collections for most of the properties of the ProcessInstance entity type. This topic lists the supported properties as well as the supported OData binary operators in the expressions for the $filter query option.

The filtering of processes is supported for the following properties of the ProcessInstance entity type:
  • InstanceId
  • StartDate
  • EndDate
  • DefinitionId
  • Status
  • ParentProcessInstanceId
  • RootProcessInstanceId
  • ProcessInitiatorName
The following values can be specified for the Status property:
  • IN_PROGRESS
  • COMPLETED
  • CANCELLED
  • SUSPENDED
  • IN_ERROR
The table below shows which OData binary operators are supported for properties of the ProcessInstance entity type in the expressions for the $filter query option:
Property/Operator EQ NE GE LE
InstanceId x x    
StartDate x x x x
EndDate x x x x
DefinitionId x x    
Status x x    
ParentProcessInstanceId x x    
RootProcessInstanceId x      
ProcessInitiatorName x x    

Only binary operators from the table above are supported. Besides the binary operators, only 'and' and 'or' logical operators are supported, as well as open '(' and closed ')' parentheses.

Examples
Sample Code Get all the running or suspended processes of a particular process definition
GET /bpmodata/processes.svc/ProcessCollection?$filter=(Status eq 'IN_PROGRESS' or Status eq 'SUSPENDED') and DefinitionId eq '3a778c5e25c399396bcf0ae9b1f16b44'
Sample Code Get all the running processes that were started in September 2014
GET /bpmodata/processes.svc/ProcessCollection?$filter=Status eq 'IN_PROGRESS' and StartDate ge datetimeoffset'2014-09-01T00:00:00Z' and StartDate le datetimeoffset'2014-09-30T00:00:00Z'
Sample Code Get all the running processes that were started by John Doe
GET /bpmodata/processes.svc/ProcessCollection?$filter=Status eq 'IN_PROGRESS' and ProcessInitiatorName eq 'john_doe'

In the example, the unique name of the process initiator should be specified for the ProcessInitiatorName property.