Package org.camunda.bpm.model.bpmn
Class Bpmn
java.lang.Object
org.camunda.bpm.model.bpmn.Bpmn
Provides access to the camunda BPMN model api.
- Author:
- Daniel Meyer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertToString(BpmnModelInstance modelInstance) Allows the conversion of aBpmnModelInstanceto anString.static BpmnModelInstanceAllows creating an new, emptyBpmnModelInstance.static ProcessBuilderstatic ProcessBuildercreateExecutableProcess(String processId) static ProcessBuilderstatic ProcessBuildercreateProcess(String processId) protected StringdoConvertToString(BpmnModelInstance modelInstance) protected BpmnModelInstanceprotected BpmnModelInstancedoReadModelFromFile(File file) protected BpmnModelInstanceprotected voiddoRegisterTypes(ModelBuilder bpmnModelBuilder) protected voiddoValidateModel(BpmnModelInstance modelInstance) protected voiddoWriteModelToFile(File file, BpmnModelInstance modelInstance) protected voiddoWriteModelToOutputStream(OutputStream os, BpmnModelInstance modelInstance) static BpmnModelInstancereadModelFromFile(File file) Allows reading aBpmnModelInstancefrom a File.static BpmnModelInstancereadModelFromStream(InputStream stream) Allows reading aBpmnModelInstancefrom anInputStreamvoidsetBpmnModel(Model bpmnModel) static voidvalidateModel(BpmnModelInstance modelInstance) Validate model DOM documentstatic voidwriteModelToFile(File file, BpmnModelInstance modelInstance) Allows writing aBpmnModelInstanceto a File.static voidwriteModelToStream(OutputStream stream, BpmnModelInstance modelInstance) Allows writing aBpmnModelInstanceto anOutputStream.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Bpmn
protected Bpmn()Register known types of the BPMN model
-
-
Method Details
-
readModelFromFile
Allows reading aBpmnModelInstancefrom a File.- Parameters:
file- theFileto read theBpmnModelInstancefrom- Returns:
- the model read
- Throws:
BpmnModelException- if the model cannot be read
-
readModelFromStream
Allows reading aBpmnModelInstancefrom anInputStream- Parameters:
stream- theInputStreamto read theBpmnModelInstancefrom- Returns:
- the model read
- Throws:
ModelParseException- if the model cannot be read
-
writeModelToFile
Allows writing aBpmnModelInstanceto a File. It will be validated before writing.- Parameters:
file- theFileto write theBpmnModelInstancetomodelInstance- theBpmnModelInstanceto write- Throws:
BpmnModelException- if the model cannot be writtenModelValidationException- if the model is not valid
-
writeModelToStream
Allows writing aBpmnModelInstanceto anOutputStream. It will be validated before writing.- Parameters:
stream- theOutputStreamto write theBpmnModelInstancetomodelInstance- theBpmnModelInstanceto write- Throws:
ModelException- if the model cannot be writtenModelValidationException- if the model is not valid
-
convertToString
Allows the conversion of aBpmnModelInstanceto anString. It will be validated before conversion.- Parameters:
modelInstance- the model instance to convert- Returns:
- the XML string representation of the model instance
-
validateModel
Validate model DOM document- Parameters:
modelInstance- theBpmnModelInstanceto validate- Throws:
ModelValidationException- if the model is not valid
-
createEmptyModel
Allows creating an new, emptyBpmnModelInstance.- Returns:
- the empty model.
-
createProcess
-
createProcess
-
createExecutableProcess
-
createExecutableProcess
-
doReadModelFromFile
-
doReadModelFromInputStream
-
doWriteModelToFile
-
doWriteModelToOutputStream
-
doConvertToString
-
doValidateModel
-
doCreateEmptyModel
-
doRegisterTypes
-
getBpmnModel
- Returns:
- the
Modelinstance to use
-
getBpmnModelBuilder
-
setBpmnModel
- Parameters:
bpmnModel- the bpmnModel to set
-