Search in sources :

Example 1 with TbSysBpmnResourceRole

use of com.netsteadfast.greenstep.po.hbm.TbSysBpmnResourceRole in project bamboobsc by billchen198318.

the class BusinessProcessManagementUtils method isRoleAllowApproval.

public static boolean isRoleAllowApproval(String resourceId, String roleId, String taskName) throws ServiceException, Exception {
    if (StringUtils.isBlank(resourceId) || StringUtils.isBlank(roleId) || StringUtils.isBlank(taskName)) {
        throw new Exception(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
    }
    TbSysBpmnResourceRole resourceRole = new TbSysBpmnResourceRole();
    resourceRole.setId(resourceId);
    resourceRole.setRole(roleId);
    resourceRole.setTaskName(taskName);
    if (sysBpmnResourceRoleService.countByEntityUK(resourceRole) > 0) {
        return true;
    }
    return false;
}
Also used : TbSysBpmnResourceRole(com.netsteadfast.greenstep.po.hbm.TbSysBpmnResourceRole) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException)

Aggregations

ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)1 TbSysBpmnResourceRole (com.netsteadfast.greenstep.po.hbm.TbSysBpmnResourceRole)1