Description

This method is used to control the naming convention used for the file(s) generated by a Receiver. 


Note: This will only work for Receivers that have dynamic configuration enabled.


Exceptions

The following GenRocket exceptions may be thrown by this method:  

  • If the requested domainName is not found.
  • If the requested receiverName is not found.
  • If the requested fileNameConfigs is not found


Runtime Method Signature

Use this method signature when directly accessing the GenRocket binary runtime.


public void receiverAddDynamicFileNameConfig(String domainName, String receiverName, List<Map> fileNameConfigs)
Java


For example, to create a new file with a name that contains some constant values, timestamp, counter, and attribute reference, configure the file name configuration for DelimitedFileReceiver of Customer Domain as:


List fileNameConfigs = [ 
    ["Constant": "Customer"], ["Constant":"_name"], ["Counter": 10], 
    ["Timestamp": "yyyy-dd-MM"], ["Reference": "#{Customer.lname}"] 
]

engineManual.receiverAddDynamicFileNameConfig("Customer", "DelimitedFileReceiver", fileNameConfigs)


REST/Socket Payload Request

Use this API JSON request payload when making an API call to the GenRocket REST or Socket Engine.


{
  "methodName": "receiverAddDynamicFileNameConfig",
  "parameters": {
    "domainName": "Customer",
    "receiverName": "DelimitedFileReceiver",
    "fileNameConfigs": [
        {"Constant" : "Customer"}, {"Constant":"_name"}, {"Counter" : "10"},
        {"Timestamp":"yyyy-dd-MM"}, {"Reference":"#{Customer.lname}"}
    ]
   }
}

REST/Socket Payload Successful Payload Response

The API JSON response payload for this method will be empty.

{
  "responseType": "OK",
  "data": ""
}