コード例 #1
0
        public WorkflowInstance GetWorkflowInstanceById(long wfInstanceId)
        {
            DateTime startTime = DateTime.Now;

            try
            {
                var wfI = _workflowService.GetWFInstanceById(wfInstanceId);

                _requestTracer.TraceServiceRequestAsync(
                    this, Convert.ToInt64((DateTime.Now - startTime).TotalMilliseconds), new Object[] { wfInstanceId }, wfI, 1, "");

                return(wfI);
            }
            catch (Exception exc)
            {
                string errMsg = string.Format("Error get workflow instance with <{0}> id. Err: {1}", wfInstanceId, exc.ToString());
                Logger.Instance.Error(errMsg, LoggerConsts.WorkflowCreateWorkflow, exc);

                _requestTracer.TraceServiceRequestAsync(
                    this, Convert.ToInt64((DateTime.Now - startTime).TotalMilliseconds), new Object[] { wfInstanceId }, null, 0, exc.ToString());

                throw;
            }
        }