Package org.silverpeas.core.workflow.api
Interface ProcessModelManager
-
- All Known Implementing Classes:
ProcessModelManagerImpl
public interface ProcessModelManager
The workflow engine services related to process model management.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 idvoid
deleteProcessModelDescriptor(String strProcessModelFileName)
Delete a ProcessModelDescriptor XML with given pathString[]
getAllPeasIds()
Get all the "process manager" peas idsProcessModel
getProcessModel(String modelId)
Get a ProcessModel from its modelId.String
getProcessModelDir()
Get the directory where are stored the modelsList<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)
load a process model definition from xml file to java objectsvoid
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:
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
-
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 definitionprocess
- A processModel object to be saved- Throws:
WorkflowException
- when something goes wrong
-
clearProcessModelCache
void clearProcessModelCache() throws WorkflowException
- Throws:
WorkflowException
-
-