本文整理了Java中org.activiti.engine.RepositoryService.deleteCandidateStarterUser
方法的一些代码示例,展示了RepositoryService.deleteCandidateStarterUser
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RepositoryService.deleteCandidateStarterUser
方法的具体详情如下:
包路径:org.activiti.engine.RepositoryService
类名称:RepositoryService
方法名:deleteCandidateStarterUser
[英]Removes the authorization of a candidate user for a process definition.
[中]删除候选用户对流程定义的授权。
代码示例来源:origin: org.activiti/activiti-rest
@ApiOperation(value = "Delete a candidate starter from a process definition", tags = {"Process Definitions"})
@ApiResponses(value = {
@ApiResponse(code = 204, message = "Indicates the process definition was found and the identity link was removed. The response body is intentionally empty."),
@ApiResponse(code = 404, message = "Indicates the requested process definition was not found or the process definition doesn’t have an identity-link that matches the url.")
})
@RequestMapping(value = "/repository/process-definitions/{processDefinitionId}/identitylinks/{family}/{identityId}", method = RequestMethod.DELETE)
public void deleteIdentityLink(@ApiParam(name = "processDefinitionId", value="The id of the process definition.") @PathVariable("processDefinitionId") String processDefinitionId,@ApiParam(name = "family", value="Either users or groups, depending on the type of identity link.") @PathVariable("family") String family,@ApiParam(name = "identityId", value="Either the user or group of the identity to remove as candidate starter.") @PathVariable("identityId") String identityId,
HttpServletResponse response) {
ProcessDefinition processDefinition = getProcessDefinitionFromRequest(processDefinitionId);
validateIdentityLinkArguments(family, identityId);
// Check if identitylink to delete exists
IdentityLink link = getIdentityLink(family, identityId, processDefinition.getId());
if (link.getUserId() != null) {
repositoryService.deleteCandidateStarterUser(processDefinition.getId(), link.getUserId());
} else {
repositoryService.deleteCandidateStarterGroup(processDefinition.getId(), link.getGroupId());
}
response.setStatus(HttpStatus.NO_CONTENT.value());
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public void deleteCandidateStarter(String processDefinitionId, String userId, String groupId) {
try {
if (userId != null) {
getProcessEngine().getRepositoryService().deleteCandidateStarterUser(processDefinitionId, userId);
} else {
getProcessEngine().getRepositoryService().deleteCandidateStarterGroup(processDefinitionId, groupId);
}
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!