Java Code Examples for org.activiti.engine.impl.persistence.entity.TaskEntity#getTaskDefinitionKey()
The following examples show how to use
org.activiti.engine.impl.persistence.entity.TaskEntity#getTaskDefinitionKey() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ActivityPermissionAssignmentHandler.java From openwebflow with BSD 2-Clause "Simplified" License | 5 votes |
@Override public void handleAssignment(TaskAssignmentHandlerChain chain, Expression assigneeExpression, Expression ownerExpression, Set<Expression> candidateUserExpressions, Set<Expression> candidateGroupExpressions, TaskEntity task, ActivityExecution execution) { //设置assignment信息 String processDefinitionId = task.getProcessDefinitionId(); String taskDefinitionKey = task.getTaskDefinitionKey(); ActivityPermissionEntity entity; try { entity = _activityPermissionManager.load(processDefinitionId, taskDefinitionKey, true); } catch (Exception e) { throw new OwfException(e); } //没有自定义授权规则 if (entity == null) { chain.resume(assigneeExpression, ownerExpression, candidateUserExpressions, candidateGroupExpressions, task, execution); return; } //彻底忽略原有规则 task.setAssignee(entity.getAssignee()); task.addCandidateGroups(asList(entity.getGrantedGroupIds())); task.addCandidateUsers(asList(entity.getGrantedUserIds())); }
Example 2
Source File: RollbackCmd.java From lemon with Apache License 2.0 | 5 votes |
/** * 找到目的地activityId. */ public String findTargetActivityId() { if (ACTIVITY_PREVIOUS.equals(this.activityId)) { String taskId = this.findNearestUserTask(); TaskEntity taskEntity = Context.getCommandContext() .getTaskEntityManager().findTaskById(taskId); return taskEntity.getTaskDefinitionKey(); } else { return this.activityId; } }