use of org.alfresco.service.cmr.workflow.WorkflowTaskQuery in project alfresco-repository by Alfresco.
the class AbstractWorkflowServiceIntegrationTest method createWorkflowTaskQuery.
protected WorkflowTaskQuery createWorkflowTaskQuery(WorkflowTaskState state) {
WorkflowTaskQuery taskQuery = new WorkflowTaskQuery();
taskQuery.setTaskState(state);
return taskQuery;
}
use of org.alfresco.service.cmr.workflow.WorkflowTaskQuery in project alfresco-repository by Alfresco.
the class ActivitiTaskComponentTest method createWorkflowTaskQuery.
private WorkflowTaskQuery createWorkflowTaskQuery(WorkflowTaskState state) {
WorkflowTaskQuery taskQuery = new WorkflowTaskQuery();
taskQuery.setTaskState(state);
return taskQuery;
}
use of org.alfresco.service.cmr.workflow.WorkflowTaskQuery in project alfresco-repository by Alfresco.
the class ActivitiTaskComponentTest method checkTaskVariableNoMatch.
private void checkTaskVariableNoMatch(WorkflowTaskState state, QName varName, Object varValue) {
WorkflowTaskQuery taskQuery = createWorkflowTaskQuery(state);
Map<QName, Object> customProperties = new HashMap<QName, Object>();
customProperties.put(varName, varValue);
taskQuery.setTaskCustomProps(customProperties);
assertNoTaskPresent(taskQuery);
}
use of org.alfresco.service.cmr.workflow.WorkflowTaskQuery in project alfresco-repository by Alfresco.
the class ActivitiTaskComponentTest method testQueryUsingNodeRef.
@Test
public void testQueryUsingNodeRef() {
NodeRef nodeRef = new NodeRef("workspace:///someRef");
QName nodeRefPropQname = QName.createQName("testProp");
HashMap<QName, Serializable> props = new HashMap<QName, Serializable>();
props.put(nodeRefPropQname, nodeRef);
// Start the workflow-path
workflowEngine.startWorkflow(workflowDef.getId(), props);
// Test querying with a value of type NodeRef
WorkflowTaskQuery taskQuery = createWorkflowTaskQuery(WorkflowTaskState.IN_PROGRESS);
HashMap<QName, Object> queryParams = new HashMap<QName, Object>();
queryParams.put(nodeRefPropQname, nodeRef);
taskQuery.setProcessCustomProps(queryParams);
List<WorkflowTask> tasks = workflowEngine.queryTasks(taskQuery);
assertNotNull(tasks);
assertEquals(1, tasks.size());
}
Aggregations