public WorkflowInstance GetWorkflowInstanceByCase(CyberCase cyberCase) { DateTime startTime = DateTime.Now; try { var wfI = _workflowService.GetWFInstanceByCase(cyberCase); _requestTracer.TraceServiceRequestAsync( this, Convert.ToInt64((DateTime.Now - startTime).TotalMilliseconds), new Object[] { cyberCase }, wfI, 1, ""); return(wfI); } catch (Exception exc) { string errMsg = string.Format("Error get workflow instance with <{0}> case id. Err: {1}", ((null == cyberCase) ? 0 : cyberCase.Id), exc.ToString()); Logger.Instance.Error(errMsg, LoggerConsts.WorkflowCreateWorkflow, exc); _requestTracer.TraceServiceRequestAsync( this, Convert.ToInt64((DateTime.Now - startTime).TotalMilliseconds), new Object[] { cyberCase }, null, 0, exc.ToString()); throw; } }