Unify and manage your data

Filter workflow tasks using entity attributes

Learn how to use the objectFilter parameter to filter workflow tasks based on entity-level criteria using the Entity Search API syntax.

Use the objectFilter parameter to restrict the workflow tasks returned or updated by API operations based on conditions related to the associated entities. For example, you can filter tasks associated with entities of type HCP where the FirstName is Alex.

This parameter uses the same syntax as the Platform Search API. You can apply operators such as equals, exists, and logical combinations to define your filter expression.

Note: The objectFilter expression limits results to tasks linked to entities that match the specified condition. The task must meet both the filter (task-level metadata) and the objectFilter (entity-level metadata). This feature applies only to open tasks, as businessProcessData is removed once a workflow is completed.

Example

To retrieve all tasks for entities of type HCP where FirstName is Alex:


POST https://{workflowHost}/workflow-adapter/workflow/{tenantId}/tasks?checkAccess=true
{
  "ascending": false,
  "orderBy": "createTime",
  "offset": 0,
  "max": 20,
  "objectFilter": "equals(type,'configuration/entityTypes/HCP') and equals(attributes.FirstName,'Alex')"
}
    

The objectFilter is evaluated using the Search API. Reltio combines it with system-defined filters such as exists(businessProcessData.businessProcessName) and exists(businessProcessData.tasks.taskName) to identify entities with open workflow tasks. The filtered entity results are then merged with the workflow engine’s task data using a logical AND operation.

Limitations

  • This feature works only for open tasks. Completed workflows no longer include businessProcessData and can’t be filtered using this parameter.
  • You can’t use objectFilter to filter tasks related to newly suggested entities, such as those in DCR CREATE_ENTITY operations, because those entities don’t yet exist in the platform index.