本文整理了Java中org.camunda.bpm.model.bpmn.Bpmn.readModelFromStream()
方法的一些代码示例,展示了Bpmn.readModelFromStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bpmn.readModelFromStream()
方法的具体详情如下:
包路径:org.camunda.bpm.model.bpmn.Bpmn
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!