本文整理汇总了Java中org.camunda.bpm.cockpit.db.QueryParameters类的典型用法代码示例。如果您正苦于以下问题:Java QueryParameters类的具体用法?Java QueryParameters怎么用?Java QueryParameters使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
QueryParameters类属于org.camunda.bpm.cockpit.db包,在下文中一共展示了QueryParameters类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getProcessInstanceCounts
import org.camunda.bpm.cockpit.db.QueryParameters; //导入依赖的package包/类
@GET
public InstanceCountChart getProcessInstanceCounts() {
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("processDefinitionKey", processDefinitionKey);
QueryParameters<InstanceCountDto> queryParameters = new QueryParameters<InstanceCountDto>();
queryParameters.setParameter(parameters);
List<InstanceCountDto> result = getQueryService().executeQuery("cockpit.kpi.selectProcessInstanceCountPerHourForLast7Days", queryParameters);
return new InstanceCountChart(result);
}
示例2: getCycleTimePerHour
import org.camunda.bpm.cockpit.db.QueryParameters; //导入依赖的package包/类
@GET
// @Produces()
public CycleTimeDto getCycleTimePerHour() {
CycleTimeDto result = new CycleTimeDto();
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("processDefinitionKey", processDefinitionKey);
ProcessDefinition processDefinition = getProcessEngine().getRepositoryService().createProcessDefinitionQuery().processDefinitionKey(processDefinitionKey)
.latestVersion().singleResult();
InputStream bpmnXml = getProcessEngine().getRepositoryService().getProcessModel(processDefinition.getId());
Document bpmn = ExtenstionElementReader.parseBpmnXml(bpmnXml);
result.setName(ExtenstionElementReader.findProperty(bpmn, "KPI-Cycle-Start"));
parameters.put("activityIdStart", ExtenstionElementReader.findActivityIdForProperty(bpmn, "KPI-Cycle-Start"));
result.setStartName(ExtenstionElementReader.findActivityNameForProperty(bpmn, "KPI-Cycle-Start"));
parameters.put("activityIdEnd", ExtenstionElementReader.findActivityIdForProperty(bpmn, "KPI-Cycle-End"));
result.setEndName(ExtenstionElementReader.findActivityNameForProperty(bpmn, "KPI-Cycle-End"));
QueryParameters<CountPerDurationDto> queryParameters = new QueryParameters<CountPerDurationDto>();
queryParameters.setParameter(parameters);
if (parameters.get("activityIdStart") == null || parameters.get("activityIdEnd") == null) {
// use whoe process cycle time
result.setName(processDefinition.getName());
result.setStartName("START");
result.setEndName("END");
result.setTimesPerDuration(getQueryService().executeQuery("cockpit.kpi.selectCycleTimeForPDInHours", queryParameters));
} else {
result.setTimesPerDuration(getQueryService().executeQuery("cockpit.kpi.selectCycleTimeInHours", queryParameters));
}
return result;
}
开发者ID:camunda-consulting,项目名称:camunda-webapp-plugins,代码行数:36,代码来源:CycleTimePerHourResourceResource.java
示例3: getProcessInstanceCounts
import org.camunda.bpm.cockpit.db.QueryParameters; //导入依赖的package包/类
@GET
public List<CountPerOptionDto> getProcessInstanceCounts() {
HashMap<String, Object> parameters = new HashMap<String, Object>();
parameters.put("processDefinitionKey", processDefinitionKey);
ProcessDefinition processDefinition = getProcessEngine().getRepositoryService().createProcessDefinitionQuery().processDefinitionKey(processDefinitionKey)
.latestVersion().singleResult();
InputStream bpmnXml = getProcessEngine().getRepositoryService().getProcessModel(processDefinition.getId());
Document bpmn = ExtenstionElementReader.parseBpmnXml(bpmnXml);
List<String> activityIds = ExtenstionElementReader.findActivityIdsForProperty(bpmn, "KPI-Ratio");
// List<String> activityNames = ExtenstionElementReader.findActivityNamesForProperty(bpmn, "KPI-Ratio");
List<String> propertyNames = ExtenstionElementReader.findPropertyValues(bpmn, "KPI-Ratio");
if (activityIds.size()==0) {
activityIds = ExtenstionElementReader.findEndEventActivities(bpmn, ExtenstionElementReader.ID);
propertyNames = ExtenstionElementReader.findEndEventActivities(bpmn, ExtenstionElementReader.NAME);
}
parameters.put("activityIds", activityIds);
QueryParameters<CountPerOptionDto> queryParameters = new QueryParameters<CountPerOptionDto>();
queryParameters.setParameter(parameters);
List<CountPerOptionDto> result = getQueryService().executeQuery("cockpit.kpi.selectCountPerActivityId", queryParameters);
for (CountPerOptionDto countPerOptionDto : result) {
int i = activityIds.indexOf(countPerOptionDto.getOptionId());
countPerOptionDto.setOptionName(propertyNames.get(i));
}
return result;
}
示例4: getProcessInstanceCounts
import org.camunda.bpm.cockpit.db.QueryParameters; //导入依赖的package包/类
@GET
@Produces(MediaType.APPLICATION_JSON)
public List<FlowNodeInstanceCountDto> getProcessInstanceCounts() {
return getQueryService()
.executeQuery(
"cockpit.flow-node-instance-counter-plugin.selectFlowNodeInstanceCountPerMonth",
new QueryParameters<FlowNodeInstanceCountDto>());
}
示例5: getProcessInstanceCounts
import org.camunda.bpm.cockpit.db.QueryParameters; //导入依赖的package包/类
@GET
public List<ProcessInstanceCountDto> getProcessInstanceCounts() {
return getQueryService()
.executeQuery(
"cockpit.sample.selectProcessInstanceCountsByProcessDefinition",
new QueryParameters<ProcessInstanceCountDto>());
}
示例6: testSampleQueryWorks
import org.camunda.bpm.cockpit.db.QueryParameters; //导入依赖的package包/类
@Test
public void testSampleQueryWorks() {
QueryService queryService = getQueryService();
List<ProcessInstanceCountDto> instanceCounts =
queryService
.executeQuery(
"cockpit.sample.selectProcessInstanceCountsByProcessDefinition",
new QueryParameters<ProcessInstanceCountDto>());
Assert.assertEquals(0, instanceCounts.size());
}