
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.element.BusinessArchive;
import org.ow2.bonita.facade.def.majorElement.ActivityDefinition;
import org.ow2.bonita.facade.def.majorElement.DataFieldDefinition;
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.BonitaInternalException;
import org.ow2.bonita.facade.exception.DataFieldNotFoundException;
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.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 {
//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 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;
/**
* Return the process definition for the specified processId and process version.
* @param processId the processId.
* @param processVersion the process version.
* @return the process definition for the specified 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 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);
/**
* Returns the businessArchive used to deploy the corresponding process.
* @param processDefinitionUUID
* @return the businessArchive used to deploy the corresponding process.
* @throws ProcessNotFoundException
*/
BusinessArchive getBusinessArchive(ProcessDefinitionUUID processDefinitionUUID) throws ProcessNotFoundException;
//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;
/**
* 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;
/**
* 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;
/**
* Return process definition of the last deployed process for the specified package id and process id.
* @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 processId) throws ProcessNotFoundException;
/**
* Obtains the value of a process meta data. If no meta data matches with the key, null is returned.
* @param uuid the process definition UUID
* @param key the key of the meta data
* @return the value of the meta data
*/
String getProcessMetaData(ProcessDefinitionUUID uuid, String key) throws ProcessNotFoundException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy