/// <summary>
        ///
        /// </summary>
        /// <param name="commandContext"></param>
        /// <returns></returns>
        public override IList <IHistoricProcessInstance> Execute(ICommandContext commandContext)
        {
            IEnumerable <IHistoricProcessInstance> insts = base.Execute(commandContext) ?? new HistoricProcessInstanceEntityImpl[0];

            insts = HistoricProcessInstanceEntityImpl.EnsureStarterInitialized(insts.Cast <HistoricProcessInstanceEntityImpl>());

            return(insts.ToList());
        }
Beispiel #2
0
        public virtual IHistoricProcessInstance Execute(ICommandContext commandContext)
        {
            var historyService = commandContext.ProcessEngineConfiguration.HistoryService;

            IHistoricProcessInstanceQuery query = historyService.CreateHistoricProcessInstanceQuery().SetProcessInstanceId(instanceId);

            IHistoricProcessInstance processInstance = query.SingleResult();

            if (processInstance != null)
            {
                HistoricProcessInstanceEntityImpl.EnsureStarterInitialized(new HistoricProcessInstanceEntityImpl[]
                {
                    processInstance as HistoricProcessInstanceEntityImpl
                });
            }

            return(processInstance);
        }