public void assign(IAssignable asignable, string performerName) { TaskInstance taskInstance = (TaskInstance)asignable; IProcessInstance processInstance = taskInstance.AliveProcessInstance; String creator = processInstance.CreatorId; if (creator == null) { throw new EngineException(processInstance, taskInstance.Task, "分配工单错误,流程创建者Id为null"); } asignable.assignToActor(creator); }
public void assign(IAssignable arg0, String arg1) { HttpContext context = HttpContext.Current; if (context != null) { //将当前用户设置为操作员 IWorkItem wi = arg0.assignToActor(context.User.Identity.Name); //假设在目前的两个example中都规定:首个环节信息录入后,立即提交到下一个环节。 //则需要对新创建的WorkItem执行 claim()和complete()操作。 wi.claim(); wi.complete("系统自动提交任务。"); } }