org.flowable.bpmn.model.Activity.getDataInputAssociations()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(191)

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

Activity.getDataInputAssociations介绍

暂无

代码示例

代码示例来源:origin: org.flowable/flowable-bpmn-converter

@Override
  public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception {

    if (!(parentElement instanceof Activity))
      return;

    DataAssociation dataAssociation = new DataAssociation();
    BpmnXMLUtil.addXMLLocation(dataAssociation, xtr);
    DataAssociationParser.parseDataAssociation(dataAssociation, getElementName(), xtr);

    ((Activity) parentElement).getDataInputAssociations().add(dataAssociation);
  }
}

代码示例来源:origin: org.flowable/flowable-json-converter

protected void processDataStoreReferences(FlowElementsContainer container, String dataStoreReferenceId, ArrayNode outgoingArrayNode) {
  for (FlowElement flowElement : container.getFlowElements()) {
    if (flowElement instanceof Activity) {
      Activity activity = (Activity) flowElement;
      if (CollectionUtils.isNotEmpty(activity.getDataInputAssociations())) {
        for (DataAssociation dataAssociation : activity.getDataInputAssociations()) {
          if (dataStoreReferenceId.equals(dataAssociation.getSourceRef())) {
            outgoingArrayNode.add(BpmnJsonConverterUtil.createResourceNode(dataAssociation.getId()));
          }
        }
      }
    } else if (flowElement instanceof SubProcess) {
      processDataStoreReferences((SubProcess) flowElement, dataStoreReferenceId, outgoingArrayNode);
    }
  }
}

代码示例来源:origin: org.flowable/flowable-process-validation

protected void handleDataAssociations(Process process, Activity activity, List<ValidationError> errors) {
  if (activity.getDataInputAssociations() != null) {
    for (DataAssociation dataAssociation : activity.getDataInputAssociations()) {
      if (StringUtils.isEmpty(dataAssociation.getTargetRef())) {
        addError(errors, Problems.DATA_ASSOCIATION_MISSING_TARGETREF, process, activity,
            "Targetref is required on a data association");
      }
    }
  }
  if (activity.getDataOutputAssociations() != null) {
    for (DataAssociation dataAssociation : activity.getDataOutputAssociations()) {
      if (StringUtils.isEmpty(dataAssociation.getTargetRef())) {
        addError(errors, Problems.DATA_ASSOCIATION_MISSING_TARGETREF, process, activity,
            "Targetref is required on a data association");
      }
    }
  }
}

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

public void setValues(Activity otherActivity) {
    super.setValues(otherActivity);
    setFailedJobRetryTimeCycleValue(otherActivity.getFailedJobRetryTimeCycleValue());
    setDefaultFlow(otherActivity.getDefaultFlow());
    setForCompensation(otherActivity.isForCompensation());
    if (otherActivity.getLoopCharacteristics() != null) {
      setLoopCharacteristics(otherActivity.getLoopCharacteristics().clone());
    }
    if (otherActivity.getIoSpecification() != null) {
      setIoSpecification(otherActivity.getIoSpecification().clone());
    }

    dataInputAssociations = new ArrayList<>();
    if (otherActivity.getDataInputAssociations() != null && !otherActivity.getDataInputAssociations().isEmpty()) {
      for (DataAssociation association : otherActivity.getDataInputAssociations()) {
        dataInputAssociations.add(association.clone());
      }
    }

    dataOutputAssociations = new ArrayList<>();
    if (otherActivity.getDataOutputAssociations() != null && !otherActivity.getDataOutputAssociations().isEmpty()) {
      for (DataAssociation association : otherActivity.getDataOutputAssociations()) {
        dataOutputAssociations.add(association.clone());
      }
    }

    boundaryEvents.clear();
    boundaryEvents.addAll(otherActivity.getBoundaryEvents());
  }
}

代码示例来源:origin: org.ow2.petals.flowable/flowable-bpmn-model

public void setValues(Activity otherActivity) {
    super.setValues(otherActivity);
    setFailedJobRetryTimeCycleValue(otherActivity.getFailedJobRetryTimeCycleValue());
    setDefaultFlow(otherActivity.getDefaultFlow());
    setForCompensation(otherActivity.isForCompensation());
    if (otherActivity.getLoopCharacteristics() != null) {
      setLoopCharacteristics(otherActivity.getLoopCharacteristics().clone());
    }
    if (otherActivity.getIoSpecification() != null) {
      setIoSpecification(otherActivity.getIoSpecification().clone());
    }

    dataInputAssociations = new ArrayList<>();
    if (otherActivity.getDataInputAssociations() != null && !otherActivity.getDataInputAssociations().isEmpty()) {
      for (DataAssociation association : otherActivity.getDataInputAssociations()) {
        dataInputAssociations.add(association.clone());
      }
    }

    dataOutputAssociations = new ArrayList<>();
    if (otherActivity.getDataOutputAssociations() != null && !otherActivity.getDataOutputAssociations().isEmpty()) {
      for (DataAssociation association : otherActivity.getDataOutputAssociations()) {
        dataOutputAssociations.add(association.clone());
      }
    }

    boundaryEvents.clear();
    boundaryEvents.addAll(otherActivity.getBoundaryEvents());
  }
}

代码示例来源:origin: org.flowable/flowable-json-converter

if (CollectionUtils.isNotEmpty(activity.getDataInputAssociations())) {
  for (DataAssociation dataAssociation : activity.getDataInputAssociations()) {
    if (model.getFlowElement(dataAssociation.getSourceRef()) != null) {
      createDataAssociation(dataAssociation, true, activity);

相关文章