org.camunda.bpm.model.bpmn.Query类的使用及代码示例

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

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

Query介绍

暂无

代码示例

代码示例来源:origin: camunda/camunda-bpm-platform

  1. public Gateway findLastGateway() {
  2. FlowNode lastGateway = element;
  3. while (true) {
  4. try {
  5. lastGateway = lastGateway.getPreviousNodes().singleResult();
  6. if (lastGateway instanceof Gateway) {
  7. return (Gateway) lastGateway;
  8. }
  9. } catch (BpmnModelException e) {
  10. throw new BpmnModelException("Unable to determine an unique previous gateway of " + lastGateway.getId(), e);
  11. }
  12. }
  13. }

代码示例来源:origin: com.camunda.consulting.util/camunda-util-demo-data-generator

  1. protected static Stream<String> queryCamundaPropertyValues(BaseElement modelElementInstance, String propertyName) {
  2. return modelElementInstance.getExtensionElements().getElementsQuery().filterByType(CamundaProperties.class).list().stream() //
  3. .map(CamundaProperties::getCamundaProperties) //
  4. .flatMap(Collection::stream) //
  5. .filter(property -> property.getCamundaName().equals(propertyName)) //
  6. .map(CamundaProperty::getCamundaValue) //
  7. .filter(Objects::nonNull) //
  8. ;
  9. }

代码示例来源:origin: viadee/vPAV

  1. private boolean hasProperty(String propertyName, BpmnElement element) {
  2. ExtensionElements elements = element.getBaseElement().getExtensionElements();
  3. if (elements == null) {
  4. return false;
  5. }
  6. Query<CamundaProperties> query = elements.getElementsQuery()
  7. .filterByType(CamundaProperties.class);
  8. if (query.count() == 0) {
  9. return false;
  10. }
  11. Collection<CamundaProperty> properties = query
  12. .singleResult()
  13. .getCamundaProperties();
  14. return properties.stream().anyMatch(p -> p.getCamundaName() != null && p.getCamundaName().equals(propertyName));
  15. }
  16. }

代码示例来源:origin: viadee/vPAV

  1. /**
  2. * Get process variables from form fields (user tasks)
  3. *
  4. * @param element
  5. * BpmnElement
  6. * @param extensionElements
  7. * ExtensionElements
  8. * @param scopeElementId
  9. * ScopeElementId
  10. * @return variables
  11. */
  12. private LinkedHashMap<String, ProcessVariableOperation> getVariablesFromFormData(final BpmnElement element,
  13. final ExtensionElements extensionElements, final String scopeElementId) {
  14. final LinkedHashMap<String, ProcessVariableOperation> processVariables = new LinkedHashMap<String, ProcessVariableOperation>();
  15. final Query<CamundaFormData> formDataQuery = extensionElements.getElementsQuery()
  16. .filterByType(CamundaFormData.class);
  17. if (formDataQuery.count() > 0) {
  18. final CamundaFormData formData = formDataQuery.singleResult();
  19. if (formData != null) {
  20. final Collection<CamundaFormField> formFields = formData.getCamundaFormFields();
  21. for (final CamundaFormField field : formFields) {
  22. processVariables.put(field.getCamundaId(),
  23. new ProcessVariableOperation(field.getCamundaId(), element, ElementChapter.FormData,
  24. KnownElementFieldType.FormField, null, VariableOperation.WRITE, scopeElementId));
  25. }
  26. }
  27. }
  28. return processVariables;
  29. }

代码示例来源:origin: viadee/vPAV

  1. final List<CamundaIn> inputAssociations = extensionElements.getElementsQuery().filterByType(CamundaIn.class)
  2. .list();
  3. for (final CamundaIn inputAssociation : inputAssociations) {
  4. final String source = inputAssociation.getCamundaSource();
  5. .filterByType(CamundaOut.class).list();
  6. for (final CamundaOut outputAssociation : outputAssociations) {
  7. final String target = outputAssociation.getCamundaTarget();

代码示例来源:origin: org.camunda.bpm.model/camunda-bpmn-model

  1. public Gateway findLastGateway() {
  2. FlowNode lastGateway = element;
  3. while (true) {
  4. try {
  5. lastGateway = lastGateway.getPreviousNodes().singleResult();
  6. if (lastGateway instanceof Gateway) {
  7. return (Gateway) lastGateway;
  8. }
  9. } catch (BpmnModelException e) {
  10. throw new BpmnModelException("Unable to determine an unique previous gateway of " + lastGateway.getId(), e);
  11. }
  12. }
  13. }

代码示例来源:origin: viadee/vPAV

  1. final List<CamundaIn> inputAssociations = extensionElements.getElementsQuery().filterByType(CamundaIn.class)
  2. .list();
  3. for (final CamundaIn inputAssociation : inputAssociations) {
  4. final String source = inputAssociation.getCamundaSource();
  5. .filterByType(CamundaOut.class).list();
  6. for (final CamundaOut outputAssociation : outputAssociations) {
  7. final String target = outputAssociation.getCamundaTarget();

代码示例来源:origin: camunda/camunda-bpmn-model

  1. public Gateway findLastGateway() {
  2. FlowNode lastGateway = element;
  3. while (true) {
  4. try {
  5. lastGateway = lastGateway.getPreviousNodes().singleResult();
  6. if (lastGateway instanceof Gateway) {
  7. return (Gateway) lastGateway;
  8. }
  9. } catch (BpmnModelException e) {
  10. throw new BpmnModelException("Unable to determine an unique previous gateway of " + lastGateway.getId(), e);
  11. }
  12. }
  13. }

代码示例来源:origin: viadee/vPAV

  1. .filterByType(CamundaTaskListener.class).list();
  2. for (final CamundaTaskListener listener : listenerList) {
  3. final CamundaScript script = listener.getCamundaScript();

代码示例来源:origin: viadee/vPAV

  1. .filterByType(CamundaExecutionListener.class).list();
  2. for (final CamundaExecutionListener listener : listenerList) {
  3. final CamundaScript script = listener.getCamundaScript();

代码示例来源:origin: viadee/vPAV

  1. .filterByType(CamundaTaskListener.class).list();
  2. for (final CamundaTaskListener listener : listenerList) {
  3. final String l_expression = listener.getCamundaExpression();

代码示例来源:origin: viadee/vPAV

  1. .filterByType(CamundaExecutionListener.class).list();
  2. for (final CamundaExecutionListener listener : listenerList) {
  3. final String l_expression = listener.getCamundaExpression();

代码示例来源:origin: viadee/vPAV

  1. final Collection<CheckerIssue> issues = new ArrayList<CheckerIssue>();
  2. List<CamundaTaskListener> taskListenerList = extensionElements.getElementsQuery()
  3. .filterByType(CamundaTaskListener.class).list();
  4. for (final CamundaTaskListener listener : taskListenerList) {
  5. final String l_expression = listener.getCamundaExpression();

代码示例来源:origin: viadee/vPAV

  1. final Collection<CheckerIssue> issues = new ArrayList<CheckerIssue>();
  2. List<CamundaExecutionListener> execListenerList = extensionElements.getElementsQuery()
  3. .filterByType(CamundaExecutionListener.class).list();
  4. for (final CamundaExecutionListener listener : execListenerList) {
  5. final String l_expression = listener.getCamundaExpression();

相关文章