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

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

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

Bpmn.writeModelToStream介绍

[英]Allows writing a BpmnModelInstance to an OutputStream. It will be validated before writing.
[中]允许将BpmnModelInstance写入OutputStream。它将在编写之前进行验证。

代码示例

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

public DeploymentBuilder addModelInstance(String resourceName, BpmnModelInstance modelInstance) {
 ensureNotNull("modelInstance", modelInstance);
 validateResouceName(resourceName, BpmnDeployer.BPMN_RESOURCE_SUFFIXES);
 ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
 Bpmn.writeModelToStream(outputStream, modelInstance);
 return addBytes(resourceName, outputStream.toByteArray());
}

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

public DeploymentBuilder addModelInstance(String resourceName, BpmnModelInstance modelInstance) {
 ensureNotNull("modelInstance", modelInstance);
 validateResouceName(resourceName, BpmnDeployer.BPMN_RESOURCE_SUFFIXES);
 ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
 Bpmn.writeModelToStream(outputStream, modelInstance);
 return addBytes(resourceName, outputStream.toByteArray());
}

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

protected static Asset modelAsAsset(BpmnModelInstance modelInstance) {
 ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
 Bpmn.writeModelToStream(byteStream, modelInstance);
 byte[] bytes = byteStream.toByteArray();
 return new ByteArrayAsset(bytes);
}

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

protected static Asset modelAsAsset(BpmnModelInstance modelInstance) {
 ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
 Bpmn.writeModelToStream(byteStream, modelInstance);
 byte[] bytes = byteStream.toByteArray();
 return new ByteArrayAsset(bytes);
}

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

public DeploymentBuilder addModelInstance(String resourceName, BpmnModelInstance modelInstance) {
 ensureNotNull("modelInstance", modelInstance);
 validateResouceName(resourceName, BpmnDeployer.BPMN_RESOURCE_SUFFIXES);
 ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
 Bpmn.writeModelToStream(outputStream, modelInstance);
 return addBytes(resourceName, outputStream.toByteArray());
}

相关文章