org.ow2.bonita.facade
Interface ManagementAPI

All Superinterfaces:
RemoteManagementAPI

public interface ManagementAPI
extends RemoteManagementAPI

Workflow process deployment operations. Individual or grouped deployment of objects relating to the process definition: XPDL file, java class data for hooks, mappers, performer assignments, ....

Author:
Marc Blachon, Guillaume Porcher, Charles Souillard, Miguel Valdes, Pierre Vigneras
See Also:
TxHook, Hook

Method Summary
 void clearHistory()
          Clears the history data (archived data).
 void deletePackage(PackageDefinitionUUID pacDefinitionUUID)
          Deletes from journal and history :
the given package all its processes all instances of these processes.
 java.util.Map<java.lang.String,ProcessDefinition> deploy(Deployment deployment)
          Deploys the XPDL Workflow giving the deployment object containing the XPDL Workflow Package and optionnally its depending java classes.
 java.util.Map<java.lang.String,ProcessDefinition> deploy(java.net.URL xpdlURL, java.lang.Class<?>[] classes)
          Deploys the XPDL Workflow Package and its depending java classes.
 java.util.Map<java.lang.String,ProcessDefinition> deployBar(byte[] barFile)
          Deploys a package giving the URL of the bar file.
 java.util.Map<java.lang.String,ProcessDefinition> deployBar(java.net.URL barFileURL)
          Deploys an XPDL workflow package giving the URL of archive file (.bar file) containing the XPDL definition file and optionally the classes to be deployed.
 void deployClass(byte[] clazz)
          Deploys a class giving its bytes table.
 void deployClasses(java.util.Set<byte[]> classes)
          Deploys several classes in global class repository giving a set of data classes.
 void deployClassesInJar(byte[] classesArchive)
          Deploys several classes in global class repository giving an archive containing the classes.
 java.util.Map<java.lang.String,ProcessDefinition> deployXpdl(byte[] xpdlFile)
          deploys the XPDL Workflow Package giving the byte array of the serialazed XPDL file.
 java.util.Map<java.lang.String,ProcessDefinition> deployXpdl(java.net.URL xpdlURL)
          Deploys the XPDL Workflow Package giving the URL of the XPDL file.
 java.util.Map<java.lang.String,ProcessDefinition> deployZip(byte[] zipFile)
          Deploys the XPDL Workflow giving the byte table of the zip archive containing the XPDL Workflow Package and optionnally its depending java classes.
 java.util.Map<java.lang.String,ProcessDefinition> deployZip(java.net.URL zipURL)
          Deploys the XPDL Workflow giving the URL of the zip archive containing the XPDL Workflow Package and optionally its depending java classes.
 void removeClass(java.lang.String className)
          Removes a class giving the class name.
 void removeClasses(java.lang.String[] classNames)
          Removes classes giving there class names.
 void replaceClass(java.lang.String className, byte[] newClazz)
          Removes the class with the given className name.
 void undeploy(PackageDefinitionUUID packageUUID)
          Un-deploys a Workflow package giving the package UUID.
 

Method Detail

deployXpdl

java.util.Map<java.lang.String,ProcessDefinition> deployXpdl(java.net.URL xpdlURL)
                                                             throws DeploymentException
Deploys the XPDL Workflow Package giving the URL of the XPDL file.

