字段 | 类型 | 是否空 | 描述 |
ID_ | varchar(64) | 否 | 唯一标识 |
REV_ | int(11) | 是 | 版本号,乐观锁 |
GROUP_ID_ | varchar(255) | 是 | 对应act_id_group中的ID_,在TYPE_字段为 candidate时有效 |
TYPE_ | varchar(255) | 是 | 类型,取值有:starter、candidate、participant、assignee、owner |
USER_ID_ | varchar(255) | 是 | 对应act_id_user中的ID_ |
TASK_ID_ | varchar(64) | 是 | 对应act_ru_task中的ID_ |
PROC_INST_ID_ | varchar(64) | 是 | 流程实例id |
PROC_DEF_ID_ | varchar(64) | 是 | 流程定义id |
public class IdentityLinkType {
/* Activiti native roles */
public static final String ASSIGNEE = "assignee";
public static final String CANDIDATE = "candidate";
public static final String OWNER = "owner";
public static final String STARTER = "starter";
public static final String PARTICIPANT = "participant";
}
public void setAssignee(String taskId, String userId) {
commandExecutor.execute(new AddIdentityLinkCmd(taskId, userId, AddIdentityLinkCmd.IDENTITY_USER, IdentityLinkType.ASSIGNEE));
}
public void setOwner(String taskId, String userId) {
commandExecutor.execute(new AddIdentityLinkCmd(taskId, userId, AddIdentityLinkCmd.IDENTITY_USER, IdentityLinkType.OWNER));
}
public void addCandidateUser(String taskId, String userId) {
commandExecutor.execute(new AddIdentityLinkCmd(taskId, userId, AddIdentityLinkCmd.IDENTITY_USER, IdentityLinkType.CANDIDATE));
}
public void addCandidateGroup(String taskId, String groupId) {
commandExecutor.execute(new AddIdentityLinkCmd(taskId, groupId, AddIdentityLinkCmd.IDENTITY_GROUP, IdentityLinkType.CANDIDATE));
}
public void deleteCandidateGroup(String taskId, String groupId) {
commandExecutor.execute(new DeleteIdentityLinkCmd(taskId, null, groupId, IdentityLinkType.CANDIDATE));
}
public void deleteCandidateUser(String taskId, String userId) {
commandExecutor.execute(new DeleteIdentityLinkCmd(taskId, userId, null, IdentityLinkType.CANDIDATE));
}
public void addParticipantUser(String processInstanceId, String userId) {
commandExecutor.execute(new AddIdentityLinkForProcessInstanceCmd(processInstanceId, userId, null, IdentityLinkType.PARTICIPANT));
}
public void addParticipantGroup(String processInstanceId, String groupId) {
commandExecutor.execute(new AddIdentityLinkForProcessInstanceCmd(processInstanceId, null, groupId, IdentityLinkType.PARTICIPANT));
}
public void deleteParticipantUser(String processInstanceId, String userId) {
commandExecutor.execute(new DeleteIdentityLinkForProcessInstanceCmd(processInstanceId, userId, null, IdentityLinkType.PARTICIPANT));
}
public void deleteParticipantGroup(String processInstanceId, String groupId) {
commandExecutor.execute(new DeleteIdentityLinkForProcessInstanceCmd(processInstanceId, null, groupId, IdentityLinkType.PARTICIPANT));
}
3、