Al Nadein [
http://community.jboss.org/people/matrixpooh] replied to the discussion
"How to start/spawn 'n' subprocesses for 'n' users using
JBPM-4.3."
To view the discussion, visit:
http://community.jboss.org/message/553956#553956
--------------------------------------------------------------
After even more investigation :)
RepositoryService::*deleteDeploymentCascade*() doesn't seem to cascade down to process
instances any longer.
This, however, works:
List<ProcessDefinition> deployments =
repositoryService.createProcessDefinitionQuery().processDefinitionKey(key).list();
for (int i = 0; i < deployments.size(); i++) {
ProcessDefinition pd = deployments.get(i);
List<ProcessInstance> processes =
executionService.createProcessInstanceQuery().processDefinitionId(pd.getDeploymentId()).list();
for (int j = 0; j < processes.size(); j++) {
ProcessInstance processInstance = processes.get(i);
executionService.deleteProcessInstanceCascade(processInstance.getId());
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/553956#553956]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]