Joel Peltonen
Joel Peltonen

Reputation: 13412

How can I query the Activiti rest API for tasks with a createTime filter?

I query activiti-rest using taskVariables in the request like this: {name=foo, type=string, value=bar, operation=equals}. I can also filter with assignee etc. How can I limit the results to a certain time? I would need three kinds of queries:

  1. Tasks before a certain date: createTime < 1.1.2017
  2. Tasks after a certain date: createTime > 1.1.2017
  3. Tasks between certain dates: 1.1.2015 < createTime < 1.1.2017

I need these for both runtime and historic tasks. I could add a new myCreateTime taskVariable, but I don't know how to do that retroactively for existing tasks and it seems stupid.

Upvotes: 0

Views: 467

Answers (1)

Greg Harley
Greg Harley

Reputation: 3240

HAve you tried using the Task history query:

https://www.activiti.org/userguide/#restHistoricTaskInstancesGet

Add the taskCreatedOn, taskCreatedBefore and taskCreatedAfter filters?

Greg

Upvotes: 1

Related Questions