org.camunda.bpm.engine
Interface RepositoryService

All Known Implementing Classes:
RepositoryServiceImpl

public interface RepositoryService

Service providing access to the repository of process definitions and deployments.

Author:
Tom Baeyens, Falko Menge, Tijs Rademakers, Joram Barrez

Method Summary
 void activateProcessDefinitionById(String processDefinitionId)
          Activates the process definition with the given id.
 void activateProcessDefinitionById(String processDefinitionId, boolean activateProcessInstances, Date activationDate)
          Activates the process definition with the given id.
 void activateProcessDefinitionByKey(String processDefinitionKey)
          Activates the process definition with the given key (=id in the bpmn20.xml file).
 void activateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate)
          Activates the process definition with the given key (=id in the bpmn20.xml file).
 void addCandidateStarterGroup(String processDefinitionId, String groupId)
          Authorizes a candidate group for a process definition.
 void addCandidateStarterUser(String processDefinitionId, String userId)
          Authorizes a candidate user for a process definition.
 CaseDefinitionQuery createCaseDefinitionQuery()
          Query case definitions.
 DeploymentBuilder createDeployment()
          Starts creating a new deployment
 ProcessApplicationDeploymentBuilder createDeployment(ProcessApplicationReference processApplication)
          Starts creating a new ProcessApplicationDeployment.
 DeploymentQuery createDeploymentQuery()
          Query process definitions.
 ProcessDefinitionQuery createProcessDefinitionQuery()
          Query process definitions.
 void deleteCandidateStarterGroup(String processDefinitionId, String groupId)
          Removes the authorization of a candidate group for a process definition.
 void deleteCandidateStarterUser(String processDefinitionId, String userId)
          Removes the authorization of a candidate user for a process definition.
 void deleteDeployment(String deploymentId)
          Deletes the given deployment.
 void deleteDeployment(String deploymentId, boolean cascade)
          Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.
 void deleteDeploymentCascade(String deploymentId)
          Deprecated. use deleteDeployment(String, boolean). This methods may be deleted from 5.3.
 org.camunda.bpm.model.bpmn.BpmnModelInstance getBpmnModelInstance(String processDefinitionId)
          Returns the BpmnModelInstance for the given processDefinitionId.
 CaseDefinition getCaseDefinition(String caseDefinitionId)
          Returns the CaseDefinition.
 InputStream getCaseModel(String caseDefinitionId)
          Gives access to a deployed case model, e.g., a CMMN 1.0 XML file, through a stream of bytes.
 List<String> getDeploymentResourceNames(String deploymentId)
          Retrieves a list of deployment resource names for the given deployment, ordered alphabetically.
 List<Resource> getDeploymentResources(String deploymentId)
          Retrieves a list of deployment resources for the given deployment, ordered alphabetically by name.
 List<IdentityLink> getIdentityLinksForProcessDefinition(String processDefinitionId)
          Retrieves the IdentityLinks associated with the given process definition.
 ProcessDefinition getProcessDefinition(String processDefinitionId)
          Returns the ProcessDefinition including all BPMN information like additional Properties (e.g.
 InputStream getProcessDiagram(String processDefinitionId)
          Gives access to a deployed process diagram, e.g., a PNG image, through a stream of bytes.
 DiagramLayout getProcessDiagramLayout(String processDefinitionId)
          Provides positions and dimensions of elements in a process diagram as provided by getProcessDiagram(String).
 InputStream getProcessModel(String processDefinitionId)
          Gives access to a deployed process model, e.g., a BPMN 2.0 XML file, through a stream of bytes.
 InputStream getResourceAsStream(String deploymentId, String resourceName)
          Gives access to a deployment resource through a stream of bytes.
 InputStream getResourceAsStreamById(String deploymentId, String resourceId)
          Gives access to a deployment resource through a stream of bytes.
 void suspendProcessDefinitionById(String processDefinitionId)
          Suspends the process definition with the given id.
 void suspendProcessDefinitionById(String processDefinitionId, boolean suspendProcessInstances, Date suspensionDate)
          Suspends the process definition with the given id.
 void suspendProcessDefinitionByKey(String processDefinitionKey)
          Suspends the all process definitions with the given key (= id in the bpmn20.xml file).
 void suspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate)
          Suspends the all process definitions with the given key (= id in the bpmn20.xml file).
 

Method Detail

createDeployment

DeploymentBuilder createDeployment()
Starts creating a new deployment


createDeployment

ProcessApplicationDeploymentBuilder createDeployment(ProcessApplicationReference processApplication)
Starts creating a new ProcessApplicationDeployment.

See Also:
ProcessApplicationDeploymentBuilder

deleteDeployment

void deleteDeployment(String deploymentId)
Deletes the given deployment.

Parameters:
deploymentId - id of the deployment, cannot be null.

