org.obe.spi.service
Interface ProcessRepository

All Superinterfaces:
WorkflowService

public interface ProcessRepository
extends WorkflowService

Provides persistence for packages and process definitions. Methods return either the parsed, in-memory form as required to support the run-time, or WAPI value objects as required to support the client API.

TODO: in the future, it may be desirable to support the WAPI2 process modeling APIs, although there may be no reason for this to be a remote API.

TODO: Think about implementing a WebDAV interface to the process repository.

Author:
Adrian Price

Field Summary
static java.lang.String SERVICE_NAME
           
 
Method Summary
 void createPackage(XPDLPackage pkg)
          Creates a package using the supplied content.
 void deletePackage(java.lang.String packageId)
          Permanently deletes the specified package.
 XPDLPackage findPackage(java.lang.String packageId)
          Retrieves the specified package.
 XPDLPackage[] findPackages(WMFilter filter, boolean countFlag)
          Retrieves a set of packages.
 int findProcessDefinitionState(java.lang.String processDefinitionId)
          Returns the state of a process definition.
 WorkflowProcess findWorkflowProcess(java.lang.String processDefinitionId)
          Retrieves a process definition in executable form.
 WorkflowProcess[] findWorkflowProcesses(java.lang.String name, boolean validOnly)
          Retrieves process definitions in executable form.
 WorkflowProcess[] findWorkflowProcesses(WMFilter filter, boolean countFlag)
          Retrieves a list of process definitions in executable form.
 void purge()
          Purges all data from the process repository.
 void updatePackage(XPDLPackage pkg)
          Sets the content of the specified package.
 void updateProcessDefinitionState(java.lang.String processDefinitionId, int newState)
          Changes the process definition state.
 
Methods inherited from interface org.obe.spi.WorkflowService
exit, getServiceManager, getServiceName, init
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Method Detail

purge

public void purge()
           throws RepositoryException
Purges all data from the process repository. WARNING! All packages and process definitions will be permanently deleted.

Throws:
RepositoryException

createPackage

public void createPackage(XPDLPackage pkg)
                   throws RepositoryException
Creates a package using the supplied content.

Parameters:
pkg - The pre-parsed package object.
Throws:
RepositoryException

deletePackage

public void deletePackage(java.lang.String packageId)
                   throws RepositoryException
Permanently deletes the specified package.

Parameters:
packageId - The package ID.
Throws:
RepositoryException

findPackages

public XPDLPackage[] findPackages(WMFilter filter,
                                  boolean countFlag)
                           throws RepositoryException
Retrieves a set of packages.

Parameters:
filter - A package filter specification.
countFlag - Flag to return just a count of the matching packages.
Returns:
An array of matching packages.
Throws:
RepositoryException

findPackage

public XPDLPackage findPackage(java.lang.String packageId)
                        throws RepositoryException
Retrieves the specified package.

Parameters:
packageId - The ID of the package to retrieve.
Returns:
The requested package.
Throws:
RepositoryException

updatePackage

public void updatePackage(XPDLPackage pkg)
                   throws RepositoryException
Sets the content of the specified package.

Parameters:
pkg - The package to write.
Throws:
RepositoryException

findWorkflowProcess

public WorkflowProcess findWorkflowProcess(java.lang.String processDefinitionId)
                                    throws RepositoryException
Retrieves a process definition in executable form.

Parameters:
processDefinitionId - The process definition ID.
Returns:
The requested process definition.
Throws:
RepositoryException

findWorkflowProcesses

public WorkflowProcess[] findWorkflowProcesses(java.lang.String name,
                                               boolean validOnly)
                                        throws RepositoryException
Retrieves process definitions in executable form. The method returns all process definitions with the specified name. If the validOnly flag is true the method returns only versions of the specified workflow which could be instantiated at the current time, according to their state, status, and validFrom and validTo dates.

Parameters:
name - The process definition name. Must not be null To find all workflows, call findWorkflowProcesses(WMFilter, boolean).
validOnly - true to return only workflows which are available for instantiation at the current time.
Returns:
The process definition(s) matching the specified name.
Throws:
RepositoryException
See Also:
findWorkflowProcesses(WMFilter, boolean)

findWorkflowProcesses

public WorkflowProcess[] findWorkflowProcesses(WMFilter filter,
                                               boolean countFlag)
                                        throws RepositoryException
Retrieves a list of process definitions in executable form. The method returns all process definitions which match the supplied filter.

Parameters:
filter - A process definition filter specification.
Returns:
An array of matching process definitions.
Throws:
RepositoryException
See Also:
findWorkflowProcesses(String, boolean)

findProcessDefinitionState

public int findProcessDefinitionState(java.lang.String processDefinitionId)
                               throws RepositoryException
Returns the state of a process definition.

Parameters:
processDefinitionId - The process definition id
Returns:
The process definition state, as defined in WMProcessDefinitionState
Throws:
RepositoryException

updateProcessDefinitionState

public void updateProcessDefinitionState(java.lang.String processDefinitionId,
                                         int newState)
                                  throws RepositoryException
Changes the process definition state.

Parameters:
processDefinitionId - The process definition id
newState - The new process definition state
Throws:
RepositoryException - Workflow client exception


SourceForge.net Logo OBE-1.0 Copyright (c) 2002-2006 Adrian Price. All Rights Reserved.