I need to make a workflow that use the filesize. In this case, is necesary obtain information about the document.
I hope someone can share the script with me.
I will be very grateful
Regards
Miguel
I need to make a workflow that use the filesize. In this case, is necesary obtain information about the document.
I hope someone can share the script with me.
I will be very grateful
Regards
Miguel
Miguel - I am assuming that you mean the size of an edoc file attached to a document? If so, here is a Workflow SDK code snippet that will do that. The token exposed by the script activity is called 'FileSize' and represents the size in bytes of the edoc file. This is a 9.2 SDK Script activity using RA. If you have an earlier version of Workflow and need the LFSO code then let me know...
Protected Overrides Sub Execute() 'Write your code here. The BoundEntryInfo property will access the entry, RASession will get the Repository Access session If Me.BoundEntryInfo.EntryType = EntryType.Document Then Dim docInfo As DocumentInfo = DirectCast(Me.BoundEntryInfo, DocumentInfo) Me.SetTokenValue("FileSize", docInfo.ElecDocumentSize) docInfo.Dispose End If End Sub
NOTE: You can also use the 'Find Entry' workflow activity and set the 'Additional Properties' to expose the edoc filesize. Perhaps that would be easier and more efficient than the SDK script?