DeploymentImpl deployment = (DeploymentImpl) repositorySession.getDeployment(deploymentId);
if (deployment==null) {
throw new JbpmException("deployment "+deploymentId+" doesn't exist");
}
deployment.suspend();
// removing deployment from the cache
// next time it's used, it will be redeployed
// at that time, the suspended property will be propagated to the
// process definitions