Class 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 Detail

      • modelService

        protected org.imixs.workflow.engine.ModelService modelService
      • workflowService

        protected org.imixs.workflow.engine.WorkflowService workflowService
      • setupService

        protected org.imixs.workflow.engine.SetupService setupService
    • Constructor Detail

      • ModelController

        public ModelController()
    • 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:
      • getVersions

        public List<String> getVersions()
        returns all model versions
        Returns:
      • getModelEntity

        public org.imixs.workflow.ItemCollection getModelEntity​(String version)
      • 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.AccessDeniedException
        org.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 entity
        processid - - 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