deleteDeploymentCascade

void deleteDeploymentCascade(String deploymentId)
Deprecated. use deleteDeployment(String, boolean). This methods may be deleted from 5.3.

Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.

Parameters:
deploymentId - id of the deployment, cannot be null.

deleteDeployment

void deleteDeployment(String deploymentId,
                      boolean cascade)
Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.

Parameters:
deploymentId - id of the deployment, cannot be null.

getDeploymentResourceNames

List<String> getDeploymentResourceNames(String deploymentId)
Retrieves a list of deployment resource names for the given deployment, ordered alphabetically.

Parameters:
deploymentId - id of the deployment, cannot be null.

getDeploymentResources

List<Resource> getDeploymentResources(String deploymentId)
Retrieves a list of deployment resources for the given deployment, ordered alphabetically by name.

Parameters:
deploymentId - id of the deployment, cannot be null.

getResourceAsStream

InputStream getResourceAsStream(String deploymentId,
                                String resourceName)
Gives access to a deployment resource through a stream of bytes.

Parameters:
deploymentId - id of the deployment, cannot be null.
resourceName - name of the resource, cannot be null.
Throws:
ProcessEngineException - when the resource doesn't exist in the given deployment or when no deployment exists for the given deploymentId.

getResourceAsStreamById

InputStream getResourceAsStreamById(String deploymentId,
                                    String resourceId)
Gives access to a deployment resource through a stream of bytes.

Parameters:
deploymentId - id of the deployment, cannot be null.
resourceId - id of the resource, cannot be null.
Throws:
ProcessEngineException - when the resource doesn't exist in the given deployment or when no deployment exists for the given deploymentId.

createProcessDefinitionQuery

ProcessDefinitionQuery createProcessDefinitionQuery()
Query process definitions.


createCaseDefinitionQuery

CaseDefinitionQuery createCaseDefinitionQuery()
Query case definitions.


createDeploymentQuery

DeploymentQuery createDeploymentQuery()
Query process definitions.


suspendProcessDefinitionById

void suspendProcessDefinitionById(String processDefinitionId)
Suspends the process definition with the given id. If a process definition is in state suspended, it will not be possible to start new process instances based on the process definition. Note: all the process instances of the process definition will still be active (ie. not suspended)!

Throws:
ProcessEngineException - if no such processDefinition can be found.

suspendProcessDefinitionById

void suspendProcessDefinitionById(String processDefinitionId,
                                  boolean suspendProcessInstances,
                                  Date suspensionDate)
Suspends the process definition with the given id. If a process definition is in state suspended, it will not be possible to start new process instances based on the process definition.

Parameters:
suspendProcessInstances - If true, all the process instances of the provided process definition will be suspended too.
suspensionDate - The date on which the process definition will be suspended. If null, the process definition is suspended immediately. Note: The job executor needs to be active to use this!
Throws:
ProcessEngineException - if no such processDefinition can be found.
See Also:
RuntimeService.suspendProcessInstanceById(String)

suspendProcessDefinitionByKey

void suspendProcessDefinitionByKey(String processDefinitionKey)
Suspends the all process definitions with the given key (= id in the bpmn20.xml file). If a process definition is in state suspended, it will not be possible to start new process instances based on the process definition. Note: all the process instances of the process definition will still be active (ie. not suspended)!

Throws:
ProcessEngineException - if no such processDefinition can be found.

suspendProcessDefinitionByKey

void suspendProcessDefinitionByKey(String processDefinitionKey,
                                   boolean suspendProcessInstances,
                                   Date suspensionDate)
Suspends the all process definitions with the given key (= id in the bpmn20.xml file). If a process definition is in state suspended, it will not be possible to start new process instances based on the process definition.

Parameters:
suspendProcessInstances - If true, all the process instances of the provided process definition will be suspended too.
suspensionDate - The date on which the process definition will be suspended. If null, the process definition is suspended immediately. Note: The job executor needs to be active to use this!
Throws:
ProcessEngineException - if no such processDefinition can be found.
See Also:
RuntimeService.suspendProcessInstanceById(String)

activateProcessDefinitionById

void activateProcessDefinitionById(String processDefinitionId)
Activates the process definition with the given id.

Throws:
ProcessEngineException - if no such processDefinition can be found or if the process definition is already in state active.

activateProcessDefinitionById

void activateProcessDefinitionById(String processDefinitionId,
                                   boolean activateProcessInstances,
                                   Date activationDate)
Activates the process definition with the given id.

Parameters:
suspendProcessInstances - If true, all the process instances of the provided process definition will be activated too.
activationDate - The date on which the process definition will be activated. If null, the process definition is suspended immediately. Note: The job executor needs to be active to use this!
Throws:
ProcessEngineException - if no such processDefinition can be found.
See Also:
RuntimeService.activateProcessInstanceById(String)

