私はシェアポイントプログラミングの初心者です。次のコードがあります。
SPWorkflowTask task = some_getter();
task["Status"] = "Canceled";
task.Update();
そして私はSPExceptionを取得しています:
Microsoft.SharePoint.SPException: "This task is currently locked by a running workflow and cannot be edited."
at Microsoft.SharePoint.SPListItem.PrepareItemForUpdate(Guid newGuidOnAdd, Boolean bMigration, Boolean& bAdd, Boolean& bPublish, Object& objAttachmentNames, Object& objAttachmentContents, Int32& parentFolderId)
at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents)
at Microsoft.SharePoint.SPListItem.Update()
at mycode
私は根本的に間違ったことをしていると思います。誰でも私を助けることができますか?