Application crashes while processing the document
<p>private void DraftProcess(ref IDocument doc)</p>

<pre><code>    {
        Guid? documentID = null;
        using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required, Functions.SetTransactionOptions()))
        {
            try
            {
                Dictionary&lt;string, object&gt; param = new Dictionary&lt;string, object&gt;();
                param = GetDocument(doc);
                param.Add("doc", doc);
                param.Add("documentId", documentID);
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;    doc =(IDocument)base.DocumentEngine.ExecuteMethod(doc.DocumentTypeName,  doc.DocumentTypeVersion, CommonConstants.DOCUMENT_PROCES, param);**
                doc.State = States.ProcessedOK.ToString();

                if (doc.Parameters.ContainsKey(CommonConstants.WORKFLOW_ACTION_ERRORS))
                    throw new Exception();
                doc = base.DocumentEngine.UpdateDocument(doc);
                ts.Complete();
            }
            catch (Exception ex)
            {
                //doc.State = States.PreRegistrationDraft.ToString();
                ts.Dispose();
                PepLogger.WriteApplicationLogEntry(ex.InnerException.ToString(), LogSeverityEnum.Error);
            }

        }
    }
    private Dictionary&lt;string, object&gt; GetDocument(IDocument documentID)
    {
        Dictionary&lt;string, object&gt; param = new Dictionary&lt;string, object&gt;();
        param.Add("documentId", documentID);
        return param;
    }
</code></pre>

<p>I am having trouble accessing a pre-created document. I have problem with my application crashing. When I debug the lined marked above is throwing an <code>Exception</code>. I have tried many different things but I always get the same error. Help please.</p>

<p>Exception</p>

<h2>Server Error in '/UCG.Custodian.WEBUI' Application.</h2>

<p>Exception of type 'HermesSoftLab.PEP.Document.Common.Exceptions.DocumentEngineException' was thrown. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>

<p>Exception Details: HermesSoftLab.PEP.Document.Common.Exceptions.DocumentEngineException: Exception of type 'HermesSoftLab.PEP.Document.Common.Exceptions.DocumentEngineException' was thrown.</p>

<p>Source Error: </p>

<p>Line 2148:                try
Line 2149:                {
Line 2150:                    documentEngine.ExecuteAction(ref doc, action, null);
Line 2151:                    PerformGuiAfterDocumentUpdate(doc, action, documentEngine);
Line 2152:                }</p>

<p>Source File: d:\NPIS\src\UCG.Custodian.WebUI\Pages\Documents\View.aspx.cs    Line: 2150 </p>

<p>Stack Trace: </p>

<p>[DocumentEngineException: Exception of type 'HermesSoftLab.PEP.Document.Common.Exceptions.DocumentEngineException' was thrown.]
   System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +7601039
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type) +275
   HermesSoftLab.PEP.Document.DataTypes.IDocumentEngine.ExecuteAction(IDocument&amp; doc, String actionName, Dictionary`2 parameters) +0
   UCG.Custodian.WebUI.DocumentViewPage.ExecuteAction(IDocumentEngine documentEngine, IDocument doc, String action, Control plcErrors) in d:\NPIS\src\UCG.Custodian.WebUI\Pages\Documents\View.aspx.cs:2150
   UCG.Custodian.WebUI.DocumentViewPage.btnAction_Click(Object sender, EventArgs e) in d:\NPIS\src\UCG.Custodian.WebUI\Pages\Documents\View.aspx.cs:643
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565</p>
