private boolean isTaskHasNoOwner() { return task.getAssignee() == null || task.getAssignee().isEmpty(); }
private boolean isUserAssignedToTask() { return user.getLogin().equals(task.getAssignee()); }
protected boolean hasUserPriviledgesToViewTask() { // default permission checking if (task.getPotentialOwners().contains(user.getLogin())) return true; if(StringUtils.isEmpty(task.getAssignee())) { for (String queueName : userQueues) if (task.getQueues().contains(queueName)) return true; } else if(task.getAssignee().equals(user.getLogin())) return true; return hasUserRightsToTask(); }
protected boolean isSubstitutingUser() { return ctx.getUserSubstitutionDAO().isSubstitutedBy(task.getAssignee(), user.getLogin()); }
@Override protected void auditLog(Collection<HandlingResult> results) { ProcessInstance process = getProvider().getProcessInstance(); if (process != null && !results.isEmpty()) { String json = null; try { json = mapper.writeValueAsString(results); } catch (Exception e) { logger.log(Level.SEVERE, e.getMessage(), e); } ProcessInstanceLog log = new ProcessInstanceLog(); log.setState(null); log.setEntryDate(new Date()); log.setEventI18NKey("process.log.process-change"); // todo if (getProvider() instanceof BpmTask) log.setUserLogin(((BpmTask) getProvider()).getAssignee()); log.setLogType(ProcessInstanceLog.LOG_TYPE_PROCESS_CHANGE); log.setOwnProcessInstance(process); log.setLogValue(json); process.getRootProcessInstance().addProcessLog(log); } } }
TaskUtil.saveComment(task, context.getUser(), getUserSource(), comment); List<BpmTask> newTasks = getBpmSession(context, task.getAssignee()).performAction(actionName, task, false);
public BpmTask(BpmTask task) { this.assignee = task.getAssignee(); this.owner = task.getOwner(); this.taskName = task.getTaskName(); this.internalTaskId = task.getInternalTaskId(); this.executionId = task.getExecutionId(); this.createDate = task.getCreateDate(); this.finishDate = task.getFinishDate(); this.processInstance = task.getProcessInstance(); this.isFinished = task.isFinished(); }
private void processTaskAssigne(BpmTask bpmTask) String assignee = bpmTask.getAssignee(); Long processId = bpmTask.getProcessInstance().getId(); String taskIdString = bpmTask.getInternalTaskId();
String taskOwner = task.getAssignee();