activateProcessDefinitionByKey

void activateProcessDefinitionByKey(String processDefinitionKey)
Activates the process definition with the given key (=id in the bpmn20.xml file).

Throws:
ProcessEngineException - if no such processDefinition can be found.

activateProcessDefinitionByKey

void activateProcessDefinitionByKey(String processDefinitionKey,
                                    boolean activateProcessInstances,
                                    Date activationDate)
Activates the process definition with the given key (=id in the bpmn20.xml file).

Parameters:
suspendProcessInstances - If true, all the process instances of the provided process definition will be activated too.
activationDate - The date on which the process definition will be activated. If null, the process definition is suspended immediately. Note: The job executor needs to be active to use this!
Throws:
ProcessEngineException - if no such processDefinition can be found.
See Also:
RuntimeService.activateProcessInstanceById(String)

getProcessModel

InputStream getProcessModel(String processDefinitionId)
Gives access to a deployed process model, e.g., a BPMN 2.0 XML file, through a stream of bytes.

Parameters:
processDefinitionId - id of a ProcessDefinition, cannot be null.
Throws:
ProcessEngineException - when the process model doesn't exist.

getProcessDiagram

InputStream getProcessDiagram(String processDefinitionId)
Gives access to a deployed process diagram, e.g., a PNG image, through a stream of bytes.

Parameters:
processDefinitionId - id of a ProcessDefinition, cannot be null.
Returns:
null when the diagram resource name of a ProcessDefinition is null.
Throws:
ProcessEngineException - when the process diagram doesn't exist.

getProcessDefinition

ProcessDefinition getProcessDefinition(String processDefinitionId)
Returns the ProcessDefinition including all BPMN information like additional Properties (e.g. documentation).


getProcessDiagramLayout

DiagramLayout getProcessDiagramLayout(String processDefinitionId)
Provides positions and dimensions of elements in a process diagram as provided by getProcessDiagram(String). This method requires a process model and a diagram image to be deployed.

Parameters:
processDefinitionId - id of a ProcessDefinition, cannot be null.
Returns:
Map with process element ids as keys and positions and dimensions as values.
Throws:
ProcessEngineException - when the process model or diagram doesn't exist.

getBpmnModelInstance

org.camunda.bpm.model.bpmn.BpmnModelInstance getBpmnModelInstance(String processDefinitionId)
Returns the BpmnModelInstance for the given processDefinitionId.

Parameters:
processDefinitionId - the id of the Process Definition for which the BpmnModelInstance should be retrieved.
Returns:
the BpmnModelInstance

addCandidateStarterUser

void addCandidateStarterUser(String processDefinitionId,
                             String userId)
Authorizes a candidate user for a process definition.

Parameters:
processDefinitionId - id of the process definition, cannot be null.
userId - id of the user involve, cannot be null.
Throws:
ProcessEngineException - when the process definition or user doesn't exist.

addCandidateStarterGroup

void addCandidateStarterGroup(String processDefinitionId,
                              String groupId)
Authorizes a candidate group for a process definition.

Parameters:
processDefinitionId - id of the process definition, cannot be null.
groupId - id of the group involve, cannot be null.
Throws:
ProcessEngineException - when the process definition or group doesn't exist.

deleteCandidateStarterUser

void deleteCandidateStarterUser(String processDefinitionId,
                                String userId)
Removes the authorization of a candidate user for a process definition.

Parameters:
processDefinitionId - id of the process definition, cannot be null.
userId - id of the user involve, cannot be null.
Throws:
ProcessEngineException - when the process definition or user doesn't exist.

deleteCandidateStarterGroup

void deleteCandidateStarterGroup(String processDefinitionId,
                                 String groupId)
Removes the authorization of a candidate group for a process definition.

Parameters:
processDefinitionId - id of the process definition, cannot be null.
groupId - id of the group involve, cannot be null.
Throws:
ProcessEngineException - when the process definition or group doesn't exist.

getIdentityLinksForProcessDefinition

List<IdentityLink> getIdentityLinksForProcessDefinition(String processDefinitionId)
Retrieves the IdentityLinks associated with the given process definition. Such an IdentityLink informs how a certain identity (eg. group or user) is authorized for a certain process definition


getCaseDefinition

CaseDefinition getCaseDefinition(String caseDefinitionId)
Returns the CaseDefinition.


getCaseModel

InputStream getCaseModel(String caseDefinitionId)
Gives access to a deployed case model, e.g., a CMMN 1.0 XML file, through a stream of bytes.

Parameters:
caseDefinitionId - id of a CaseDefinition, cannot be null.
Throws:
ProcessEngineException - when the case model doesn't exist.


Copyright © 2014 camunda services GmbH. All Rights Reserved.