/// <summary> /// /// </summary> /// <param name="commandContext"></param> /// <returns></returns> public override IList <IProcessInstance> Execute(ICommandContext commandContext) { IEnumerable <IProcessInstance> insts = base.Execute(commandContext) ?? new ExecutionEntityImpl[0]; insts = ExecutionEntityImpl.EnsureStarterInitialized(insts.Cast <ExecutionEntityImpl>()); return(insts.ToList()); }
public virtual IProcessInstance Execute(ICommandContext commandContext) { var runtimeService = commandContext.ProcessEngineConfiguration.RuntimeService; IProcessInstanceQuery query = runtimeService.CreateProcessInstanceQuery(); query = query.SetProcessInstanceId(instanceId); IProcessInstance processInstance = query.SingleResult(); if (processInstance != null) { ExecutionEntityImpl.EnsureStarterInitialized(new ExecutionEntityImpl[] { processInstance as ExecutionEntityImpl }); } return(processInstance); }