Package org.imixs.workflow.engine
Class ModelService
java.lang.Object
org.imixs.workflow.engine.ModelService
@DeclareRoles({"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"})
@RolesAllowed({"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"})
public class ModelService
extends Object
The ModelManager is independent form the IX JEE Entity EJBs and uses the
standard IntemCollection Object as a data transfer object to communicate with
clients.
Since Version 1.7.0
The Implementation handles multiple model versions. Different Versions of an
Model Entity can be saved and updated. The Getter methods can be furthermore
Controlled by providing a valid Model Version. If no model version is set
this Implementation automatically defaults to the highest available
ModelVersion
- Author:
- rsoika
- See Also:
-
ModelManager
org.imixs.workflow.jee.ejb.ModelManager
-
Field Summary
Modifier and TypeFieldDescriptionprotected jakarta.ejb.SessionContext
protected DocumentService
protected ModelManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addModel
(org.openbpmn.bpmn.BPMNModel model) Deprecated.void
deleteModel
(String version) This method deletes an existing Model from the database and removes the model form the internal ModelStore.findModelEntity
(String version) This method fetches an existing Model Entity from the model storeorg.openbpmn.bpmn.BPMNModel
Deprecated.org.openbpmn.bpmn.BPMNModel
getModelByWorkitem
(ItemCollection workitem) Deprecated.This method puts a model entity into the internal store.Returns an instance of a modelManagerDeprecated.getWorkflowGroups
(org.openbpmn.bpmn.BPMNModel model) Deprecated.void
init()
Lazy loading of ModelManagerloadDefinition
(org.openbpmn.bpmn.BPMNModel model) Deprecated.loadEvent
(ItemCollection workitem) Deprecated.This method loads a Model entity with its meta data form the internal model store.loadProcess
(ItemCollection workitem) Deprecated.loadTask
(ItemCollection workitem) Deprecated.nextModelElement
(ItemCollection event, ItemCollection workitem) Deprecated.void
removeModel
(String modelversion) Deprecated.void
saveModel
(org.openbpmn.bpmn.BPMNModel model) This method saves a BPMNModel into the database and adds the model into the internal model store.void
This method saves a BPMNModel with its meta data into the database and adds the model into the internal model store.
-
Field Details
-
modelManager
-
documentService
-
ctx
protected jakarta.ejb.SessionContext ctx
-
-
Constructor Details
-
ModelService
public ModelService()
-
-
Method Details
-
init
@PostConstruct public void init()Lazy loading of ModelManager -
getModelManager
Returns an instance of a modelManager- Returns:
-
addModel
Deprecated.Deprecated method, use instead getModelManager()..- Throws:
ModelException
-
loadProcess
Deprecated.Deprecated method, use instead getModelManager()..- Throws:
ModelException
-
loadDefinition
@Deprecated public ItemCollection loadDefinition(org.openbpmn.bpmn.BPMNModel model) throws ModelException Deprecated.Deprecated method, use instead getModelManager()..- Throws:
ModelException
-
loadEvent
Deprecated.Deprecated method, use instead getModelManager()..- Throws:
ModelException
-
loadTask
Deprecated.Deprecated method, use instead getModelManager()..- Throws:
ModelException
-
nextModelElement
@Deprecated public ItemCollection nextModelElement(ItemCollection event, ItemCollection workitem) throws ModelException Deprecated.Deprecated method, use instead getModelManager()..- Throws:
ModelException
-
removeModel
Deprecated.Deprecated method, use instead getModelManager().. -
getModel
Deprecated.Deprecated method, use instead getModelManager()..- Throws:
ModelException
-
getModelByWorkitem
@Deprecated public org.openbpmn.bpmn.BPMNModel getModelByWorkitem(ItemCollection workitem) throws ModelException Deprecated.Returns a BPMNModel by a workItem. The workitem must at least provide the item '$modelversion' or '$workflowgroup' to resolve the model. The $modelversion can be a regular expression.The BPMNModel instance can be used to access all BPMN model elements.
- Parameters:
version
- - $modelVersion- Returns:
- a BPMN model instance or null if not found by $modelVersion
- Throws:
ModelException
-
getVersions
Deprecated.Deprecated method, use instead getModelManager().. -
getWorkflowGroups
Deprecated.This method returns a sorted list of all model groups stored in a given BPMNModel.Note: A workflow group may exist in different models by the same name!
- Parameters:
group
-- Returns:
-
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.
- Parameters:
model
-- Throws:
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.
- Parameters:
model
-- Throws:
ModelException
-
getModelEntityStore
This method puts a model entity into the internal store.- Parameters:
modelEntity
-
-
loadModel
This method loads a Model entity with its meta data form the internal model store.To access a BPMNModel object directly use the method
getModel(version)
- Returns:
- the ItemCollection with the model meta data
-
deleteModel
This method deletes an existing Model from the database and removes the model 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
- Parameters:
model
-
-
findModelEntity
This method fetches an existing Model Entity from the model store- Parameters:
model
-
-