Interface ProcessModelManager

  • All Known Implementing Classes:
    ProcessModelManagerImpl

    public interface ProcessModelManager
    The workflow engine services related to process model management.
    • Method Detail

      • listProcessModels

        List<String> listProcessModels()
                                throws WorkflowException
        List all the ProcessModels that are stored in the process model directory Retrieves all the files in the directory tree below the process model directory.
        Returns:
        list of strings containing ProcesModel XML descriptor filenames with relative paths.
        Throws:
        WorkflowException - when something goes wrong
      • getProcessModel

        ProcessModel getProcessModel​(String modelId)
                              throws WorkflowException
        Get a ProcessModel from its modelId. Retrieves the xml descriptor filename from the model Id and load abstract process model information in ProcessModel object
        Parameters:
        modelId - model id
        Returns:
        ProcessModel object
        Throws:
        WorkflowException - when something goes wrong
      • createProcessModel

        ProcessModel createProcessModel​(String fileName,
                                        String peasId)
                                 throws WorkflowException
        Create a ProcessModel from xml descriptor filename. Generate an id for this model and load abstract process model information in ProcessModel object
        Parameters:
        fileName - xml descriptor filename.
        peasId - Id of processManager instance (peas).
        Returns:
        ProcessModel object
        Throws:
        WorkflowException - when something goes wrong
      • createProcessModelDescriptor

        ProcessModel createProcessModelDescriptor()
                                           throws WorkflowException
        Create a new ProcessModel descriptor that is not yet saved in a XML file.
        Returns:
        ProcessModel object
        Throws:
        WorkflowException - when something goes wrong
      • deleteProcessModel

        void deleteProcessModel​(String instanceId)
                         throws WorkflowException
        Delete a ProcessModel with given model id
        Parameters:
        instanceId - component instance identifier
        Throws:
        WorkflowException - when something goes wrong
      • deleteProcessModelDescriptor

        void deleteProcessModelDescriptor​(String strProcessModelFileName)
                                   throws WorkflowException
        Delete a ProcessModelDescriptor XML with given path
        Parameters:
        strProcessModelFileName - the relative path and file name of the process file
        Throws:
        WorkflowException - when something goes wrong or the file cannot be found
      • getProcessModelDir

        String getProcessModelDir()
        Get the directory where are stored the models
      • loadProcessModel

        ProcessModel loadProcessModel​(String processFileName)
                               throws WorkflowException
        load a process model definition from xml file to java objects
        Parameters:
        processFileName - the xml file name that contains process model definition
        Returns:
        a ProcessModel object
        Throws:
        WorkflowException - when something goes wrong or the file cannot be found
      • saveProcessModel

        void saveProcessModel​(ProcessModel process,
                              String processFileName)
                       throws WorkflowException
        Saves a process model definition from java objects to an XML file
        Parameters:
        processFileName - the xml file name that contains process model definition
        process - A processModel object to be saved
        Throws:
        WorkflowException - when something goes wrong