IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Flat Files > Overview of WebSphere Adapter for Flat Files > Technical overview > Outbound processing > Outbound operations

Overwrite operation

The Overwrite operation overwrites the specified file with the content specified in the request.

If you select the Enable response type for the operation check box in the external service wizard, the file name is returned to the component in a business object. If a staging directory is specified in the StagingDirectory property, the file that is to be overwritten is copied from the output directory to the staging directory, and the content is overwritten for that file in the staging directory. The file is then moved back to the output directory. If a staging directory is not specified, the content is overwritten on the file in the output directory.

You can configure a staging directory only if the file content is to be written before the Overwrite operation returns the resultant values. You cannot use a staging directory if the Overwrite operation returns an output stream and the component writes to this stream.

When the input request is received as a FlatFileOutputStreamRecord record, the adapter returns an output stream.

If the CreateIfFileNotExists property is set to true, the adapter creates a file. The GenerateUniqueFile property is deprecated. Although you can currently set this property, but the adapter always treats the value for this property as false.

If the file to be updated does not exist and the CreateFileIfNotExists property is set to false, the adapter generates a RecordNotFoundException error.

For a wrapper business object, if the value is not specified for the CreateFileIfNotExists property on the wrapper, the adapter uses the value specified in its interaction specification property.

Outbound operations


Related concepts:

Business objects

Generate unique file names