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:
  • Field Details

    • modelUploadHandler

      @Inject protected ModelUploadHandler 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

      public List<String> getGroups(String version)
      returns all groups for a version
      Parameters:
      version -
      Returns:
    • getWorkflowGroups

      public List<String> getWorkflowGroups() throws org.imixs.workflow.exceptions.ModelException
      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

      public String getVersionByGroup(String group) throws org.imixs.workflow.exceptions.ModelException
      Returns the ModelVersion of a given group name
      Parameters:
      group -
      Returns:
      Throws:
      org.imixs.workflow.exceptions.ModelException
    • findAllTasksByGroup

      public List<org.imixs.workflow.ItemCollection> findAllTasksByGroup(String group)
      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

      public Set<String> getVersions()
      Returns a sorted set of all model versions.

      Used by the Model View.

      Returns:
    • getModelEntity

      public org.imixs.workflow.ItemCollection getModelEntity(String version)
      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:
      IOException
      SAXException
      ParserConfigurationException
      ParseException
      org.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.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
    • 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