de.danet.an.workflow.api
Interface ProcessDefinitionDirectory

All Superinterfaces:
WfObject

public interface ProcessDefinitionDirectory
extends WfObject

This interface defines a process definiton directory.


Method Summary
 java.util.List importProcessDefinitions(byte[] processDefinitions)
          This operation method import new process definitions from an XPDL description.
 java.util.List importProcessDefinitions(java.lang.String processDefinitions)
          This operation method import new process definitions from an XPDL description.
 boolean isEnabled(java.lang.String packageId, java.lang.String processId)
          This operation method returns true if the process definition with the given ids is enabled.
 ProcessDefinition lookupProcessDefinition(java.lang.String packageId, java.lang.String processId)
          This method delivers the process definition for the given ids.
 boolean processDefinitionExists(java.lang.String packageId, java.lang.String processId)
          This method checks if a process definiton with the given ids exists.
 java.util.Collection processDefinitions()
          This operation method delivers a collection of all defined process definitions.
 ProcessMgr processMgr(java.lang.String packageId, java.lang.String processId)
          This method delivers the process manager for the process definition with the given ids.
 void removeProcessDefinition(java.lang.String packageId, java.lang.String processId)
          This operation method removes a process definition with the given ids from the database.
 void setEnabled(java.lang.String packageId, java.lang.String processId, boolean enabled)
          This operation method set the process definition with the given ids as enabled or disabled.
 

Method Detail

importProcessDefinitions

public java.util.List importProcessDefinitions(java.lang.String processDefinitions)
                                        throws java.rmi.RemoteException,
                                               ImportException
This operation method import new process definitions from an XPDL description.

Note that importing an XPDL description automatically removes any existing process definitions that have the same package id as the imported package.

Parameters:
processDefinitions - document describing the process definitions.
Returns:
list of prioritized message PrioritizedMessage. This list only includes messages of priority INFO or WARN. If any (fatal) error has occured, an ImportExceptionwill be thrown and the error message can be taken from there.
Throws:
java.rmi.RemoteException - if a system-level error occurs. The import has been aborted.
ImportException - if the input is not a correct.

importProcessDefinitions

public java.util.List importProcessDefinitions(byte[] processDefinitions)
                                        throws java.rmi.RemoteException,
                                               ImportException
This operation method import new process definitions from an XPDL description. Note that importing an XPDL description automatically removes any existing process definitions that have the same package id as the imported package.

Parameters:
processDefinitions - byte array resulting from an InputStream that describes the process definitions.
Returns:
list of prioritized message PrioritizedMessage. This list only includes messages of priority INFO or WARN. If any (fatal) error has occured, an ImportExceptionwill be thrown and the error message can be taken from there.
Throws:
java.rmi.RemoteException - if a system-level error occurs. The import has been aborted.
ImportException - if the input is not a correct.

removeProcessDefinition

public void removeProcessDefinition(java.lang.String packageId,
                                    java.lang.String processId)
                             throws java.rmi.RemoteException,
                                    InvalidKeyException
This operation method removes a process definition with the given ids from the database. If called for a definition that does not exist, it does nothing.

Parameters:
packageId - Id attribute of the process package.
processId - Id attribute of the process.
Throws:
java.rmi.RemoteException - if a system-level error occurs.
InvalidKeyException - if packageId or processId are (formally) invalid ids.

processDefinitions

public java.util.Collection processDefinitions()
                                        throws java.rmi.RemoteException
This operation method delivers a collection of all defined process definitions. The elements of the list are of the type ProcessDefinition

Returns:
collection
Throws:
java.rmi.RemoteException - if a system-level error occurs.

processDefinitionExists

public boolean processDefinitionExists(java.lang.String packageId,
                                       java.lang.String processId)
                                throws java.rmi.RemoteException
This method checks if a process definiton with the given ids exists.

Parameters:
packageId - Id attribute of the process package.
processId - Id attribute of the process.
Returns:
true if a process definition with the given id exists.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

lookupProcessDefinition

public ProcessDefinition lookupProcessDefinition(java.lang.String packageId,
                                                 java.lang.String processId)
                                          throws InvalidKeyException,
                                                 java.rmi.RemoteException
This method delivers the process definition for the given ids. If no process definition with the ids exist, it throws an IllegalArgumentException.

Parameters:
packageId - Id attribute of the process package.
processId - Id attribute of the process.
Returns:
the found ProcessDefinition object.
Throws:
InvalidKeyException - if no process definition with the given ids exists.
java.rmi.RemoteException - if a system-level error occurs.

isEnabled

public boolean isEnabled(java.lang.String packageId,
                         java.lang.String processId)
                  throws java.rmi.RemoteException,
                         InvalidKeyException
This operation method returns true if the process definition with the given ids is enabled.

Parameters:
packageId - Id attribute of the process package.
processId - Id attribute of the process.
Returns:
if the process definition is enabled.
Throws:
InvalidKeyException - if no process definition with the given ids exists.
java.rmi.RemoteException - if a system-level error occurs.

setEnabled

public void setEnabled(java.lang.String packageId,
                       java.lang.String processId,
                       boolean enabled)
                throws java.rmi.RemoteException,
                       InvalidKeyException
This operation method set the process definition with the given ids as enabled or disabled.

Parameters:
packageId - Id attribute of the process package.
processId - Id attribute of the process.
enabled - enable the process definition or not.
Throws:
InvalidKeyException - if no process definition with the given ids exists.
java.rmi.RemoteException - if a system-level error occurs.

processMgr

public ProcessMgr processMgr(java.lang.String packageId,
                             java.lang.String processId)
                      throws InvalidKeyException,
                             java.rmi.RemoteException
This method delivers the process manager for the process definition with the given ids.

Parameters:
packageId - Id attribute of the process package.
processId - Id attribute of the process.
Returns:
the process manager for the process type.
Throws:
InvalidKeyException - if not process definition with the given ids exists.
java.rmi.RemoteException - if a system-level error occurs.