mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Workflow REST API fixes for variable query
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55420 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1456,6 +1456,14 @@ public class TaskWorkflowApiTest extends EnterpriseWorkflowTestApi
|
||||
params.put("where", "(status = 'any' AND processBusinessKey = '" + businessKey + "')");
|
||||
assertTasksPresentInTaskQuery(params, tasksClient, completedTask.getId(), activeTask.getId());
|
||||
|
||||
params.clear();
|
||||
params.put("where", "(status = 'any' AND processBusinessKey MATCHES('" + businessKey + "'))");
|
||||
assertTasksPresentInTaskQuery(params, tasksClient, completedTask.getId(), activeTask.getId());
|
||||
|
||||
params.clear();
|
||||
params.put("where", "(status = 'any' AND processBusinessKey MATCHES('" + businessKey.substring(0, businessKey.length() - 2) + "%'))");
|
||||
assertTasksPresentInTaskQuery(params, tasksClient, completedTask.getId(), activeTask.getId());
|
||||
|
||||
// Activity definition id filtering
|
||||
params.clear();
|
||||
params.put("where", "(status = 'active' AND activityDefinitionId = 'verifyTaskDone' AND processId='" + processInstance.getId() +"')");
|
||||
@@ -1563,6 +1571,18 @@ public class TaskWorkflowApiTest extends EnterpriseWorkflowTestApi
|
||||
params.put("where", "(variables/numberVar < 'd:int 10')");
|
||||
assertEquals(0, getResultSizeForTaskQuery(params, tasksClient));
|
||||
|
||||
params.clear();
|
||||
params.put("where", "(variables/bpm_dueDate = 'd:datetime " + ISO8601DateFormat.format(new Date()) + "')");
|
||||
assertEquals(0, getResultSizeForTaskQuery(params, tasksClient));
|
||||
|
||||
params.clear();
|
||||
params.put("where", "(variables/bpm_dueDate = 'd:datetime 2013-09-15T12:22:31.866+0000')");
|
||||
assertEquals(0, getResultSizeForTaskQuery(params, tasksClient));
|
||||
|
||||
params.clear();
|
||||
params.put("where", "(variables/bpm_comment MATCHES ('test%'))");
|
||||
assertEquals(0, getResultSizeForTaskQuery(params, tasksClient));
|
||||
|
||||
// test with OR operator
|
||||
params.clear();
|
||||
params.put("where", "(status = 'any' OR candidateGroup = 'sales')");
|
||||
|
Reference in New Issue
Block a user