org.ow2.bonita.facade
Interface QueryDefinitionAPI

All Superinterfaces:
org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI

public interface QueryDefinitionAPI
extends org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI

Getters on the workflow definition data for:

As indicated by its prefix: Query, this interface could be seen as complementary to the QueryRuntimeAPI interface.
This interface deals with the static part of the data managed by the wokflow.

Workflow data can be retrieved with both entities ids or names.

See Also:
Hook

Method Summary
 PackageDefinition getLastPackage(java.lang.String packageId)
          Returns the last deployed package for the specified package id.
 ProcessDefinition getLastProcess(java.lang.String processId)
          Return the last deployed process for the specified process id.
 PackageDefinition getPackage(PackageDefinitionUUID packageDefinitionUUID)
          Returns the package definition for the specified packageDefintion UUID.
 ProcessDefinition getPackageProcess(PackageDefinitionUUID packageDefinitionUUID, java.lang.String processId)
          Returns the process definition for the specified packageDefinition UUID and process Id.
 java.util.Set<ProcessDefinition> getPackageProcesses(PackageDefinitionUUID packageDefinitionUUID)
          Returns the set of definition information of all processes within the specified deployed package.
 java.util.Set<PackageDefinition> getPackages()
          Returns the set of definition informations for all deployed packages.
 java.util.Set<PackageDefinition> getPackages(PackageDefinition.PackageState state)
          Returns the set of definition informations for all packages having the given state.
 java.util.Set<PackageDefinition> getPackages(java.lang.String packageId)
          Returns the set of definition informations on all deployed packages for the specified package Id.
 java.util.Set<PackageDefinition> getPackages(java.lang.String packageId, PackageDefinition.PackageState state)
          Returns the set of definition informations for packages with the given state and the given package Id.
 ProcessDefinition getProcess(ProcessDefinitionUUID processDefinitionUUID)
          Returns the process definition for the specified processDefinition UUID.
 java.util.Set<ActivityDefinition> getProcessActivities(ProcessDefinitionUUID processDefinitionUUID)
          Returns the set of definitions for process activities of the specified processDefinition UUID.
 ActivityDefinition getProcessActivity(ProcessDefinitionUUID processDefinitionUUID, java.lang.String activityId)
          Returns the definition for process activity of the specified process.
 ActivityDefinitionUUID getProcessActivityId(ProcessDefinitionUUID processDefinitionUUID, java.lang.String activityName)
          Returns the activity Id for the specified process UUID and activity name.
 java.util.Set<ProcessDefinition> getProcesses()
          Returns the set of definition information of all deployed processes.
 java.util.Set<ProcessDefinition> getProcesses(ProcessDefinition.ProcessState processState)
          Returns the set of definition informations for the processes with the specified process state.
 java.util.Set<ProcessDefinition> getProcesses(java.lang.String processId)
          Returns the set of definition informations for the process with the specified process id as specified in the xpdl file.
 java.util.Set<ProcessDefinition> getProcesses(java.lang.String processId, ProcessDefinition.ProcessState processState)
          Returns the set of definition informations for the processes with the specified processId and process state.
 ParticipantDefinition getProcessParticipant(ProcessDefinitionUUID processDefinitionUUID, java.lang.String participantId)
          Returns the participant definition for the specified processDefinition UUID.
 ParticipantDefinitionUUID getProcessParticipantId(ProcessDefinitionUUID processDefinitionUUID, java.lang.String participantName)
          Returns the participantDefinition UUID for the specified processDefinition UUID and participant name.
 java.util.Set<ParticipantDefinition> getProcessParticipants(ProcessDefinitionUUID processDefinitionUUID)
          Returns the set of participant definitions for the specified process and deployment.
 

Method Detail

getPackages

java.util.Set<PackageDefinition> getPackages()
Returns the set of definition informations for all deployed packages.

Specified by:
getPackages in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Returns:
a set of PackageDefinition in unspecified order that have been deployed.
Throws:
BonitaInternalException - if an exception occurs.

getPackages

java.util.Set<PackageDefinition> getPackages(java.lang.String packageId)
Returns the set of definition informations on all deployed packages for the specified package Id.

Specified by:
getPackages in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
packageId - the package Id (as specified in the XPDL file).
Returns:
a set of PackageDefinition in unspecified order that have been deployed for the package with specified packageId.
Throws:
BonitaInternalException - if an exception occurs.

getPackage

