示例#1
0
        public WFInfo GetWorkflowById(long wfId)
        {
            DateTime startTime = DateTime.Now;

            try
            {
                var wf = _workflowService.GetWorkflowById(wfId);

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

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

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

                throw;
            }
        }