Join wMUsers | Blog at wMUsers | User Control Panel | Site Map | webMethods Jobs |For Employers

Vinod Ravi -- webMethods Ezine Columnist

I/O, I/O, It's off to work we go



By Vinod Ravi

 


The FileIOUtilities Package

deleteFile
Inputs
fileNameAbsolute path of the file to delete
backUpFileNameName of the backup file to be created
backUpDirPath to backup directory on a file server
flagBackup files will only be created if this field is set equal to true
Outputs
StatusError messages returned by the Integration Server. If no errors are thrown, this field will be empty.
Notes None

 

directoryCleaner
Inputs
destDirectoryAbsolute path to the directory to read
logFileAbsolute path to the logfile into which messages should be written
jarFileNameAbsolute path to the JAR to be built by the service
tempDirAbsolute path to a temporary directory used for building JAR files
Outputs
StatusError 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.

 

getProperties
Inputs
propertiesA StringList specifying the properties to read from the properties file
propertiesFileNameAbsolute path to the property file on the file server
Outputs
valuesA StringList containing the property values read from the property file
StatusError 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.

 

listDirectory
Inputs
destDirectoryNameAbsolute path to the file server directory to be read
Outputs
OrderLineValuesA StringList containing the complete contents of each file found in the specified directory
FileListA StringList containing the name of each file found in the specified directory
StatusError 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.

 

writeToLog
Inputs
messageString that will be written to file.
fileNameThe name of the file on the file server to which message will be written.
pathAbsolute path of the file to which message will be written.
createFileNameFlagIf 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
OrderLineValuesA StringList containing the complete contents of each file found in the specified directory
errorError 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

compareStrings
Inputs
inString1String for comparison
inString2String for comparison to inString1
ignoreCaseIf equal to "true", the case of inString1 and inString2 will be ignored when making the comparison.
Outputs
ResultResults of the comparison. The value will be either "true" or "false".
errorError messages returned by the Integration Server.
Notes None

 

getStringLength
Inputs
stringString to evaluate for length
trimStringA flag which, if set to "true" will remove white space from string before evaluating its length.
Outputs
lengthThe length of string
Notes None

 

truncateDigits
Inputs
numberValue to be rounded to two decimal places
Outputs
newNumberThe value ofnumber rounded to two decimal places.
StatusError 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


Advertise at wMUsers






  Home | Join wMUsers | Discussion Forums | Knowledge Center | Jobs | Shareware | User Groups | Links |
Contact Us | Terms of Service | Privacy Policy

wMUsers is an independent organization and is not sponsored in any manner by Software AG.


© All Rights Reserved, 2001-2008.