Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can generate an empty extract file by two methods:

Table of Contents

W_FORCE_EMPTY_EXTRACTFILE Configuration Parameter

You can enable this option using the W_FORCE_EMPTY_EXTRACTFILE parameter with values of Y or N in the w_config_custom.inc configuration file:

[estart dir]/tpe/dynamic/msgcenter/eagle_ml-2-0_custom_cm/w_config_custom.inc

For example, you can add the code below to force the Extract Service to generate a file for an empty extract:

On this page

Table of Contents
w_config_custom.inc
Code Block
languagejs
<CODE>
  :W_FORCE_EMPTY_EXTRACTFILE: := 'Y';
</CODE>

After adding the code shown above, you need to reinitialize the MC2 rule cache.When the empty extract file option is enabled as shown, the REST simple extract requests returns an empty result:

HTTP request example
Code Block
languagejs
<protocol>://<host>:<port>/eagle/v2/entities?entityselectiontype=EntityID&entityselectionvalue=NOTEXISTINGID&outputFormat=json

This results in an empty body response because the result has been read from an empty extract file.The example below shows how you can change the W_FORCE_EMPTY_EXTRACTFILE parameter value to N.

w_config_custom.inc
Code Block
languagejs
<CODE>
  :W_FORCE_EMPTY_EXTRACTFILE: := 'N';
</CODE>

After adding the code above, you need to reinitialize the Extract Service. If the Force Empty Extract File option is not set or disabled, the Extract Service returns a NO_DATA TSR response:

NO_DATA TSR response sample
Code Block
languagejs
{
    "header": {
        "messageId": "MRX2FM3V9IVHXD9U",
        "inReplyTo": "http://10.80.220.212:20220/extractservicerest/reply",
        "sentBy": "http://www.eagleinvsys.com/",
        "creationTimestamp": "2019-10-28T12:48:11-04:00"
    },
    "statusItem": [
        {
            "taskIdentifier": {
                "correlationId": {
                    "value": "H7T1T1XP5Z574886X",
                    "correlationIdScheme": "correlationIdScheme"
                },
                "businessTaskId": {
                    "value": "H7T1T1XP5Z574886X",
                    "businessTaskIdScheme": "businessTaskIdScheme"
                }
            },
            "status": "NO_DATA",
            "severityCode": "0"
        }
    ]
}

ForceExtractFileCreation HTTP Parameter

Another way to control an empty extractfile generation is to use forceExtractFileCreation HTTP parameter with values Y or N for the specific request. The example below is an HTTP request example using the forceExtractFileCreation parameter:

HTTP request example
Code Block
languagejs
<protocol>://<host>:<port>/eagle/v2/entities?entityselectiontype=EntityID&entityselectionvalue=NOTEXISTINGID&outputFormat=json&forceExtractFileCreation=Y