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

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

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

Bpmn.readModelFromStream介绍

[英]Allows reading a BpmnModelInstance from an InputStream
[中]允许从InputStream读取BpmnModelInstance

代码示例

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

@Override
protected BpmnModelInstance readModelFromStream(InputStream bpmnResourceInputStream) {
 return Bpmn.readModelFromStream(bpmnResourceInputStream);
}

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

@Override
protected BpmnModelInstance readModelFromStream(InputStream bpmnResourceInputStream) {
 return Bpmn.readModelFromStream(bpmnResourceInputStream);
}

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

protected Set<String> retrieveProcessKeysFromResources(Map<String, ResourceEntity> resources) {
 Set<String> keys = new HashSet<String>();
 for (ResourceEntity resource : resources.values()) {
  if (isBpmnResource(resource)) {
   ByteArrayInputStream byteStream = new ByteArrayInputStream(resource.getBytes());
   BpmnModelInstance model = Bpmn.readModelFromStream(byteStream);
   for (Process process : model.getDefinitions().getChildElementsByType(Process.class)) {
    keys.add(process.getId());
   }
  } else if (isCmmnResource(resource)) {
   ByteArrayInputStream byteStream = new ByteArrayInputStream(resource.getBytes());
   CmmnModelInstance model = Cmmn.readModelFromStream(byteStream);
   for (Case cmmnCase : model.getDefinitions().getCases()) {
    keys.add(cmmnCase.getId());
   }
  }
 }
 return keys;
}

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

protected Set<String> retrieveProcessKeysFromResources(Map<String, ResourceEntity> resources) {
 Set<String> keys = new HashSet<String>();
 for (ResourceEntity resource : resources.values()) {
  if (isBpmnResource(resource)) {
   ByteArrayInputStream byteStream = new ByteArrayInputStream(resource.getBytes());
   BpmnModelInstance model = Bpmn.readModelFromStream(byteStream);
   for (Process process : model.getDefinitions().getChildElementsByType(Process.class)) {
    keys.add(process.getId());
   }
  } else if (isCmmnResource(resource)) {
   ByteArrayInputStream byteStream = new ByteArrayInputStream(resource.getBytes());
   CmmnModelInstance model = Cmmn.readModelFromStream(byteStream);
   for (Case cmmnCase : model.getDefinitions().getCases()) {
    keys.add(cmmnCase.getId());
   }
  }
 }
 return keys;
}

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

@Override
protected BpmnModelInstance readModelFromStream(InputStream bpmnResourceInputStream) {
 return Bpmn.readModelFromStream(bpmnResourceInputStream);
}

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

protected Set<String> retrieveProcessKeysFromResources(Map<String, ResourceEntity> resources) {
 Set<String> keys = new HashSet<String>();
 for (ResourceEntity resource : resources.values()) {
  if (isBpmnResource(resource)) {
   ByteArrayInputStream byteStream = new ByteArrayInputStream(resource.getBytes());
   BpmnModelInstance model = Bpmn.readModelFromStream(byteStream);
   for (Process process : model.getDefinitions().getChildElementsByType(Process.class)) {
    keys.add(process.getId());
   }
  } else if (isCmmnResource(resource)) {
   ByteArrayInputStream byteStream = new ByteArrayInputStream(resource.getBytes());
   CmmnModelInstance model = Cmmn.readModelFromStream(byteStream);
   for (Case cmmnCase : model.getDefinitions().getCases()) {
    keys.add(cmmnCase.getId());
   }
  }
 }
 return keys;
}

相关文章