Klasse ModelService
Note: BPMModel instances are not Thread save. For this reason the service the method getBPMNModel returns an exclusive version of a BPMNModel object.
- Autor:
- rsoika
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected jakarta.ejb.SessionContextprotected DocumentService -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddModelData(String version, org.openbpmn.bpmn.BPMNModel model, ItemCollection metadata) Adds a BPMNModel with its metadata into the local model store.voiddeleteModelData(String version) This method deletes an existing Model from the database and removes the model data form the internal ModelStore.This method returns a sorted list of all model groups over all models.findVersionByGroup(String group) Returns a version by Group.org.openbpmn.bpmn.BPMNModelgetBPMNModel(String version) This method should return a thread save version of a stored BPMN Modelreturns a sorted String list of all stored model versionsbooleanhasModelVersion(String version) Returns true if the given Model Version exists in the local storevoidinit()Lazy loading of ModelManagerloadModelMetaData(String version) This method loads a Model metadata form the internal model store.voidremoveModelData(String version) Removes a BPMNModel form the local model storevoidsaveModel(org.openbpmn.bpmn.BPMNModel model) This method saves a BPMNModel into the database and adds the model into the internal model store.voidThis method saves a BPMNModel with its meta data into the database and adds the model into the internal model store.
-
Felddetails
-
documentService
-
ctx
protected jakarta.ejb.SessionContext ctx
-
-
Konstruktordetails
-
ModelService
public ModelService()
-
-
Methodendetails
-
init
@PostConstruct public void init()Lazy loading of ModelManager -
addModelData
public void addModelData(String version, org.openbpmn.bpmn.BPMNModel model, ItemCollection metadata) Adds a BPMNModel with its metadata into the local model store.The method pre initialize all processes within the BPMNModel to avoid the lazing loading.
The Method does not store the data in the database. To store new model data call
saveModel -
getVersions
returns a sorted String list of all stored model versions- Gibt zurück:
-
loadModelMetaData
This method loads a Model metadata form the internal model store.To access a BPMNModel object directly use the method
getModel(version)- Gibt zurück:
- the ItemCollection with the model meta data
- Löst aus:
ModelException
-
getBPMNModel
This method should return a thread save version of a stored BPMN Model- Parameter:
version-- Gibt zurück:
- Löst aus:
ModelException
-
removeModelData
Removes a BPMNModel form the local model store -
hasModelVersion
Returns true if the given Model Version exists in the local store- Parameter:
group-- Gibt zurück:
-
findAllWorkflowGroups
This method returns a sorted list of all model groups over all models.Note: A workflow group may exist in different models by the same name!
- Parameter:
group-- Gibt zurück:
-
findVersionByGroup
Returns a version by Group. The method computes a sorted list of all model versions containing the requested workflow group. The result is sorted in reverse order, so the highest version number is the first in the result list.- Parameter:
group- - name of the workflow group- Gibt zurück:
- list of matching model versions
- Löst aus:
ModelException
-
saveModel
This method saves a BPMNModel into the database and adds the model into the internal model store.If a model with the same model version exists in the database the old version will be deleted form the database first.
- Parameter:
model-- Löst aus:
ModelException
-
saveModel
This method saves a BPMNModel with its meta data into the database and adds the model into the internal model store. In the database entry the BPMNmodel is attached as an embedded XML file with the given filename.If a model with the same model version exists in the database the old version will be deleted form the database first.
The param 'filename' is used to store the bpmn file in the corresponding model document.
- Parameter:
model-- Löst aus:
ModelException
-
deleteModelData
This method deletes an existing Model from the database and removes the model data form the internal ModelStore.A model entity is identified by the type='model' and its name (model version). After the model entity was deleted form the database, the method will also remove the model from the ModelManager
- Parameter:
bpmnModel-- Löst aus:
ModelException
-