
org.ow2.bonita.facade.QueryDefinitionAPI Maven / Gradle / Ivy
/**
* Copyright (C) 2006 Bull S. A. S.
* Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
* This library is free software; you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Foundation
* version 2.1 of the License.
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License along with this
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
**/
package org.ow2.bonita.facade;
import java.util.Set;
import org.ow2.bonita.facade.def.majorElement.ActivityDefinition;
import org.ow2.bonita.facade.def.majorElement.DataFieldDefinition;
import org.ow2.bonita.facade.def.majorElement.PackageDefinition;
import org.ow2.bonita.facade.def.majorElement.ParticipantDefinition;
import org.ow2.bonita.facade.def.majorElement.ProcessDefinition;
import org.ow2.bonita.facade.exception.ActivityDefNotFoundException;
import org.ow2.bonita.facade.exception.ActivityNotFoundException;
import org.ow2.bonita.facade.exception.DataFieldNotFoundException;
import org.ow2.bonita.facade.exception.PackageNotFoundException;
import org.ow2.bonita.facade.exception.ParticipantNotFoundException;
import org.ow2.bonita.facade.exception.ProcessNotFoundException;
import org.ow2.bonita.facade.uuid.ActivityDefinitionUUID;
import org.ow2.bonita.facade.uuid.PackageDefinitionUUID;
import org.ow2.bonita.facade.uuid.ParticipantDefinitionUUID;
import org.ow2.bonita.facade.uuid.ProcessDefinitionUUID;
/**
* Getters on the workflow definition data for:
*
* - packages
* - processes
* - activities
* - participants
*
*
* As indicated by its prefix: Query, this interface could be seen as complementary to the
* {@link org.ow2.bonita.facade.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 org.ow2.bonita.definition.Hook
*/
public interface QueryDefinitionAPI {
//package
/**
* Returns the set of definition informations for all packages that have ever been deployed.
* @return a set of PackageDefinition in unspecified order.
* @throws BonitaInternalException if an exception occurs.
*/
Set getPackages();
/**
* Returns the set of definition informations on all versions of packages with the specified package Id
* that have ever been deployed.
* @param packageId the package Id (as specified in the XPDL file).
* @return a set of PackageDefinition in unspecified order with specified packageId.
* @throws BonitaInternalException if an exception occurs.
*/
Set getPackages(String packageId);
/**
* Returns the package definition for the specified packageDefintion UUID.
* @param packageDefinitionUUID the package processDefinitionUUID.
* @return a packageDefinition interface for the specified packageDefintion UUID.
* @throws PackageNotFoundException if package does not exist
* @throws BonitaInternalException if an exception occurs.
*/
PackageDefinition getPackage(PackageDefinitionUUID packageDefinitionUUID) throws PackageNotFoundException;
/**
* Returns the package definition for the specified package id and package version.
* @param processId the package id.
* @param version the package version
* @return the package definition for the specified package id and package version.
* @throws ProcessNotFoundException if the package does not exist
* @throws BonitaInternalException if an exception occurs.
*/
PackageDefinition getPackage(String packageId, String version) throws PackageNotFoundException;
/**
* Returns the set of definition informations for all packages having the given state.
* @param state the state of the package.
* @return the (unordered) set of PackageDefinition for all packages having the given state.
* @throws BonitaInternalException if an exception occurs.
*/
Set getPackages(PackageDefinition.PackageState state);
/**
* Returns the set of definition informations for packages with the given state
* and the given package Id.
* @param state the state of the package.
* @param packageId the package Id.
* @return a set of PackageDefinition for packages with the given state
* and the given package Id.
* @throws PackageNotFoundException if package does not exist.
* @throws BonitaInternalException if an exception occurs.
*/
Set getPackages(String packageId, PackageDefinition.PackageState state)
throws PackageNotFoundException;
/**
* Returns the set of definition information of all processes
* within the specified deployed package.
* @param packageDefinitionUUID the packageDefinition UUID.
* @return set of ProcessDefinition of all the processes within the specified deployed package.
* @throws PackageNotFoundException if package does not exist.
* @throws BonitaInternalException if an exception occurs.
*/
Set getPackageProcesses(PackageDefinitionUUID packageDefinitionUUID) throws PackageNotFoundException;
/**
* Returns the process definition for the specified packageDefinition UUID and process Id.
* @param packageDefinitionUUID the UUID of the {@link PackageDefinition packageDefinition}
* @param processId the process Id.
* @return the process definition for the specified packageDefinition UUID and process Id.
* @throws PackageNotFoundException if package does not exist
* @throws ProcessNotFoundException if process with id processId does not exist in package
* @throws BonitaInternalException if an exception occurs.
*/
ProcessDefinition getPackageProcess(PackageDefinitionUUID packageDefinitionUUID, String processId)
throws PackageNotFoundException, ProcessNotFoundException;
//package participants
// Set getPackageParticipants(AbstractUUID.PackageDefinitionUUID packageDefinitionUUID);
// ParticipantDefinition getPackageParticipant(AbstractUUID.PackageDefinitionUUID packageDefinitionUUID, String participantUUID);
//package applications
// Set getPackageApplications(AbstractUUID.PackageDefinitionUUID packageDefinitionUUID);
// ApplicationDefinition getPackageApplication(AbstractUUID.PackageDefinitionUUID packageDefinitionUUID, String applicationId);
//package dataFields
// Set getPackageDataFields(AbstractUUID.PackageDefinitionUUID packageDefinitionUUID);
// DataFieldDefinition getPackageDataField(AbstractUUID.PackageDefinitionUUID packageDefinitionUUID, String dataFieldId);
//process
/**
* Returns the set of definition information of all deployed processes.
* @return set of ProcessDefinition of all deployed processes.
* @throws BonitaInternalException if an exception occurs.
*/
Set getProcesses();
/**
* 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.
* @return set of ProcessDefinition of the specified process processId.
* @throws BonitaInternalException if an exception occurs.
*/
Set getPackageProcesses(String packageId, String processId);
/**
* Returns the set of definition informations for the process with the specified process id as specified in xpdl files.
* 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 in different packages.
* @return set of ProcessDefinition of the specified process processId.
* @throws BonitaInternalException if an exception occurs.
*/
Set getProcesses(String processId);
/**
* Returns the process definition for the specified processDefinition UUID.
* @param processDefinitionUUID the process UUID.
* @return the ProcessDefinition interface for the specified processDefinition UUID.
* @throws ProcessNotFoundException if the process with the given UUID does not exist.
* @throws BonitaInternalException if an exception occurs.
*/
ProcessDefinition getProcess(ProcessDefinitionUUID processDefinitionUUID) throws ProcessNotFoundException;
/**
* Returns the set of the process definition for the specified processId and process version.
* @param processId the process id.
* @param processVersion the process version.
* @return the set of process definition for the specified processId and process version.
* @throws BonitaInternalException if an exception occurs.
*/
Set getProcesses(String processId, String processVersion);
/**
* Return the process definition for the specified packageId, processId and process version.
* @param packageId the packageId.
* @param processId the processId.
* @param processVersion the process version.
* @return the process definition for the specified packageId, processId and process version.
* @throws ProcessNotFoundException if the process with the given parameters does not exist.
* @throws BonitaInternalException if an exception occurs.
*/
ProcessDefinition getProcess(String packageId, String processId, String processVersion) throws ProcessNotFoundException;
/**
* Returns the set of definition informations for the processes with the specified process state.
* @param processState the {@link org.ow2.bonita.facade.def.majorElement.ProcessDefinition.ProcessState state} of the process.
* @return the set of ProcessDefinition for the processes with the specified process state.
* @throws BonitaInternalException if an exception occurs.
*/
Set getProcesses(ProcessDefinition.ProcessState processState);
/**
* Returns the set of definition informations for the processes with the specified processId and process state.
* @param processId the Id of the process.
* @param processState the {@link org.ow2.bonita.facade.def.majorElement.ProcessDefinition.ProcessState state} of the process.
* @return the set of ProcessDefinition for the processes with the specified processId and process state.
* @throws BonitaInternalException if an exception occurs.
*/
Set getProcesses(String processId, ProcessDefinition.ProcessState processState);
//process dataFields
/**
* Returns the set of dataField definitions defined within the given processDefinition UUID.
* @param processDefinitionUUID the processDefinition UUID.
* @return the set of DataFieldDefinition for the specified processDefinition UUID.
* @throws ProcessNotFoundException if no process exists with the given processDefinition UUID.
* @throws BonitaInternalException if an exception occurs.
*/
Set getProcessDataFields(ProcessDefinitionUUID processDefinitionUUID) throws ProcessNotFoundException;
/**
* Returns the DataField definition defined within the specified processDefinition UUID
* for the given dataField Id
* @param processDefinitionUUID the processDefinition UUID.
* @param dataFieldId the dataField id as specified in the XPDL file.
* @return the DataFieldDefinition for the specified processDefinition UUID and dataField Id.
* @throws ProcessNotFoundException if the process with the given processDefinition UUID does not exist.
* @throws DataFieldNotFoundException if the dataField does not exist in process.
* @throws BonitaInternalException if an exception occurs.
*/
DataFieldDefinition getProcessDataField(ProcessDefinitionUUID processDefinitionUUID, String dataFieldId)
throws ProcessNotFoundException, DataFieldNotFoundException;
// DataFieldDefinition getDataField(DataFieldUUID dataFieldDefinitionUUID);
// //process participants
/**
* Returns the set of participant definitions for the specified processDefinition UUID.
* @param processDefinitionUUID the processDefinition UUID.
* @return the set of ParticipantDefinition for the specified processDefinition UUID.
* @throws ProcessNotFoundException if no process exists with the given processDefinition UUID.
* @throws BonitaInternalException if an exception occurs.
*/
Set getProcessParticipants(ProcessDefinitionUUID processDefinitionUUID)
throws ProcessNotFoundException;
/**
* Returns the participant definition for the specified processDefinition UUID and participant Id.
* @param processDefinitionUUID the processDefinition UUID.
* @param participantId the participant id as specified in the XPDL file.
* @return the ParticipantDefinition for the specified processDefinition UUID and participant participantId.
* @throws ProcessNotFoundException if the process with the given processDefinition UUID does not exist.
* @throws ParticipantNotFoundException if the participant does not exist in process.
* @throws BonitaInternalException if an exception occurs.
*/
ParticipantDefinition getProcessParticipant(ProcessDefinitionUUID processDefinitionUUID, String participantId)
throws ProcessNotFoundException, ParticipantNotFoundException;
//process activities
/**
* Returns the set of definitions for process activities of the specified processDefinition UUID.
* @param processDefinitionUUID the process UUID.
* @return the set of ActivityDefinition for the specified processDefinition UUID.
* @throws ProcessNotFoundException if the process with the given processDefinition UUID does not exist.
* @throws BonitaInternalException if an exception occurs.
*/
Set getProcessActivities(ProcessDefinitionUUID processDefinitionUUID)
throws ProcessNotFoundException;
/**
* Returns the definition for process activity of the specified process and activity Id.
* @param processDefinitionUUID the process UUID.
* @param activityId the activity id as specified in the XPDL file.
* @return 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.
* @throws ActivityNotFoundException if the activity with the given id does not exist in the process.
* @throws BonitaInternalException if an exception occurs.
*/
ActivityDefinition getProcessActivity(ProcessDefinitionUUID processDefinitionUUID, String activityId)
throws ProcessNotFoundException, ActivityNotFoundException;
//process transitions
// Set getProcessTransitions(AbstractUUID.ProcessDefinitionUUID processDefinitionUUID);
// TransitionDefinition getProcessTransition(AbstractUUID.ProcessDefinitionUUID processDefinitionUUID, String transitionId);
// TransitionDefinition getTransition(AbstractUUID.TransitionDefinitionUUID transitionDefinitionUUID);
// //process activitySets
// Set getProcessActivitySetIds(AbstractUUID.ProcessDefinitionUUID processDefinitionUUID);
// Set getActivitySetActivities(AbstractUUID.ActivitySetDefinitionUUID activitySetDefinitionUUID);
// Set getActivitySetTransitions(AbstractUUID.ActivitySetDefinitionUUID activitySetDefinitionUUID);
// //process applications
// Set getProcessApplications(AbstractUUID.ProcessDefinitionUUID processDefinitionUUID);
// ApplicationDefinition getProcessApplication(AbstractUUID.ProcessDefinitionUUID processDefinitionUUID, String applicationId);
// ApplicationDefinition getApplication(AbstractUUID.ApplicationDefinitionUUID applicationDefinitionUUID);
//hooks
// Set getActivityHooks(AbstractUUID.ActivityDefinitionUUID uuid);
//
// //roleMappers
// RoleMapperDefinition getActivityRoleMapper(AbstractUUID.ActivityDefinitionUUID uuid);
//
// //performerAssign
// PerformerAssignDefinition getPerformerAssign(AbstractUUID.ActivityDefinitionUUID uuid);
/**
* Returns the DataField definition that has been defined as local to the given activity.
* for the given activityDefinition UUID and dataField Id.
* @param activityDefinitionUUID the ActivityDefinition UUID.
* @param dataFieldId the dataField id as specified in the XPDL file.
* @return the DataFieldDefinition for the specified activityDefinition UUID and dataField Id.
* @throws ActivityNotFoundException if the activity with the given activityDefinition UUID does not exist.
* @throws DataFieldNotFoundException if the dataField does not exist within the activity.
* @throws BonitaInternalException if an exception occurs.
*/
DataFieldDefinition getActivityDataField(ActivityDefinitionUUID activityDefinitionUUID, String dataFieldId)
throws ActivityDefNotFoundException, DataFieldNotFoundException;
//activity dataFields
/**
* Returns the set of dataField definitions that have been defined as local to the given activity
* for the given activityDefinition UUID.
* @param activityDefinitionUUID the activityDefinition UUID.
* @return the set of DataFieldDefinition for the specified activityDefinition UUID.
* @throws ActivityDefNotFoundException if no activity exists with the given activityDefinition UUID.
* @throws BonitaInternalException if an exception occurs.
*/
Set getActivityDataFields(ActivityDefinitionUUID activityDefinitionUUID)
throws ActivityDefNotFoundException;
//name versus uuid
/**
* Returns the activity Id for the specified processDefinition 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).
* @param processDefinitionUUID the process UUID.
* @param activityName the activity name as specified in the XPDL file
* (value of Name attribute within the Activity element).
* @return the activity UUID for the specified process UUID and activity name.
* @throws ProcessNotFoundException if the process with the given UUID does not exist.
* @throws BonitaInternalException if an exception occurs.
*/
ActivityDefinitionUUID getProcessActivityId(ProcessDefinitionUUID processDefinitionUUID,
String activityName) throws ProcessNotFoundException;
// AbstractUUID getPackageApplicationId(AbstractUUID.PackageDefinitionUUID packageDefinitionUUID, String applicationName);
// AbstractUUID getProcessApplicationId(AbstractUUID.ProcessDefinitionUUID processDefinitionUUID, String applicationName);
//
// AbstractUUID getPackageDatafieldId(AbstractUUID.PackageDefinitionUUID packageDefinitionUUID, String datafieldName);
// AbstractUUID getProcessDatafieldId(AbstractUUID.ProcessDefinitionUUID processDefinitionUUID, String datafieldName);
// AbstractUUID getPackageParticipantId(AbstractUUID.PackageDefinitionUUID packageDefinitionUUID, String participantName);
/**
* Returns the participantDefinition UUID for the specified processDefinition UUID and participant name.
* @param processDefinitionUUID the processDefinition UUID.
* @param participantName the participant name as specified in the XPDL file.
* @return the participantDefinition UUID for the specified processDefinition UUID and participant name.
* @throws ProcessNotFoundException if the process with the given UUID does not exist
* @throws BonitaInternalException if an exception occurs.
*/
ParticipantDefinitionUUID getProcessParticipantId(ProcessDefinitionUUID processDefinitionUUID,
String participantName) throws ProcessNotFoundException;
// AbstractUUID getProcessTransitionId(AbstractUUID.ProcessDefinitionUUID processDefinitionUUID, String transitionName);
/**
* Returns the last deployed package for the specified package id.
* Version of the package has been changed at each package deployment.
* @param packageId the package id as specified in the XPDL file.
* @return the last deployed package for the specified package id.
* @throws PackageNotFoundException if the package with the given id does not exist
* @throws BonitaInternalException if an exception occurs.
*/
PackageDefinition getLastPackage(String packageId) throws PackageNotFoundException;
/**
* Return process definition of the last deployed process for the specified package id and process id.
* @param packageId the package id as specified in the XPDL file.
* @param processId the process id as specified in the XPDL file.
* @return the process definition of the last deployed process for the specified package id and process id.
* @throws ProcessNotFoundException if the process with the given package id and process id does not exist.
* @throws BonitaInternalException if an exception occurs.
*/
ProcessDefinition getLastProcess(String packageId, String processId) throws ProcessNotFoundException;
//Set getPackages(String packageUUID, Date minDate, Date maxDate);
//Set getProcesses(String processId, Date minDate, Date maxDate);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy