public class Bpmn extends Object
Provides access to the camunda BPMN model api.
Modifier and Type | Field and Description |
---|---|
static Bpmn |
INSTANCE
the singleton instance of
Bpmn . |
Modifier | Constructor and Description |
---|---|
protected |
Bpmn()
Register known types of the BPMN model
|
public static Bpmn INSTANCE
public static BpmnModelInstance readModelFromFile(File file)
BpmnModelInstance
from a File.file
- the File
to read the BpmnModelInstance
fromBpmnModelException
- if the model cannot be readpublic static BpmnModelInstance readModelFromStream(InputStream stream)
BpmnModelInstance
from an InputStream
stream
- the InputStream
to read the BpmnModelInstance
fromModelParseException
- if the model cannot be readpublic static void writeModelToFile(File file, BpmnModelInstance modelInstance)
BpmnModelInstance
to a File. It will be
validated before writing.file
- the File
to write the BpmnModelInstance
tomodelInstance
- the BpmnModelInstance
to writeBpmnModelException
- if the model cannot be writtenModelValidationException
- if the model is not validpublic static void writeModelToStream(OutputStream stream, BpmnModelInstance modelInstance)
BpmnModelInstance
to an OutputStream
. It will be
validated before writing.stream
- the OutputStream
to write the BpmnModelInstance
tomodelInstance
- the BpmnModelInstance
to writeModelException
- if the model cannot be writtenModelValidationException
- if the model is not validpublic static String convertToString(BpmnModelInstance modelInstance)
BpmnModelInstance
to an String
. It will
be validated before conversion.modelInstance
- the model instance to convertpublic static void validateModel(BpmnModelInstance modelInstance)
modelInstance
- the BpmnModelInstance
to validateModelValidationException
- if the model is not validpublic static BpmnModelInstance createEmptyModel()
BpmnModelInstance
.public static ProcessBuilder createProcess()
public static ProcessBuilder createProcess(String processId)
public static ProcessBuilder createExecutableProcess()
public static ProcessBuilder createExecutableProcess(String processId)
protected BpmnModelInstance doReadModelFromFile(File file)
protected BpmnModelInstance doReadModelFromInputStream(InputStream is)
protected void doWriteModelToFile(File file, BpmnModelInstance modelInstance)
protected void doWriteModelToOutputStream(OutputStream os, BpmnModelInstance modelInstance)
protected String doConvertToString(BpmnModelInstance modelInstance)
protected void doValidateModel(BpmnModelInstance modelInstance)
protected BpmnModelInstance doCreateEmptyModel()
protected void doRegisterTypes(ModelBuilder bpmnModelBuilder)
public ModelBuilder getBpmnModelBuilder()
public void setBpmnModel(Model bpmnModel)
bpmnModel
- the bpmnModel to setCopyright © 2019. All rights reserved.