org.camunda.bpm.model.bpmn.Query.singleResult()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(196)

本文整理了Java中org.camunda.bpm.model.bpmn.Query.singleResult方法的一些代码示例,展示了Query.singleResult的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.singleResult方法的具体详情如下:
包路径:org.camunda.bpm.model.bpmn.Query
类名称:Query
方法名:singleResult

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;
}

相关文章