本文整理了Java中org.camunda.bpm.model.bpmn.Query.singleResult
方法的一些代码示例,展示了Query.singleResult
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.singleResult
方法的具体详情如下:
包路径:org.camunda.bpm.model.bpmn.Query
类名称:Query
方法名:singleResult
暂无
代码示例来源:origin: camunda/camunda-bpm-platform
public Gateway findLastGateway() {
FlowNode lastGateway = element;
while (true) {
try {
lastGateway = lastGateway.getPreviousNodes().singleResult();
if (lastGateway instanceof Gateway) {
return (Gateway) lastGateway;
}
} catch (BpmnModelException e) {
throw new BpmnModelException("Unable to determine an unique previous gateway of " + lastGateway.getId(), e);
}
}
}
代码示例来源:origin: org.camunda.bpm.model/camunda-bpmn-model
public Gateway findLastGateway() {
FlowNode lastGateway = element;
while (true) {
try {
lastGateway = lastGateway.getPreviousNodes().singleResult();
if (lastGateway instanceof Gateway) {
return (Gateway) lastGateway;
}
} catch (BpmnModelException e) {
throw new BpmnModelException("Unable to determine an unique previous gateway of " + lastGateway.getId(), e);
}
}
}
代码示例来源:origin: camunda/camunda-bpmn-model
public Gateway findLastGateway() {
FlowNode lastGateway = element;
while (true) {
try {
lastGateway = lastGateway.getPreviousNodes().singleResult();
if (lastGateway instanceof Gateway) {
return (Gateway) lastGateway;
}
} catch (BpmnModelException e) {
throw new BpmnModelException("Unable to determine an unique previous gateway of " + lastGateway.getId(), e);
}
}
}
代码示例来源:origin: viadee/vPAV
private boolean hasProperty(String propertyName, BpmnElement element) {
ExtensionElements elements = element.getBaseElement().getExtensionElements();
if (elements == null) {
return false;
}
Query<CamundaProperties> query = elements.getElementsQuery()
.filterByType(CamundaProperties.class);
if (query.count() == 0) {
return false;
}
Collection<CamundaProperty> properties = query
.singleResult()
.getCamundaProperties();
return properties.stream().anyMatch(p -> p.getCamundaName() != null && p.getCamundaName().equals(propertyName));
}
}
代码示例来源:origin: viadee/vPAV
/**
* Get process variables from form fields (user tasks)
*
* @param element
* BpmnElement
* @param extensionElements
* ExtensionElements
* @param scopeElementId
* ScopeElementId
* @return variables
*/
private LinkedHashMap<String, ProcessVariableOperation> getVariablesFromFormData(final BpmnElement element,
final ExtensionElements extensionElements, final String scopeElementId) {
final LinkedHashMap<String, ProcessVariableOperation> processVariables = new LinkedHashMap<String, ProcessVariableOperation>();
final Query<CamundaFormData> formDataQuery = extensionElements.getElementsQuery()
.filterByType(CamundaFormData.class);
if (formDataQuery.count() > 0) {
final CamundaFormData formData = formDataQuery.singleResult();
if (formData != null) {
final Collection<CamundaFormField> formFields = formData.getCamundaFormFields();
for (final CamundaFormField field : formFields) {
processVariables.put(field.getCamundaId(),
new ProcessVariableOperation(field.getCamundaId(), element, ElementChapter.FormData,
KnownElementFieldType.FormField, null, VariableOperation.WRITE, scopeElementId));
}
}
}
return processVariables;
}
内容来源于网络,如有侵权,请联系作者删除!