Hi,
I've been trying to filter the tasks based on property value using WorkflowTaskQuery where I'm implementing setProcessCustProps() method in which I'm passing a list of property-values.
I was able to fetch some of the properties but when tried with bpm:startDate, bpm:completionDate, it wasn't fetching.
I tried providing the date in ISO8601 format (bpm:startDate/2019-07-22T16:49:59.000Z) as I'm using task-instances REST API.
Now, I have a requirement to filter the tasks based on date provided which is equal or greater than the task start date before fetching the tasks. I tried searching but didn't find any solution of filtering using WorkflowTaskQuery.
Is there any way to fetch task details by applying task start date filter using WorkflowTaskQuery and should the value provided to the parameter (Ex: bpm:startDate) be in ISO8601 format?
Please do help with the solution.
Thank you!
Take reference of this Java file.
Here they have provided how to gilter task.
TaskInstancesGet.java
Thanks for the response!
I am taking TaskInstancesGet.java class as a reference.
WorkflowTaskQuery taskQuery = new WorkflowTaskQuery();
taskQuery.setActive(null);
taskQuery.setWorkflowDefinitionName(workflowName);
taskQuery.setTaskState(state);
propertyFilter.put(propertyQName, propValue);
taskQuery.setProcessCustomProps(propertyFilter);
taskQuery.setOrderBy(new OrderBy[]{OrderBy.TaskDue_Asc});
This is the code of WorkflowTaskQuery where in properties are filtered in setProcessCustomProps().
In this code it basically matches with the values & names of the properties then fetches the task details. But when i tried filtering by bpm:startDate the response is empty. My requirement is to fetch all the tasks based on the date provided which is equal or greater than the task start date (bpm:startDate).
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.