Specified by:
deployXpdl in interface RemoteManagementAPI
Parameters:
xpdlURL - the URL of the XPDL file.
Returns:
a map of deployed process definitions
(keys are the id of the processes as specified by the value of the Id attribute within the WorkflowProcess elements into the XPDL definition file and values are the ProcessDefinition objects).
Throws:
DeploymentException -
  • if XPDL file cannot be found at the given URL
  • if a process has already been deployed with the same version. New version is required
  • if the version of the package containing processes with new versions has not been changed.
  • if required classes have not been found into the global class repository.
  • BonitaInternalException - if an other exception occurs.

    deployXpdl

    java.util.Map<java.lang.String,ProcessDefinition> deployXpdl(byte[] xpdlFile)
                                                                 throws DeploymentException
    deploys the XPDL Workflow Package giving the byte array of the serialazed XPDL file.

    Specified by:
    deployXpdl in interface RemoteManagementAPI
    Parameters:
    xpdlFile - the byte array of the XPDL file.
    Returns:
    a map of deployed process definitions
    (keys are the id of the processes as specified by the value of the Id attribute within the WorkflowProcess elements into the XPDL definition file and values are the ProcessDefinition objects).
    Throws:
    DeploymentException -
    • if XPDL file cannot be deserialized from the given byte arry
    • if a process has already been deployed with the same version. New version is required
    • if the version of the package containing processes with new versions has not been changed.
  • if required classes have not been found into the global class repository.
  • BonitaInternalException - if an other exception occurs.

    deploy

    java.util.Map<java.lang.String,ProcessDefinition> deploy(java.net.URL xpdlURL,
                                                             java.lang.Class<?>[] classes)
                                                             throws DeploymentException
    Deploys the XPDL Workflow Package and its depending java classes. giving the URL of the XPDL file and the table of classes.
    Classes are deployed at package level (not global level repository).

    Specified by:
    deploy in interface RemoteManagementAPI
    Parameters:
    xpdlURL - the URL of the XPDL file.
    classes - the table of java classes.
    Returns:
    a map of deployed process definitions
    (keys are the id of the processes as specified by the value of the Id attribute within the WorkflowProcess elements into the XPDL definition file and values are the ProcessDefinition objects).
    Throws:
    DeploymentException -
    • if XPDL file cannot be found at the given URL
    • if a process has already been deployed with the same version. New version is required
    • if the version of the package containing processes with new versions has not been changed.
  • if required classes have not been found firstly within the provided classes (package dependence) or secondly into the global class repository.
  • BonitaInternalException - if an other exception occurs.

    deployZip

    java.util.Map<java.lang.String,ProcessDefinition> deployZip(java.net.URL zipURL)
                                                                throws DeploymentException
    Deploys the XPDL Workflow giving the URL of the zip archive containing the XPDL Workflow Package and optionally its depending java classes.
    Classes are deployed at package level (not global level repository).

    Specified by:
    deployZip in interface RemoteManagementAPI
    Parameters:
    zipURL - the URL of the zip file.
    Returns:
    a map of deployed process definitions
    (keys are the id of the processes as specified by the value of the Id attribute within the WorkflowProcess elements into the XPDL definition file and values are the ProcessDefinition objects).
    Throws:
    DeploymentException -
    • if the archive does not contain any XPDL file
    • if the archive contains more than one XPDL file
    • if a process has already been deployed with the same version. New version is required
    • if the version of the package containing processes with new versions has not been changed.
    • if required classes have not been found firstly within the archive (package dependence) or secondly into the global class repository.
    BonitaInternalException - if an other exception occurs.

    deployZip

    java.util.Map<java.lang.String,ProcessDefinition> deployZip(byte[] zipFile)
                                                                throws DeploymentException
    Deploys the XPDL Workflow giving the byte table of the zip archive containing the XPDL Workflow Package and optionnally its depending java classes.
    Classes are deployed at package level (not global level repository).

    Specified by:
    deployZip in interface RemoteManagementAPI
    Parameters:
    zipFile - the bytes table of the zip file.
    Returns:
    a map of deployed process definitions
    (keys are the id of the processes as specified by the value of the Id attribute within the WorkflowProcess elements into the XPDL definition file and values are the ProcessDefinition objects).
    Throws:
    DeploymentException -
    • if the archive does not contain any XPDL file
    • if the archive contains more than one XPDL file
    • if a process has already been deployed with the same version. New version is required.
    • if the version of the package containing processes with new versions has not been changed too.
    • if required classes have not been found firstly within the archive (package dependence) or secondly into the global class repository.
    BonitaInternalException - if an other exception occurs.

    deploy

    java.util.Map<java.lang.String,ProcessDefinition> deploy(Deployment deployment)
                                                             throws DeploymentException
    Deploys the XPDL Workflow giving the deployment object containing the XPDL Workflow Package and optionnally its depending java classes.
    Classes are deployed at package level (not global level repository).

    Specified by:
    deploy in interface RemoteManagementAPI
    Parameters:
    deployment - the deployment object that should contain the XPDL file and the depending classes.
    Returns:
    a map of deployed process definitions
    (keys are the id of the processes as specified by the value of the Id attribute within the WorkflowProcess elements into the XPDL definition file and values are the ProcessDefinition objects).
    Throws:
    DeploymentException -
    • if the deployment does not contain any XPDL file
    • if the deployment contains more than one XPDL file
    • if a process has already been deployed with the same version. New version is required
    • if the version of the package containing processes with new versions has not been changed too.
    • if required classes have not been found firstly within the deployment object (package dependence) or secondly into the global class repository.
    BonitaInternalException - if an exception occurs.

    deployBar

    java.util.Map<java.lang.String,ProcessDefinition> deployBar(java.net.URL barFileURL)
                                                                throws DeploymentException
    Deploys an XPDL workflow package giving the URL of archive file (.bar file) containing the XPDL definition file and optionally the classes to be deployed.

    Specified by:
    deployBar in interface RemoteManagementAPI
    Parameters:
    barFileURL - the URL of the bar file.
    Returns:
    a map of deployed process definitions
    (keys are the id of the processes as specified by the value of the Id attribute within the WorkflowProcess elements into the XPDL definition file and values are the ProcessDefinition objects).
    Throws:
    java.lang.IllegalArgumentException - if the barFileURL is null parameter.
    DeploymentException -
    • if the barFile does not contain any XPDL file
    • if the archive contains more than one XPDL file
    • if a process has already been deployed with the same version. New version is required
    • if the version of the package containing processes with new versions has not been changed too.
    • if the required classes have not been found firstly within the archive (package dependence) or secondly into the global class repository.
    BonitaInternalException - if an other exception occurs.

    deployBar

    java.util.Map<java.lang.String,ProcessDefinition> deployBar(byte[] barFile)
                                                                throws DeploymentException
    Deploys a package giving the URL of the bar file.

    Specified by:
    deployBar in interface RemoteManagementAPI
    Parameters:
    barFile - the file of the barfile.
    Returns:
    a map of deployed process definitions
    (keys are the id of the processes as specified by the value of the Id attribute within the WorkflowProcess elements into the XPDL definition file and values are the ProcessDefinition objects).
    Throws:
    java.lang.IllegalArgumentException - if the barFile is null parameter.
    DeploymentException -
    • if the barFile does not contain any XPDL file
    • if the archive contains more than one XPDL file
    • if a process has already been deployed with the same version. New version is required
    • if the version of the package containing processes with new versions has not been changed too.
    • if the required classes have not been found firstly within the archive (package dependence) or secondly into the global class repository.
    BonitaInternalException - if an other exception occurs.

    deployClass

    void deployClass(byte[] clazz)
                     throws DeploymentException
    Deploys a class giving its bytes table.

    Specified by:
    deployClass in interface RemoteManagementAPI
    Parameters:
    clazz - the bytes table of the class.
    Throws:
    DeploymentException - if there is already a deployed class with this name.
    BonitaInternalException - if an other exception occurs.

    deployClasses

    void deployClasses(java.util.Set<byte[]> classes)
                       throws DeploymentException
    Deploys several classes in global class repository giving a set of data classes.

    Specified by:
    deployClasses in interface RemoteManagementAPI
    Parameters:
    classes - a set of classes. Each class is represented by a bytes table.
    Throws:
    java.lang.IllegalArgumentException - if classes is null parameter.
    DeploymentException - if there is already a deployed class with the name
    BonitaInternalException - if an other exception occurs.

    deployClassesInJar

    void deployClassesInJar(byte[] classesArchive)
                            throws DeploymentException
    Deploys several classes in global class repository giving an archive containing the classes.

    Specified by:
    deployClassesInJar in interface RemoteManagementAPI
    Parameters:
    classesArchive - the archive containing the classes represented by a bytes table.
    Throws:
    java.lang.IllegalArgumentException - if the classes is null parameter.
    DeploymentException - if there is already a deployed class with this name or there's an IOException occurs.
    BonitaInternalException - if an other exception occurs.

    undeploy

    void undeploy(PackageDefinitionUUID packageUUID)
                  throws DeploymentException
    Un-deploys a Workflow package giving the package UUID. This operation undeploys also the classes that have been deployed within the initial package deployment.

    Specified by:
    undeploy in interface RemoteManagementAPI
    Parameters:
    packageUUID - the package definition UUID. This UUID can be retrieved from any DefinitionRecord (e.g. ProcessDefinition) by calling DefinitionRecord.getPackageDefinitionUUID()
    Throws:
    java.lang.IllegalStateException - if the given parameter is null.
    DeploymentException -
    • if the package has not been found in the journal (ie. the package is not deployed)
    • if there's still running instances for process(es) deployed within the package.
    • .
    BonitaInternalException - if an exception occurs.

    removeClass

    void removeClass(java.lang.String className)
                     throws DeploymentException
    Removes a class giving the class name.

    Specified by:
    removeClass in interface RemoteManagementAPI
    Parameters:
    className - the name of the class.
    Throws:
    DeploymentException - if there's no class defined in global class repository with this name or a deployed process is still using this class.
    BonitaInternalException - if an other exception occurs.

    removeClasses

    void removeClasses(java.lang.String[] classNames)
                       throws DeploymentException
    Removes classes giving there class names.

    Specified by:
    removeClasses in interface RemoteManagementAPI
    Parameters:
    classNames - the table of class names.
    Throws:
    DeploymentException - if there's no class defined in global class repository with this name or a deployed process is still using given classes (deployed into the global class repository).
    BonitaInternalException - if an other exception occurs.

    replaceClass

    void replaceClass(java.lang.String className,
                      byte[] newClazz)
                      throws DeploymentException
    Removes the class with the given className name. Deploy the new given one.

    Specified by:
    replaceClass in interface RemoteManagementAPI
    Parameters:
    className - the class name to be replaced.
    newClazz - the bytes table of the new class.
    Throws:
    DeploymentException - if the class to be replaced is not found into the global class repository.
    BonitaInternalException - if an other exception occurs.

    clearHistory

    void clearHistory()
    Clears the history data (archived data).

    Specified by:
    clearHistory in interface RemoteManagementAPI
    Throws:
    BonitaInternalException - if an other exception occurs.

    deletePackage

    void deletePackage(PackageDefinitionUUID pacDefinitionUUID)
                       throws PackageNotFoundException,
                              UndeletablePackageException,
                              UndeletableInstanceException
    Deletes from journal and history :


    Copyright © 2008 OW2 Consortium. All Rights Reserved.