Re: set custom value in Documentum advanced export module scripting

Team,

I have created a capture flow with custom values at the document level. Based on the help pages and EMC forums, I was able to get the custom value using GetFormattedValue method in Documentum module scripting. But I am not able to set a custom variable a value .

The following is the code snippet and I tried with the following but no luck. The program compiles without error or warnings but it is not setting up the custom value. Please let me know how to resolve this.

customIAValue.SetString(“CustomValues.FileNo”, cnt);

customIAValue.SetString(“FileNo”, cnt);

namespace Script

{

public class DocumentumExportTaskEvents : IDocumentumExportTaskEvents

{

private string FileName;

private int cnt =0;

private static IBatchInformation currentBatch;

private static IIAValueProvider customIAValue;

public void BeforeExportRun(IBeginTaskEventArgs taskInfo){

currentBatch = taskInfo.Task.Batch;

customIAValue = taskInfo.Task.Value();

}

public void AfterThirdPartyConnectionEstablished(IAfterConnectionEstablishedEventArgs connection){

IEnumerable<ITypedObject> count = connection.DQLAccessor.ExecuteDQL(“SELECT count(*) as cnt FROM dm_document(all) WHERE FOLDER (‘/Test’,DESCEND) and r_creation_date > DATE(TODAY)”);

foreach ( var c in count) {

cnt = c.GetInt(“cnt”);

}

}

public Boolean BeforeNodeProcessed(INodeEventArgs nodeInfo) {

FileName = nodeInfo.Node.GetFormattedValue(“@(CustomValues.FileName)”,0,”File”);

cnt = ++cnt;

customIAValue.SetString(“CustomValues.FileNo”, cnt);

}

}

Related:

  • No Related Posts

Leave a Reply