org.jbpm.api
Interface RepositoryService


public interface RepositoryService

exposes the repository of deployments.

Deployments contain a set of named resources. Those resources can represent process definitions, forms, images and so on.

The repository contains and manages the process definitions.

Author:
Tom Baeyens

Method Summary
 NewDeployment createDeployment()
          create a new deployment.
 DeploymentQuery createDeploymentQuery()
          create a query for deployments
 ProcessDefinitionQuery createProcessDefinitionQuery()
          create a query for process definitions
 void deleteDeployment(java.lang.String deploymentId)
          deletes a deployment if the process definitions don't have running executions.
 void deleteDeploymentCascade(java.lang.String deploymentId)
          deletes deployment, contained process definitions, related process instances and their history information
 ActivityCoordinates getActivityCoordinates(java.lang.String processDefinitionId, java.lang.String activityName)
          the coordinates for the activity on the process image.
 java.io.InputStream getResourceAsStream(java.lang.String deploymentId, java.lang.String resourceName)
          obtain an InputStream to a resource in a deployment
 java.util.Set<java.lang.String> getResourceNames(java.lang.String deploymentId)
          Returns all the resources stored in the deployment with the given id.
 java.util.List<java.lang.String> getStartActivityNames(java.lang.String processDefinitionId)
          find all the activity names of the start activities for a given process definition.
 java.lang.String getStartFormResourceName(java.lang.String processDefinitionId, java.lang.String activityName)
          the resource name for the given start activity.
 void resumeDeployment(java.lang.String deploymentId)
          resume a suspended deployment.
 void suspendDeployment(java.lang.String deploymentId)
          similar to deleting a deployment.
 

Method Detail

createDeployment

NewDeployment createDeployment()
create a new deployment. The deployment will only be deployed into the repository after invoking the NewDeployment.deploy().


suspendDeployment

void suspendDeployment(java.lang.String deploymentId)
similar to deleting a deployment. The difference is that all the data remains in the database. So that the suspending can be undone with resumeDeployment(String).


resumeDeployment

void resumeDeployment(java.lang.String deploymentId)
resume a suspended deployment.


deleteDeployment

void deleteDeployment(java.lang.String deploymentId)
deletes a deployment if the process definitions don't have running executions. history information (if any) remains in the database.


deleteDeploymentCascade

void deleteDeploymentCascade(java.lang.String deploymentId)
deletes deployment, contained process definitions, related process instances and their history information


getResourceNames

java.util.Set<java.lang.String> getResourceNames(java.lang.String deploymentId)
Returns all the resources stored in the deployment with the given id.


getResourceAsStream

java.io.InputStream getResourceAsStream(java.lang.String deploymentId,
                                        java.lang.String resourceName)
obtain an InputStream to a resource in a deployment


createProcessDefinitionQuery

ProcessDefinitionQuery createProcessDefinitionQuery()
create a query for process definitions


createDeploymentQuery

DeploymentQuery createDeploymentQuery()
create a query for deployments


getStartActivityNames

java.util.List<java.lang.String> getStartActivityNames(java.lang.String processDefinitionId)
find all the activity names of the start activities for a given process definition. Only top level activities are scanned. Every activity that doesn't have incoming transitions is considered a start activity. For the moment, jPDL only supports one start activity. Start activity names can be null.


getStartFormResourceName

java.lang.String getStartFormResourceName(java.lang.String processDefinitionId,
                                          java.lang.String activityName)
the resource name for the given start activity. It is assumed that the ProcessDefinition is already retrieved. From the ProcessDefinition, the ProcessDefinition.getId() and the ProcessDefinition.getDeploymentId() can be retrieved. The activityName can be obtained via getStartActivityNames(String). An InputStream for the resource can be obtained with getResourceAsStream(String, String)


getActivityCoordinates

ActivityCoordinates getActivityCoordinates(java.lang.String processDefinitionId,
                                           java.lang.String activityName)
the coordinates for the activity on the process image.



Copyright © 2010 JBoss Community. All Rights Reserved.