
| I/O, I/O, It's off to work we go
By Vinod Ravi | |
The FileIOUtilities Package
| Inputs |
| fileName | Absolute path of the file to delete |
| backUpFileName | Name of the backup file to be created |
| backUpDir | Path to backup directory on a file server |
| flag | Backup files will only be created if this field is set equal to true |
|
| Outputs |
| Status | Error messages returned by the Integration Server. If no errors are thrown, this field will be empty. |
|
| Notes |
None |
|
| Inputs |
| destDirectory | Absolute path to the directory to read |
| logFile | Absolute path to the logfile into which messages should be written |
| jarFileName | Absolute path to the JAR to be built by the service |
| tempDir | Absolute path to a temporary directory used for building JAR files |
|
| Outputs |
| Status | Error messages returned by the Integration Server. If no errors are thrown, this field will contain the complete list of actions performed by the service. |
|
| Notes |
This service will compare the last modified date of all read files to the current date. If the file is not current, it will be deleted. To save the deleted files as an archive, specify values for the inputs jarFileName and tempDir. |
|
| Inputs |
| properties | A StringList specifying the properties to read from the properties file |
| propertiesFileName | Absolute path to the property file on the file server |
|
| Outputs |
| values | A StringList containing the property values read from the property file |
| Status | Error messages returned by the Integration Server. |
|
| Notes |
The property file format should be as follows:userid=myuserid password=mypassword version=myversion There must only be one key-value pair per line. |
|
| Inputs |
| destDirectoryName | Absolute path to the file server directory to be read |
|
| Outputs |
| OrderLineValues | A StringList containing the complete contents of each file found in the specified directory |
| FileList | A StringList containing the name of each file found in the specified directory |
| Status | Error messages returned by the Integration Server. |
|
| Notes |
This service is useful when business rules require a periodic scan of a directory for newly written files. Using this service, the contents of any existing file are read and returned from the file server. |
|
| Inputs |
| message | String that will be written to file. |
| fileName | The name of the file on the file server to which message will be written. |
| path | Absolute path of the file to which message will be written. |
| createFileNameFlag | If set to "true", a new file will be created for each invocation of the method. The filename will be appended with a current timestamp. |
|
| Outputs |
| OrderLineValues | A StringList containing the complete contents of each file found in the specified directory |
| error | Error messages returned by the Integration Server. |
|
| Notes |
The string written to disk will be prepended with a timestamp in the format MM/dd/yyyy HH:mm:ss; the file name timestamp is of the format MM/dd/yyyy. These values may be modified with the Java source code. |
|
The GeneralUtilities Package
| Inputs |
| inString1 | String for comparison |
| inString2 | String for comparison to inString1 |
| ignoreCase | If equal to "true", the case of inString1 and inString2 will be ignored when making the comparison. |
|
| Outputs |
| Result | Results of the comparison. The value will be either "true" or "false". |
| error | Error messages returned by the Integration Server. |
|
| Notes |
None |
|
| Inputs |
| string | String to evaluate for length |
| trimString | A flag which, if set to "true" will remove white space from string before evaluating its length. |
|
| Outputs |
| length | The length of string |
|
| Notes |
None |
|
| Inputs |
| number | Value to be rounded to two decimal places |
|
| Outputs |
| newNumber | The value ofnumber rounded to two decimal places. |
| Status | Error messages returned by the Integration Server. |
|
| Notes |
This service is not a perfect number rounding service -- it only rounds to three digits. This service will also remove any commas to the left of the decimal point. |
|
<<Prev 1 [2]
Go Deeper on the Subject: The wMUsers Discussion Forums
Vinod Ravi works as a Senior Software Developer at Airgas Inc. He has more than 5 years experience in software application development. His expertise includes system study, analysis and design of E-Commerce applications. He has implemented a large variety of eCommerce projects using webMethods and Java technologies.
Vinod can be reached via email at