use of org.jbpm.casemgmt.impl.command.ModifyRoleAssignmentCommand in project jbpm by kiegroup.
the class CaseServiceImpl method assignToCaseRole.
/*
* Case role assignment methods
*/
@Override
public void assignToCaseRole(String caseId, String role, OrganizationalEntity entity) throws CaseNotFoundException {
authorizationManager.checkOperationAuthorization(caseId, ProtectedOperation.MODIFY_ROLE_ASSIGNMENT);
ProcessInstanceDesc pi = verifyCaseIdExists(caseId);
processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(pi.getId()), new ModifyRoleAssignmentCommand(identityProvider, role, entity, true));
}
use of org.jbpm.casemgmt.impl.command.ModifyRoleAssignmentCommand in project jbpm by kiegroup.
the class CaseServiceImpl method removeFromCaseRole.
@Override
public void removeFromCaseRole(String caseId, String role, OrganizationalEntity entity) throws CaseNotFoundException {
authorizationManager.checkOperationAuthorization(caseId, ProtectedOperation.MODIFY_ROLE_ASSIGNMENT);
ProcessInstanceDesc pi = verifyCaseIdExists(caseId);
processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(pi.getId()), new ModifyRoleAssignmentCommand(identityProvider, role, entity, false));
}
Aggregations