org.activiti.engine.RepositoryService.deleteCandidateStarterUser()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.activiti.engine.RepositoryService.deleteCandidateStarterUser方法的一些代码示例,展示了RepositoryService.deleteCandidateStarterUser的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RepositoryService.deleteCandidateStarterUser方法的具体详情如下:
包路径:org.activiti.engine.RepositoryService
类名称:RepositoryService
方法名:deleteCandidateStarterUser

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);
  }
}

相关文章

微信公众号

最新文章

更多