/** 这个结束并不会去推动令牌向下。例如用在退回的时候。 */ public void end(TaskCommand taskCommand, String taskComment) { if (this.isSuspended()) { throw ExceptionUtil.getException("10303001"); } end(); setTaskComment(taskComment); if (taskCommand != null && taskCommand.getTaskCommandType() != null && !taskCommand.getTaskCommandType().equals("")) { String taskCommandType = taskCommand.getTaskCommandType(); String taskCommandName = taskCommand.getName(); // 设置流程自动结束信息 autoEnd this.setCommandId(taskCommand.getId()); this.setCommandType(taskCommandType); if (taskCommandName == null) { TaskCommandDefinition taskCommandDef = Context.getProcessEngineConfiguration().getTaskCommandDefinition(taskCommandType); if (taskCommandDef != null) { this.setCommandMessage(taskCommandDef.getName()); } } else { this.setCommandMessage(taskCommandName); } } else { this.setCommandId(TaskCommandSystemType.AUTOEND); this.setCommandType(TaskCommandSystemType.AUTOEND); TaskCommandDefinition taskCommandDef = Context.getProcessEngineConfiguration() .getTaskCommandDefinition(TaskCommandSystemType.AUTOEND); if (taskCommandDef != null) { this.setCommandMessage(taskCommandDef.getName()); } } }
/** 重置任务处理者人属性 */ public void resetProperties() { setCreateTime(null); setEndTime(null); setCommandId(null); setCommandType(null); setCommandMessage(null); setTaskComment(null); setAgent(null); setAdmin(null); setDraft(false); setOpen(false); setSuspended(false); setAssignee(null); }