Actions YAML Reference
Properties | List of all members
ReadFileAction Class Reference

Reads the content of a file on any supported file system, including FTP, web, and cloud storage. More...

Inherits IntegrationAction.

Properties

FileTarget File [get, set]
 Specifies the path of the file to read. When this property is set, the file must exist in the folder before it is read; otherwise, a runtime error is thrown. Must be specified only when WaitForFileAction is not specified.
For more examples, see FileTarget. More...
 
int LockedFileTimeout [get, set]
 Specifies the amount of time, in milliseconds, to try to open a detected file that is found to be initially locked by another application. More...
 
ActionTextEncoding Encoding [get, set]
 Specifies the text encoding scheme to use when reading the file. The default is Windows System Default. More...
 
WaitForFileAction WaitForFileAction [get, set]
 Specifies that the action waits for the file to arrive if it does not already exist in the folder. Must be specified only when File is not specified.
Example: More...
 
ContentDataType InputDataType [get, set]
 Specifies the input data type and how to process the data that is read. The following options are available: More...
 
bool DataInSoapMessage [get, set]
 Specifies whether data is contained in a SOAP message. The default value is false. More...
 
SerializableString FileContentsVariableName [get, set]
 Specifies the name of the variable to place the ReadFileAction FileContents into as a string. The default value is "EventData". More...
 
CommonActionProperties

Describes the common action properties for Actions and ActionGroups.

string Name [get, set]
 Specifies the name. This property cannot be empty and must be unique in the YAML script. More...
 
string Description [get, set]
 Specifies the description. The default value is "". More...
 
ActionRunType RunType [get, set]
 Runs the action by using one of the following types: More...
 
bool IgnoreErrors [get, set]
 Specifies whether to ignore errors and continue with the next action. Valid only for Action and ActionGroup. The default value is false. More...
 
int FailureRetries [get, set]
 Specifies the number of times that the action is retried if it fails. Available only for Action. The default value is 0. More...
 
int RetryInterval [get, set]
 Specifies the interval, in milliseconds, that elapses when a failed action is retried. Valid only when the value of FailureRetries is greater than 0. Available only for Action. The default value is 10000. More...
 

Detailed Description

Reads the content of a file on any supported file system, including FTP, web, and cloud storage.

For common action properties, see IntegrationAction. Also see WaitForFileAction.
Example in which a file is read without waiting for it to arrive (when it does not already exist in the folder):

- ReadFileAction:
File: lib://myfolder/Print.btxml
Name: Read a File
# And more common action properties
...
FileTarget File
Specifies the path of the file to read. When this property is set, the file must exist in the folder ...
Definition: ReadFileAction.Properties.cs:92
ActionTextEncoding Encoding
Specifies the text encoding scheme to use when reading the file. The default is Windows System Defaul...
Definition: ReadFileAction.Properties.cs:106
ContentDataType InputDataType
Specifies the input data type and how to process the data that is read. The following options are ava...
Definition: ReadFileAction.Properties.cs:137
string Name
Specifies the name. This property cannot be empty and must be unique in the YAML script.
Definition: IntegrationAction.Properties.cs:87

Example in which the latest revision of a Librarian file is read without waiting for it to arrive (when it does not already exist in the folder):

- ReadFileAction:
File:
Path: lib://myfolder/Print.btxml
FileSystem.Librarian:
AllowUnpublishedFiles: true
Name: Read a File
# And more common action properties
...

Example in which the action waits for a file to arrive and then reads it:

Actions:
- ReadFileAction:
ScanMethod: Notification
ScanFolder: C:\Scan
FilePattern: Print.btxml
FileIdleTime: 0
Name: Wait for File
Name: Read File
# And more common action properties
...
WaitForFileAction WaitForFileAction
Specifies that the action waits for the file to arrive if it does not already exist in the folder....
Definition: ReadFileAction.Properties.cs:120

Property Documentation

◆ File

FileTarget File
getset

Specifies the path of the file to read. When this property is set, the file must exist in the folder before it is read; otherwise, a runtime error is thrown. Must be specified only when WaitForFileAction is not specified.
For more examples, see FileTarget.

◆ LockedFileTimeout

int LockedFileTimeout
getset

Specifies the amount of time, in milliseconds, to try to open a detected file that is found to be initially locked by another application.

◆ Encoding

ActionTextEncoding Encoding
getset

Specifies the text encoding scheme to use when reading the file. The default is Windows System Default.

◆ WaitForFileAction

Specifies that the action waits for the file to arrive if it does not already exist in the folder. Must be specified only when File is not specified.
Example:

ScanFolder: C:\Scan

◆ InputDataType

ContentDataType InputDataType
getset

Specifies the input data type and how to process the data that is read. The following options are available:

  • Unstructured (default)
  • XmlVariables
  • JsonVariables
  • XML
  • BTXML
  • TextCSV
  • TextTabDelimited
  • PrintCommandScript

◆ DataInSoapMessage

bool DataInSoapMessage
getset

Specifies whether data is contained in a SOAP message. The default value is false.

◆ FileContentsVariableName

SerializableString FileContentsVariableName
getset

Specifies the name of the variable to place the ReadFileAction FileContents into as a string. The default value is "EventData".

◆ Name

string Name
getsetinherited

Specifies the name. This property cannot be empty and must be unique in the YAML script.

◆ Description

string Description
getsetinherited

Specifies the description. The default value is "".

◆ RunType

ActionRunType RunType
getsetinherited

Runs the action by using one of the following types:

  • Always (default)
  • Never

◆ IgnoreErrors

bool IgnoreErrors
getsetinherited

Specifies whether to ignore errors and continue with the next action. Valid only for Action and ActionGroup. The default value is false.

◆ FailureRetries

int FailureRetries
getsetinherited

Specifies the number of times that the action is retried if it fails. Available only for Action. The default value is 0.

◆ RetryInterval

int RetryInterval
getsetinherited

Specifies the interval, in milliseconds, that elapses when a failed action is retried. Valid only when the value of FailureRetries is greater than 0. Available only for Action. The default value is 10000.


The documentation for this class was generated from the following file: