Hi All,
I have a table in database in SQL Server that contains a few columns:
LFPath - The path in LF repository (e.g. /test/one/)
File - The file name (e.g. one.pdf)
FilePath - The path to the file on the local machine (e.g. C:/test/one.pdf)
Template - The default template I want to assign to the path
Field1 - A metadata field I will assign to the entry once created
The table with the above has a lot of records and was used for an older document repository that we want to bring into LF and assign the metadata to the corresponding fields.
I would like to do the following in Workflow (I have most working):
Query the table
For each row
Create the LF folder path (if it doesn't exist)
***Add the file to the LF folder path
Assign the template to the file
Assign the metadata to the file
The main hurdle I'm running into is with adding the file. I don't think workflow has an import entry (it has create entry), so would I need to create an SDK Script at that point to import the file with the path I have from the query? If so, can someone please help me (or point me to some docs) where I can do the following in SDK Script:
- import a file into LF with the LF destination path and the path of the file
- as I import the file, assign the template and metadata
-----------------------Below empty SDK Script------------------------
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.SqlClient
Imports System.Text
Imports LFSO90Lib
Namespace WorkflowActivity.Scripting.SDKScript
'''<summary>
'''Provides one or more methods that can be run when the workflow scripting activity is performed.
'''</summary>
Public Class Script1
Inherits SDKScriptClass90
'''<summary>
'''This method is run when the activity is performed.
'''</summary>
Protected Overrides Sub Execute()
'Write your code here.
End Sub
End Class
End Namespace
--------------------------------------------------------------------------------
If you have another approach to tackle this, please let me know.
Thanks!