Package org.imixs.workflow.office.model
Class ModelController
java.lang.Object
org.imixs.workflow.office.model.ModelController
- All Implemented Interfaces:
Serializable
The ModelController provides informations about workflow models.
A ModelVersion is always expected in the format
'DOMAIN-LANGUAGE-VERSIONNUMBER'
e.g. office-de-0.1, support-en-2.0, system-de-0.0.1
- Author:
- rsoika
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.imixs.workflow.engine.ModelServiceprotected ModelUploadHandlerprotected org.imixs.workflow.engine.WorkflowService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteModel(String modelversion) This Method deletes the given model from the database and the internal model cache.voiddoUploadModel(jakarta.faces.event.ActionEvent event) This method adds all uploaded model files.List<org.imixs.workflow.ItemCollection>findAllStartTasksByGroup(String version, String group) Returns a list of all Imixs Start Tasks for a given groupList<org.imixs.workflow.ItemCollection>findAllTasksByGroup(String group) Returns a list of all Imixs Tasks for a given groupreturns all groups for a versionorg.imixs.workflow.ItemCollectiongetModelEntity(String version) Returns a Model Entity.getProcessDescription(int processid, String modelversion, org.imixs.workflow.ItemCollection documentContext) This method return the 'rtfdescription' of a processentity and applies the dynamic Text replacement function from the jee plugingetProcessDescriptionByInitialTask(org.imixs.workflow.ItemCollection initialTask, String modelVersion, String workflowGroup) This method return the 'rtfdescription' of the initial task and resolves textblock entries.org.imixs.workflow.ItemCollectiongetProcessEntity(int processid, String modelversion) This method returns a process entity for a given ModelVersion or null if no entity exists.getVersionByGroup(String group) Returns the ModelVersion of a given group nameReturns a sorted set of all model versions.Returns a String list of all WorkflowGroup names.
-
Field Details
-
modelUploadHandler
-
modelService
protected org.imixs.workflow.engine.ModelService modelService -
workflowService
protected org.imixs.workflow.engine.WorkflowService workflowService
-
-
Constructor Details
-
ModelController
public ModelController()
-
-
Method Details
-
getGroups
returns all groups for a version- Parameters:
version-- Returns:
-
getWorkflowGroups
Returns a String list of all WorkflowGroup names. Workflow groups of the system model will be skipped. A workflowGroup with a '~' in its name will be skipped. This indicates a child process. The worflowGroup list is used to assign a workflow Group to a core process.- Returns:
- list of workflow groups
- Throws:
org.imixs.workflow.exceptions.ModelException
-
getVersionByGroup
Returns the ModelVersion of a given group name- Parameters:
group-- Returns:
- Throws:
org.imixs.workflow.exceptions.ModelException
-
findAllTasksByGroup
Returns a list of all Imixs Tasks for a given group- Returns:
-
findAllStartTasksByGroup
public List<org.imixs.workflow.ItemCollection> findAllStartTasksByGroup(String version, String group) Returns a list of all Imixs Start Tasks for a given group- Returns:
-
getVersions
Returns a sorted set of all model versions.Used by the Model View.
- Returns:
-
getModelEntity
Returns a Model Entity. Used by the Model View- Parameters:
version-- Returns:
-
doUploadModel
public void doUploadModel(jakarta.faces.event.ActionEvent event) throws org.imixs.workflow.exceptions.ModelException This method adds all uploaded model files. The method tests the model type (.bmpm, .ixm). BPMN Model will be handled by the ImixsBPMNParser. A .ixm file will be imported using the default import mechanism.- Parameters:
event-- Throws:
IOExceptionSAXExceptionParserConfigurationExceptionParseExceptionorg.imixs.workflow.exceptions.ModelException
-
deleteModel
public void deleteModel(String modelversion) throws org.imixs.workflow.exceptions.AccessDeniedException, org.imixs.workflow.exceptions.ModelException This Method deletes the given model from the database and the internal model cache.- Throws:
org.imixs.workflow.exceptions.AccessDeniedExceptionorg.imixs.workflow.exceptions.ModelException
-
getProcessEntity
This method returns a process entity for a given ModelVersion or null if no entity exists.- Parameters:
modelVersion- - version for the model to search the process entityprocessid- - id of the process entity- Returns:
- an instance of the matching process entity
- Throws:
org.imixs.workflow.exceptions.ModelException
-
getProcessDescription
public String getProcessDescription(int processid, String modelversion, org.imixs.workflow.ItemCollection documentContext) This method return the 'rtfdescription' of a processentity and applies the dynamic Text replacement function from the jee plugin- Parameters:
processid-modelversion-- Returns:
- Throws:
org.imixs.workflow.exceptions.ModelException
-
getProcessDescriptionByInitialTask
public String getProcessDescriptionByInitialTask(org.imixs.workflow.ItemCollection initialTask, String modelVersion, String workflowGroup) This method return the 'rtfdescription' of the initial task and resolves textblock entries.The method creates a dummy workitem to resolve the correct textblock
- Parameters:
processid-modelversion-- Returns:
- Throws:
org.imixs.workflow.exceptions.ModelException
-