0

タスクを作成し、カスタムInfoPathフォームを使用してそのタスクを承認するワークフローを作成しました。[承認/拒否]ボタンをクリックしているときに、タスクフォームでXML例外が発生します。

「日付」は予期しないトークンであり、予期されるトークンは「=」です。

以下に、例外のスタックトレースをリストしました。


Server Error in '/' Application.

'Date' is an unexpected token. The expected token is '='. Line 1, position 22.

 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. 

Exception Details:
System.Xml.XmlException: 'Date' is an unexpected token. The expected token is '='. Line 1, position 22. 
Source Error:  An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:  [XmlException: 'Date' is an unexpected token. The expected token is '='. Line 1, position 22.]   

System.Xml.XmlTextReaderImpl.Throw(Exception e) +95   
System.Xml.XmlTextReaderImpl.ParseAttributes() +5089862   
System.Xml.XmlTextReaderImpl.ParseElement() +378   
System.Xml.XmlTextReaderImpl.ParseDocumentContent() +429   
System.Xml.XmlReader.MoveToContent() +22   
       Microsoft.SharePoint.Workflow.SPWorkflowTask.GetExtendedPropertiesAsHashtable(SPListItem task) +289   
Microsoft.SharePoint.Workflow.SPWorkflowTask.SetWorkflowData(SPListItem task, Hashtable newValues, Boolean ignoreReadOnly) +471   
Microsoft.SharePoint.Workflow.SPWorkflowTask.AlterTask(SPListItem task, Hashtable htData, Boolean fSynchronous) +110   
Microsoft.Office.Workflow.WrkTaskIPPage.XmlFormControl_OnClose(Object sender, EventArgs e) +700   
Microsoft.Office.InfoPath.Server.Controls.XmlFormView.CloseDocument(EventLogStart eventLogStart) +113   
Microsoft.Office.InfoPath.Server.Controls.XmlFormView.PlayServerMessages(EventLogStart eventLogStart) +192   
Microsoft.Office.InfoPath.Server.Controls.XmlFormView.OnDataBindHelper() +428
Microsoft.Office.InfoPath.Server.Controls.XmlFormView.OnDataBinding(EventArgse) +97
System.Web.UI.WebControls.WebParts.Part.DataBind() +42   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
Microsoft.Office.Workflow.WrkTaskIPPage.OnLoad(EventArgs ea) +3270   
System.Web.UI.Control.LoadRecursive() +66   
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
4

1 に答える 1

4

これを試してみてくださいこれはうまくいくかもしれません...

タスク create プロパティで拡張プロパティ宣言が必要です。利用可能なスペースにx0020を追加するだけです。コードは次のようになります

SPTaskCreate_TaskProperties.ExtendedProperties["Start_x0020_Date"] = DateTime.Now;

そしてそうではない

SPTaskCreate_TaskProperties.ExtendedProperties["Start Date"] = DateTime.Now;
于 2012-11-19T14:55:25.600 に答える