PackageDefinition getPackage(PackageDefinitionUUID packageDefinitionUUID)
                             throws PackageNotFoundException
Returns the package definition for the specified packageDefintion UUID.

Specified by:
getPackage in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
packageDefinitionUUID - the package processDefinitionUUID.
Returns:
a packageDefinition interface for the specified packageDefintion UUID.
Throws:
PackageNotFoundException - if package does not exist
BonitaInternalException - if an exception occurs.

getPackages

java.util.Set<PackageDefinition> getPackages(PackageDefinition.PackageState state)
Returns the set of definition informations for all packages having the given state.

Specified by:
getPackages in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
state - the state of the package.
Returns:
the (unordered) set of PackageDefinition for all packages having the given state.
Throws:
BonitaInternalException - if an exception occurs.

getPackages

java.util.Set<PackageDefinition> getPackages(java.lang.String packageId,
                                             PackageDefinition.PackageState state)
                                             throws PackageNotFoundException
Returns the set of definition informations for packages with the given state and the given package Id.

Specified by:
getPackages in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
state - the state of the package.
packageId - the package Id.
Returns:
a set of PackageDefinition for packages with the given state and the given package Id.
Throws:
PackageNotFoundException - if package does not exist.
BonitaInternalException - if an exception occurs.

getPackageProcesses

java.util.Set<ProcessDefinition> getPackageProcesses(PackageDefinitionUUID packageDefinitionUUID)
                                                     throws PackageNotFoundException
Returns the set of definition information of all processes within the specified deployed package.

Specified by:
getPackageProcesses in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
packageDefinitionUUID - the packageDefinition UUID.
Returns:
set of ProcessDefinition of all the processes within the specified deployed package.
Throws:
PackageNotFoundException - if package does not exist.
BonitaInternalException - if an exception occurs.

getPackageProcess

ProcessDefinition getPackageProcess(PackageDefinitionUUID packageDefinitionUUID,
                                    java.lang.String processId)
                                    throws PackageNotFoundException,
                                           ProcessNotFoundException
Returns the process definition for the specified packageDefinition UUID and process Id.

Specified by:
getPackageProcess in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
packageDefinitionUUID - the UUID of the packageDefinition
processId - the process Id.
Returns:
the process definition for the specified packageDefinition UUID and process Id.
Throws:
PackageNotFoundException - if package does not exist
ProcessNotFoundException - if process with id processId does not exist in package

getProcesses

java.util.Set<ProcessDefinition> getProcesses()
Returns the set of definition information of all deployed processes.

Specified by:
getProcesses in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Returns:
set of ProcessDefinition of all deployed processes.
Throws:
BonitaInternalException - if an exception occurs.

getProcesses

java.util.Set<ProcessDefinition> getProcesses(java.lang.String processId)
Returns the set of definition informations for the process with the specified process id as specified in the xpdl file. These process informations are searched into the current recorded informations and into the archived informations. A process with a given processId could have been deployed and undeployed several times.

Specified by:
getProcesses in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Returns:
set of ProcessDefinition of the specified process processId.
Throws:
BonitaInternalException - if an exception occurs.

getProcess

ProcessDefinition getProcess(ProcessDefinitionUUID processDefinitionUUID)
                             throws ProcessNotFoundException
Returns the process definition for the specified processDefinition UUID.

Specified by:
getProcess in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
processDefinitionUUID - the process UUID.
Returns:
the ProcessDefinition interface for the specified processDefinition UUID.
Throws:
ProcessNotFoundException - if the process with the given UUID does not exist
BonitaInternalException - if an exception occurs.

getProcesses

java.util.Set<ProcessDefinition> getProcesses(ProcessDefinition.ProcessState processState)
Returns the set of definition informations for the processes with the specified process state.

Specified by:
getProcesses in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
processState - the state of the process.
Returns:
the set of ProcessDefinition for the processes with the specified process state.

getProcesses

java.util.Set<ProcessDefinition> getProcesses(java.lang.String processId,
                                              ProcessDefinition.ProcessState processState)
                                              throws ProcessNotFoundException
Returns the set of definition informations for the processes with the specified processId and process state.

Specified by:
getProcesses in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
processId - the Id of the process.
processState - the state of the process.
Returns:
the set of ProcessDefinition for the processes with the specified processId and process state.
Throws:
ProcessNotFoundException - if the process with the given id does not exist

getProcessParticipants

