Dynamically Changing Output File Names at Run Time

In Record Transfer mode, Subscription Service uses the filenames configured at design time when creating the output files to store incoming messages by default.

When you want Subscription Service to use different filenames dynamically from what is configured at design time when creating the output file, you can use the Business Document data format in the data messages and embed the new filenames in the data messages. One scenario is when the publisher is Publication Service and you want Subscription Service to create the output file using the exact same filenames when files are being published.

Procedure

  1. Select Business Document from the Data Format list in the Advanced tab of Publication Service.
  2. Type the name of the Business Document in the Business Document Name field.
  3. Select Append messages to file, Close on Business Document Lot End from the Wip Creation Mode list in the Configuration tab of Subscription Service.
  4. Add adfiles.useBDEmbeddedFileName ON to the adfilesagent.tra file (in the TIB_ADFILES_HOME\bin directory), or create a module property named adfiles.useBDEmbeddedFileName. The value of the property is ON. This is for Subscription Service.
    Note: If you use TIBCO Administrator to deploy and run the adapter, create an adfiles.useBDEmbeddedFileName module property and set the value to ON.