/** 创建任务 */ public static TaskEntity create() { TaskEntity task = new TaskEntity(); task.setId(GuidUtil.CreateGuid()); task.isIdentityLinksInitialized = true; task.createTime = ClockUtil.getCurrentTime(); return task; }
/** 创建并持久化一个任务 */ public static TaskEntity createAndInsert(FlowNodeExecutionContext executionContext) { TaskEntity task = create(); task.insert(((TokenEntity) executionContext).getProcessInstance()); return task; }