java.util.Set<ParticipantDefinition> getProcessParticipants(ProcessDefinitionUUID processDefinitionUUID)
                                                            throws ProcessNotFoundException
Returns the set of participant definitions for the specified process and deployment.

Specified by:
getProcessParticipants in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
processDefinitionUUID - the processDefinition UUID.
Returns:
the set of ParticipantDefinition for the specified processDefinition UUID.
Throws:
ProcessNotFoundException - if no process exists with the given processDefinition UUID.

getProcessParticipant

ParticipantDefinition getProcessParticipant(ProcessDefinitionUUID processDefinitionUUID,
                                            java.lang.String participantId)
                                            throws ProcessNotFoundException,
                                                   ParticipantNotFoundException
Returns the participant definition for the specified processDefinition UUID.

Specified by:
getProcessParticipant in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
processDefinitionUUID - the processDefinition UUID.
participantId - the participant id as specified in the XPDL file.
Returns:
the ParticipantDefinition for the specified processDefinition UUID and participant participantId.
Throws:
ProcessNotFoundException - if the process with the given processDefinition UUID does not exist
ParticipantNotFoundException - if the participant does not exist in process

getProcessActivities

java.util.Set<ActivityDefinition> getProcessActivities(ProcessDefinitionUUID processDefinitionUUID)
                                                       throws ProcessNotFoundException
Returns the set of definitions for process activities of the specified processDefinition UUID.

Specified by:
getProcessActivities in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
processDefinitionUUID - the process UUID.
Returns:
the set of ActivityDefinition for the specified processDefinition UUID.
Throws:
ProcessNotFoundException - if the process with the given processDefinition UUID does not exist

getProcessActivity

ActivityDefinition getProcessActivity(ProcessDefinitionUUID processDefinitionUUID,
                                      java.lang.String activityId)
                                      throws ProcessNotFoundException,
                                             ActivityNotFoundException
Returns the definition for process activity of the specified process.

Specified by:
getProcessActivity in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
processDefinitionUUID - the process UUID.
activityId - the activity id as specified in the XPDL file.
Returns:
the ActivityDefinition for the specified processDefinition UUID and activity id (as specified in the XPDL file).
Throws:
ProcessNotFoundException - if the process with the given UUID does not exist
ActivityNotFoundException - if the activity with the given id does not exist in the process

getProcessActivityId

ActivityDefinitionUUID getProcessActivityId(ProcessDefinitionUUID processDefinitionUUID,
                                            java.lang.String activityName)
                                            throws ProcessNotFoundException
Returns the activity Id for the specified process UUID and activity name. Id and Name of an activity are both defined into the XPDL file within Activity element (value of Id and Name attributes for XPDL Activity element).

Specified by:
getProcessActivityId in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
processDefinitionUUID - the process UUID.
activityName - the activity name as specified in the XPDL file (value of Name attribute within the Activity element).
Returns:
the activity UUID for the specified process UUID and activity name.
Throws:
ProcessNotFoundException - if the process with the given UUID does not exist

getProcessParticipantId

ParticipantDefinitionUUID getProcessParticipantId(ProcessDefinitionUUID processDefinitionUUID,
                                                  java.lang.String participantName)
                                                  throws ProcessNotFoundException
Returns the participantDefinition UUID for the specified processDefinition UUID and participant name.

Specified by:
getProcessParticipantId in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
processDefinitionUUID - the processDefinition UUID.
participantName - the participant name as specified in the XPDL file.
Returns:
the participantDefinition UUID for the specified processDefinition UUID and participant name.
Throws:
ProcessNotFoundException - if the process with the given UUID does not exist

getLastPackage

PackageDefinition getLastPackage(java.lang.String packageId)
                                 throws PackageNotFoundException
Returns the last deployed package for the specified package id.
Version of the package has been changed at each package deployment.

Specified by:
getLastPackage in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
packageId - the package id as specified in the XPDL file.
Returns:
the last deployed package for the specified package id.
Throws:
PackageNotFoundException - if the package with the given id does not exist

getLastProcess

ProcessDefinition getLastProcess(java.lang.String processId)
                                 throws ProcessNotFoundException
Return the last deployed process for the specified process id.

Specified by:
getLastProcess in interface org.ow2.bonita.facade.remote.RemoteQueryDefinitionAPI
Parameters:
processId - the process id as specified in the XPDL file.
Returns:
the last deployed process for the specified process id.
Throws:
ProcessNotFoundException - if the process with the given id does not exist