Search in sources :

Example 1 with CancelCaseCommand

use of org.jbpm.casemgmt.impl.command.CancelCaseCommand in project jbpm by kiegroup.

the class CaseServiceImpl method destroyCase.

@Override
public void destroyCase(String caseId) throws CaseNotFoundException {
    authorizationManager.checkOperationAuthorization(caseId, ProtectedOperation.DESTROY_CASE);
    logger.debug("About to destroy permanently case {}", caseId);
    ProcessInstanceDesc pi = verifyCaseIdExisted(caseId);
    processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(pi.getId()), new CancelCaseCommand(identityProvider, caseId, processService, runtimeDataService, true));
}
Also used : ProcessInstanceDesc(org.jbpm.services.api.model.ProcessInstanceDesc) CancelCaseCommand(org.jbpm.casemgmt.impl.command.CancelCaseCommand)

Example 2 with CancelCaseCommand

use of org.jbpm.casemgmt.impl.command.CancelCaseCommand in project jbpm by kiegroup.

the class CaseServiceImpl method cancelCase.

@Override
public void cancelCase(String caseId) throws CaseNotFoundException {
    authorizationManager.checkOperationAuthorization(caseId, ProtectedOperation.CANCEL_CASE);
    logger.debug("About to abort case {}", caseId);
    ProcessInstanceDesc pi = verifyCaseIdExists(caseId);
    processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(pi.getId()), new CancelCaseCommand(identityProvider, caseId, processService, runtimeDataService, false));
}
Also used : ProcessInstanceDesc(org.jbpm.services.api.model.ProcessInstanceDesc) CancelCaseCommand(org.jbpm.casemgmt.impl.command.CancelCaseCommand)

Aggregations

CancelCaseCommand (org.jbpm.casemgmt.impl.command.CancelCaseCommand)2 ProcessInstanceDesc (org.jbpm.services.api.model.ProcessInstanceDesc)2