Move objects between folders via. Write Plugin

 I am trying to move topics/maps across folders using a write Plugin. My method call is identical to the method call of dragging and dropping used by the UI in Pub manager, but I get a SQL  Lock request time out period exceeded error. Here is the log message. Thank you in advance for any assistance.

15:43:38.1364 Debug 19 00205 a:UC:ajain API25/DocumentObj/SetMetadata Trisoft.InfoShare.API25.Folder.MoveObjects(folderRef=[1304970],logicalIds=[{GUID-599835A5-CE14-5C3F-A88A-43AB1128BAE0}:1],fromFolderRef=[-1]) [MethodEnter(16410)]


15:43:52.2659 Error 19 00205 a:UC:ajain API25/DocumentObj/SetMetadata Trisoft.InfoShare.Configuration.Database.DatabaseCommandSqlServer.ExecuteQuery InformationSetDataSqlServer.Lock failed with: System.Data.SqlClient.SqlException (0x80131904): Lock request time out period exceeded.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
at System.Data.SqlClient.SqlDataReader.Read()
at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Trisoft.InfoShare.Configuration.Database.DatabaseCommandSqlServer.FillDataSet(SqlCommand command, DataSet result)
at Trisoft.InfoShare.Configuration.Database.DatabaseCommandSqlServer.ExecuteQuery(String query, DataSet result, DatabaseParameters parameters, Int32 commandTimeOut, String comment, Boolean logException)
ClientConnectionId:70edde51-5449-4b1f-ad0d-810c1d803078 []
15:43:52.2659 Error 19 00205 a:UC:ajain API25/DocumentObj/SetMetadata Trisoft.InfoShare.Configuration.Database.DatabaseCommandSqlServer.ExecuteQuery (query=[set lock_timeout 100
select count(card_id) from dbo.card with (index=CARD_PK, updlock)
where card_id = 830204 ]) []

  • Dear Akheil,

    The functionality you try to implement through the IWrite plugin interface is not supported by the framework.
    The IWrite plugin framework can only work on the current object (logical / version / language) that is submitted/changed and can not change the location of the object.

    An IWrite plugin can only work within the current transaction on the object it is started from and has to stay within its transaction, hence you can not perform any additional actions through the API (wrappers) interface.

    If you want to achieve the functionality of moving the object automatically into a different folder you will have to implement it in a different approach than the IWrite plugin methodology.

    Kind Regards,

    Raf