Package io.camunda.zeebe.model.bpmn
Class Bpmn
java.lang.Object
io.camunda.zeebe.model.bpmn.Bpmn
- Direct Known Subclasses:
BpmnImpl
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(org.camunda.bpm.model.xml.ModelBuilder bpmnModelBuilder) protected voiddoValidateModel(BpmnModelInstance modelInstance) protected voiddoWriteModelToFile(File file, BpmnModelInstance modelInstance) protected voiddoWriteModelToOutputStream(OutputStream os, BpmnModelInstance modelInstance) org.camunda.bpm.model.xml.Modelorg.camunda.bpm.model.xml.ModelBuilderstatic BpmnModelInstancereadModelFromFile(File file) Allows reading aBpmnModelInstancefrom a File.static BpmnModelInstancereadModelFromStream(InputStream stream) Allows reading aBpmnModelInstancefrom anInputStreamvoidsetBpmnModel(org.camunda.bpm.model.xml.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:
org.camunda.bpm.model.xml.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 writtenorg.camunda.bpm.model.xml.ModelValidationException- 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:
org.camunda.bpm.model.xml.ModelException- if the model cannot be writtenorg.camunda.bpm.model.xml.ModelValidationException- 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:
org.camunda.bpm.model.xml.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
protected void doRegisterTypes(org.camunda.bpm.model.xml.ModelBuilder bpmnModelBuilder) -
getBpmnModel
public org.camunda.bpm.model.xml.Model getBpmnModel()- Returns:
- the
Modelinstance to use
-
setBpmnModel
public void setBpmnModel(org.camunda.bpm.model.xml.Model bpmnModel) - Parameters:
bpmnModel- the bpmnModel to set
-
getBpmnModelBuilder
public org.camunda.bpm.model.xml.ModelBuilder getBpmnModelBuilder()
-