Creating File Adapters
Create a File Adapter to read from, write to, copy, move, or delete files in a local or network directory.
- Select File | New | File Adapter from the main menu. The New File Adapter window appears.
- Select a type (Read, Write, Copy, Move, or Delete)
- Provide the Source folder, Package, and Name (if not already done so).
- Click Finish. An editor appears.
Defining File Read Adapters
Defining this object instructs Clarify which file to read.
- If you wish to use an existing adapter as a template, select it from the Template section's Template File Adapter field. Use of an Adapter Template is tied directly to the number and types of parameters the adapter uses. For more information, see Using File Adapters - advanced.
- If you need to add a parameter, click the Add button in the Parameters section and then define the parameter that appears in the new row. By default, a Read adapter has one parameter: storageNodes. The storageNodes parameter represents the data in the file.
- Under File Information, in the File Path field, specify the folder where the file is located. You have several options to specify the file path:
- Browse for a Directory - Select the folder containing the files.
- Global Variable - Select a Global Variable that contains the folder.
- Substitution Variable - A variable is place-holder for the file path. The actual file name will be supplied to the adapter by a Business Process. You can type the Variable Name or use the Variable Browser.
- In the File Name field, specify the name of the file to be read. You have two options to specify the file name:
- Specific file name: the name of the file to read.
- Variable: A variable is a place-holder for the name. The actual name of the file will be supplied at runtime by a Business Process.
- Click Save to complete this task.
Defining File Write Adapters
Defining this object determines how, when, and where Clarify writes files, and whether it must create them. The following steps take place in the File Write Adapter editor, which has these sections: Template, Parameters, and File Information.
- If you wish to use an existing adapter as a template, select it from the Template section's Template File Adapter field. Use of an Adapter Template is tied directly to the number and types of parameters the Adapter uses. For more information, see Using Adapter Templates.
- If you need to add a parameter, click the Add button in the Parameters section and then define the parameter that appears in the new row. By default, a Write adapter has one parameter: storageNodes. The storageNodes parameter represents the data in the file.
- Under File Information, in the File Path field, specify the folder where the file will be written. You have several options to specify the file path:
- Browse for a Directory: Select the folder containing the files.
- Global Variable: Select a Global Variable that contains the folder.
- Substitution Variable: A variable is place-holder for the file path. The actual file name will be supplied to the adapter by a Business Process. You can type the Variable Name or use the Variable Browser.
- To automatically create the directory before writing the file, select the Create directories checkbox.
- To specify the name of the file to be written, in the File Name field either:
- Type a specific file name or click the Browse button to select one.
- Click the Global Variable button to select a global variable.
- Create a substitution variable; Clarify will generate a file name based on the variable.
- Specify a Collision Action, which determines how Clarify reacts when a file collision occurs. Options are:
- Overwrite: Write over the existing data in the file.
- Append: Open the original file and add the new data after the old data.
- Generate Unique Name: Create a new file to house the data. This filename will have the original file name plus a random letter/number combination appended.
- Click Save to complete this task.
Defining File Copy Adapters
Defining this object instructs Clarify how to copy files from one folder to another.
- If you wish to use an existing adapter as a template, select it from the Template section's Template File Adapter field. Use of an Adapter Template is tied directly to the number and types of parameters the Adapter uses. For more information, see Using File Adapters - advanced.
- If you need to add a parameter, click the Add button in the Parameters section and then define the parameter that appears in the new row. By default, a Copy adapter has one parameter: storageNodes. The storageNodes parameter represents the data in the file.
- Under the File Information section, in the File Path field, indicate the folder where the file (or files) to be copied reside. Browse for a file or a folder location by using the File Browser, or alternately, specify a global or substitution variable by using the Global Variable or Substitution Variable Browsers.
- To further filter which files are copied, enter a file name or filter in the File Name or Filter field. You have several options to specify the file name:
- A specific file name - The name of the file to copy.
- Global Variable -A Global Variable that contains the name of the file to copy.
- Substitution Variable - A variable is place-holder for the file name. The actual file name will be supplied to the adapter by a Business Process. You can type the Variable Name or use the Variable Browser.
- Filter - A filter is a means of specifying a group of files whose names match a pattern. For example, a common file-system wild card '*' can be used to specify all files in the folder. Additionally, a Regular Expression pattern can be used in more complex scenarios.
- Blank - If no value is supplied, the Adapter will copy all the files it finds in File Path to the Destination Directory.
- In the Destination Directory field, indicate the folder where the files will be copied to. Browse for a file or a folder location by using the File Browser, or alternately, specify a global or substitution variable by using the Global Variable or Substitution Variable Browsers.
- In the Collision Action field, select the action that Clarify will take should a file collision occur. Options include:
Options include:
- Overwrite: Write over the existing data in the file.
- Append: Open the original file and add the new data after the old data.
- Generate Unique Name: Create a new file to house the data. This filename will have the original file name plus a random letter/number combination appended.
- Under the Options section, define whether this adapter copies folders, files, or both by selecting the appropriate radio button.
- Files only: Copies files only.
- Folders only: Copies folders only. The value supplied for File Name or Filter will apply to folder names, but not file names.
- Files and Folders: - Copies files and folders. The value supplied for File Name or Filter will apply to both folder and file names.
- Click Save to complete this task.
Defining File Move Adapters
Defining this object instructs Clarify how to move files from one folder to another. The following steps take place in the File Move Adapter editor, which has four sections: Template, Parameters, File Information, and Options.
- If you wish to use an existing adapter as a template, select it from the Template section's Template File Adapter field. Use of an Adapter Template is tied directly to the number and types of parameters the Adapter uses. For more information, see Using File Adapters - advanced.
- If you need to add a parameter, click the Add button in the Parameters section and then define the parameter that appears in the new row. By default, a Move adapter has one parameter: storageNodes. The storageNodes parameter represents the data in the file.
- Under File Information, in the File Path field, specify the folder where the file (or files) to be move reside. You can browse for a file or a folder location by using the File Browser. Alternately, you can specify a global or substitution variable by using the Global Variable or Substitution Variable Browsers.
- To further filter which files are moved, enter a file name or filter in the File Name or Filter field. You have several options to specify the file name:
- A specific file name - The name of the file to move.
- Global Variable -A Global Variable that contains the name of the file to move.
- Substitution Variable - A variable is place-holder for the file name. The actual file name will be supplied to the adapter by a Business Process. You can type the Variable Name or use the Variable Browser.
- Filter - A filter is a means of specifying a group of files whose names match a pattern. For example, a common file-system wild card '*' can be used to specify all files in the folder. Additionally, a Regular Expression pattern can be used in more complex scenarios.
- Blank - If no value is supplied, the Adapter will move all the files it finds in File Path to the Destination Directory.
- In the Destination Directory field, specify the folder where the files will be copied to. You can browse for a file or a folder location by using the File Browser. Alternately, you can specify a global or substitution variable by using the Global Variable or Substitution Variable Browsers.
- Under the Options section, direct the adapter to switch to a mode where the Adapter is capable of moving folders as well as files:
- Files only - Only 'files' are moved.
- Folders only - Only 'folders' are moved. The value supplied for File Name or Filter will apply to folder names, not file names.
- Files and Folders - Files and folders are moved. The value supplied for File Name or Filter will apply to folder and file names.
- Click Save.
Defining File Delete Adapters
Defining this object instructs Clarify how to delete files from a local or network file system folder. The following steps take place in the File Delete Adapter editor, which has these sections: Template, Parameters, File Information, Match Date and Time, and Options.
- If you wish to use an existing adapter as a template, select it from the Template section's Template File Adapter field. Use of an Adapter Template is tied directly to the number and types of parameters the Adapter uses. For more information, see Using File Adapters - advanced.
- If you need to add a parameter, click the Add button in the Parameters section and then define the parameter that appears in the new row. By default, a Delete adapter has one parameter: storageNodes . The storageNodes parameter represents the data in the file.
- Under File Information, in the File Path field, specify the folder where the file (or files) to be deleted reside. You can browse for a file or a folder location by using the File Browser. Alternately, you can specify a global or substitution variable by using the Global Variable or Substitution Variable Browsers.
- In the File Name or Filter field, direct which file (or files) is to be deleted. You have several options to specify the file name:
- A specific file name- The name of the file to delete.
- Global Variable- A global variable that contains the name of the file to delete.
- Substitution Variable- A variable is place-holder for the file name. The actual file name will be supplied to the adapter by a Business Process. You can type the Variable Name or use the Variable Browser.
- Filter- A filter is a means of specifying a group of files whose names match a pattern. For example, a common file-system wild card '*' can be used to specify all files in the folder. Additionally, a Regular Expression pattern can be used in more complex scenarios.
- Blank-If no value is supplied, the Adapter will delete all the files it finds in File Path.
- To further filter the files to be deleted, select the Date to Match File Is drop-down and specify a Date . Click the Enabled button to activate this field. You have several options to control the date matching behavior:
- Equal to - File with a timestamp matching a specific date and time will be deleted.
- Before - Files with a timestamp before a specific date and time will be deleted.
- After - Files with a timestamp after a specific date and time will be deleted.
- Use the Date to specify the Date and Time to filter the files to be deleted.
- To instruct the adapter to navigate down any sub-folders that exist within File Path, click Recurse Directories. As each sub-folder is explored, files matching the File Name or Filtercriteria will be deleted.
- Use Delete to direct the adapter to switch to a mode where the Adapter is capable of deleting folders as well as files:
- Files only - Only 'files' are deleted.
- Folders only - Only 'folders' are deleted. The value supplied for File Name or Filter will apply to folder names, not file names.
- Files and Folders - Files and folders are moved. The value supplied for File Name or Filter will apply to folder and file names.
- Click Save to complete this task.
Comments
0 comments
Please sign in to leave a comment.