com.silverpeas.workflow.api
Interface ProcessModelManager

All Known Implementing Classes:
ProcessModelManagerImpl

public interface ProcessModelManager

The workflow engine services related to process model management.


Method Summary
 void clearProcessModelCache()
           
 ProcessModel createProcessModel(String fileName, String peasId)
          Create a ProcessModel from xml descriptor filename.
 ProcessModel createProcessModelDescriptor()
          Create a new ProcessModel descriptor that is not yet saved in a XML file.
 void deleteProcessModel(String instanceId)
          Delete a ProcessModel with given model id
 void deleteProcessModelDescriptor(String strProcessModelFileName)
          Delete a ProcessModelDescriptor XML with given path
 String[] getAllPeasIds()
          Get all the "process manager" peas ids
 ProcessModel getProcessModel(String modelId)
          Get a ProcessModel from its modelId.
 String getProcessModelDir()
          Get the directory where are stored the models
 List<String> listProcessModels()
          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.
 ProcessModel loadProcessModel(String processFileName, boolean absolutePath)
          load a process model definition from xml file to java objects
 void saveProcessModel(ProcessModel process, String processFileName)
          Saves a process model definition from java objects to an XML file
 

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:
modelId - model id
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,
                              boolean absolutePath)
                              throws WorkflowException
load a process model definition from xml file to java objects

Parameters:
processFileName - the xml file name that contains process model definition
absolutePath - true if xml file name contains the full path, else concat with the directory defined in castorSettings.properties
Returns:
a ProcessModel object
Throws:
WorkflowException - when something goes wrong or the file cannot be found

getAllPeasIds

String[] getAllPeasIds()
                       throws WorkflowException
Get all the "process manager" peas ids

Throws:
WorkflowException

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

clearProcessModelCache

void clearProcessModelCache()
                            throws WorkflowException
Throws:
WorkflowException


Copyright © 2016 Silverpeas. All Rights Reserved.