当前位置: 首页>>代码示例>>Java>>正文


Java Filter.extend方法代码示例

本文整理汇总了Java中org.camunda.bpm.engine.filter.Filter.extend方法的典型用法代码示例。如果您正苦于以下问题:Java Filter.extend方法的具体用法?Java Filter.extend怎么用?Java Filter.extend使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.camunda.bpm.engine.filter.Filter的用法示例。


在下文中一共展示了Filter.extend方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testExtendTaskQueryWithCandidateUserExpressionAndIncludeAssignedTasks

import org.camunda.bpm.engine.filter.Filter; //导入方法依赖的package包/类
public void testExtendTaskQueryWithCandidateUserExpressionAndIncludeAssignedTasks() {
  // create an empty query and save it as a filter
  TaskQuery emptyQuery = taskService.createTaskQuery();
  Filter emptyFilter = filterService.newTaskFilter("empty");
  emptyFilter.setQuery(emptyQuery);

  // create a query with candidate user expression and include assigned tasks
  // and save it as filter
  TaskQuery query = taskService.createTaskQuery();
  query.taskCandidateUserExpression("${'test'}").includeAssignedTasks();
  Filter filter = filterService.newTaskFilter("filter");
  filter.setQuery(query);

  // extend empty query by query with candidate user expression and include assigned tasks
  Filter extendedFilter = emptyFilter.extend(query);
  TaskQueryImpl extendedQuery = extendedFilter.getQuery();
  assertEquals("${'test'}", extendedQuery.getExpressions().get("taskCandidateUser"));
  assertTrue(extendedQuery.isIncludeAssignedTasks());

  // extend query with candidate user expression and include assigned tasks with empty query
  extendedFilter = filter.extend(emptyQuery);
  extendedQuery = extendedFilter.getQuery();
  assertEquals("${'test'}", extendedQuery.getExpressions().get("taskCandidateUser"));
  assertTrue(extendedQuery.isIncludeAssignedTasks());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:26,代码来源:FilterTaskQueryTest.java

示例2: testExtendTaskQueryWithCandidateGroupExpressionAndIncludeAssignedTasks

import org.camunda.bpm.engine.filter.Filter; //导入方法依赖的package包/类
public void testExtendTaskQueryWithCandidateGroupExpressionAndIncludeAssignedTasks() {
  // create an empty query and save it as a filter
  TaskQuery emptyQuery = taskService.createTaskQuery();
  Filter emptyFilter = filterService.newTaskFilter("empty");
  emptyFilter.setQuery(emptyQuery);

  // create a query with candidate group expression and include assigned tasks
  // and save it as filter
  TaskQuery query = taskService.createTaskQuery();
  query.taskCandidateGroupExpression("${'test'}").includeAssignedTasks();
  Filter filter = filterService.newTaskFilter("filter");
  filter.setQuery(query);

  // extend empty query by query with candidate group expression and include assigned tasks
  Filter extendedFilter = emptyFilter.extend(query);
  TaskQueryImpl extendedQuery = extendedFilter.getQuery();
  assertEquals("${'test'}", extendedQuery.getExpressions().get("taskCandidateGroup"));
  assertTrue(extendedQuery.isIncludeAssignedTasks());

  // extend query with candidate group expression and include assigned tasks with empty query
  extendedFilter = filter.extend(emptyQuery);
  extendedQuery = extendedFilter.getQuery();
  assertEquals("${'test'}", extendedQuery.getExpressions().get("taskCandidateGroup"));
  assertTrue(extendedQuery.isIncludeAssignedTasks());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:26,代码来源:FilterTaskQueryTest.java

示例3: testExtendTaskQueryWithCandidateGroupInAndCandidateGroup

import org.camunda.bpm.engine.filter.Filter; //导入方法依赖的package包/类
public void testExtendTaskQueryWithCandidateGroupInAndCandidateGroup() {
  // create an query with candidate group in and save it as a filter
  TaskQueryImpl candidateGroupInQuery = (TaskQueryImpl)taskService.createTaskQuery().taskCandidateGroupIn(Arrays.asList("testGroup", "testGroup2"));
  assertEquals(2, candidateGroupInQuery.getCandidateGroups().size());
  assertEquals("testGroup", candidateGroupInQuery.getCandidateGroups().get(0));
  assertEquals("testGroup2", candidateGroupInQuery.getCandidateGroups().get(1));
  Filter candidateGroupInFilter = filterService.newTaskFilter("Groups filter");
  candidateGroupInFilter.setQuery(candidateGroupInQuery);

  // create a query with candidate group
  // and save it as filter
  TaskQuery candidateGroupQuery = taskService.createTaskQuery().taskCandidateGroup("testGroup2");

  // extend candidate group in filter by query with candidate group
  Filter extendedFilter = candidateGroupInFilter.extend(candidateGroupQuery);
  TaskQueryImpl extendedQuery = extendedFilter.getQuery();
  assertEquals(1, extendedQuery.getCandidateGroups().size());
  assertEquals("testGroup2", extendedQuery.getCandidateGroups().get(0));
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:20,代码来源:FilterTaskQueryTest.java

示例4: testExtendTaskQueryWithCandidateGroupInExpressionAndIncludeAssignedTasks

import org.camunda.bpm.engine.filter.Filter; //导入方法依赖的package包/类
public void testExtendTaskQueryWithCandidateGroupInExpressionAndIncludeAssignedTasks() {
  // create an empty query and save it as a filter
  TaskQuery emptyQuery = taskService.createTaskQuery();
  Filter emptyFilter = filterService.newTaskFilter("empty");
  emptyFilter.setQuery(emptyQuery);

  // create a query with candidate group in expression and include assigned tasks
  // and save it as filter
  TaskQuery query = taskService.createTaskQuery();
  query.taskCandidateGroupInExpression("${'test'}").includeAssignedTasks();
  Filter filter = filterService.newTaskFilter("filter");
  filter.setQuery(query);

  // extend empty query by query with candidate group in expression and include assigned tasks
  Filter extendedFilter = emptyFilter.extend(query);
  TaskQueryImpl extendedQuery = extendedFilter.getQuery();
  assertEquals("${'test'}", extendedQuery.getExpressions().get("taskCandidateGroupIn"));
  assertTrue(extendedQuery.isIncludeAssignedTasks());

  // extend query with candidate group in expression and include assigned tasks with empty query
  extendedFilter = filter.extend(emptyQuery);
  extendedQuery = extendedFilter.getQuery();
  assertEquals("${'test'}", extendedQuery.getExpressions().get("taskCandidateGroupIn"));
  assertTrue(extendedQuery.isIncludeAssignedTasks());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:26,代码来源:FilterTaskQueryTest.java

示例5: testExtendingSorting

import org.camunda.bpm.engine.filter.Filter; //导入方法依赖的package包/类
public void testExtendingSorting() {
  // create empty query
  TaskQueryImpl query = (TaskQueryImpl) taskService.createTaskQuery();
  saveQuery(query);

  // assert default sorting
  query = filter.getQuery();
  assertTrue(query.getOrderingProperties().isEmpty());

  // extend query by new task query with sorting
  TaskQueryImpl sortQuery = (TaskQueryImpl) taskService.createTaskQuery().orderByTaskName().asc();
  Filter extendedFilter = filter.extend(sortQuery);
  query = extendedFilter.getQuery();

  List<QueryOrderingProperty> expectedOrderingProperties =
      new ArrayList<QueryOrderingProperty>(sortQuery.getOrderingProperties());

  verifyOrderingProperties(expectedOrderingProperties, query.getOrderingProperties());

  // extend query by new task query with additional sorting
  TaskQueryImpl extendingQuery = (TaskQueryImpl) taskService.createTaskQuery().orderByTaskAssignee().desc();
  extendedFilter = extendedFilter.extend(extendingQuery);
  query = extendedFilter.getQuery();

  expectedOrderingProperties.addAll(extendingQuery.getOrderingProperties());

  verifyOrderingProperties(expectedOrderingProperties, query.getOrderingProperties());

  // extend query by incomplete sorting query (should add sorting anyway)
  sortQuery = (TaskQueryImpl) taskService.createTaskQuery().orderByCaseExecutionId();
  extendedFilter = extendedFilter.extend(sortQuery);
  query = extendedFilter.getQuery();

  expectedOrderingProperties.addAll(sortQuery.getOrderingProperties());

  verifyOrderingProperties(expectedOrderingProperties, query.getOrderingProperties());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:38,代码来源:FilterTaskQueryTest.java


注:本文中的org.camunda.bpm.engine.filter.Filter.extend方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。