Package org.imixs.workflow.office.model
Class ModelController
- java.lang.Object
-
- org.imixs.workflow.office.model.ModelController
-
- All Implemented Interfaces:
Serializable
@Named @RequestScoped public class ModelController extends Object implements 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected org.imixs.workflow.engine.ModelServicemodelServiceprotected ModelUploadHandlermodelUploadHandlerprotected org.imixs.workflow.engine.SetupServicesetupServiceprotected org.imixs.workflow.engine.WorkflowServiceworkflowService
-
Constructor Summary
Constructors Constructor Description ModelController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteModel(String modelversion)This Method deletes the given model from the database and the internal model cache.voiddoUploadModel(javax.faces.event.ActionEvent event)This method adds all uploaded model files.List<String>getGroups(String version)returns all groups for a versionorg.imixs.workflow.ModelgetModelByGroup(String group)Returns a model object for corresponding workflow group.org.imixs.workflow.ModelgetModelByWorkitem(org.imixs.workflow.ItemCollection workitem)org.imixs.workflow.ItemCollectiongetModelEntity(String version)StringgetProcessDescription(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 pluginorg.imixs.workflow.ItemCollectiongetProcessEntity(int processid, String modelversion)This method returns a process entity for a given ModelVersion or null if no entity exists.List<String>getSubWorkflowGroups(String parentWorkflowGroup)Returns a String list of all Sub-WorkflowGroup names for a specified WorkflowGroup.List<String>getVersions()returns all model versionsList<String>getWorkflowGroups()Returns a String list of all WorkflowGroup names.
-
-
-
Field Detail
-
modelUploadHandler
@Inject protected ModelUploadHandler modelUploadHandler
-
modelService
protected org.imixs.workflow.engine.ModelService modelService
-
workflowService
protected org.imixs.workflow.engine.WorkflowService workflowService
-
setupService
protected org.imixs.workflow.engine.SetupService setupService
-
-
Method Detail
-
getGroups
public List<String> getGroups(String version)
returns all groups for a version- Parameters:
version-- Returns:
-
getWorkflowGroups
public List<String> 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
-
getSubWorkflowGroups
public List<String> getSubWorkflowGroups(String parentWorkflowGroup)
Returns a String list of all Sub-WorkflowGroup names for a specified WorkflowGroup. A SubWorkflowGroup contains a '~' in its name. The SubWorflowGroup list is used to assign sub workflow Group to a workitem- Parameters:
parentWorkflowGroup- - the parent workflow group name- Returns:
- list of all sub workflow groups for the given parent group name
- See Also:
getWorkflowGroups()
-
getModelByWorkitem
public org.imixs.workflow.Model getModelByWorkitem(org.imixs.workflow.ItemCollection workitem)
-
getModelByGroup
public org.imixs.workflow.Model getModelByGroup(String group)
Returns a model object for corresponding workflow group.- Parameters:
group-- Returns:
-
getModelEntity
public org.imixs.workflow.ItemCollection getModelEntity(String version)
-
doUploadModel
public void doUploadModel(javax.faces.event.ActionEvent event) throws org.imixs.workflow.exceptions.ModelException, ParseException, ParserConfigurationException, SAXException, IOExceptionThis 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
public org.imixs.workflow.ItemCollection getProcessEntity(int processid, String modelversion)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
-
-