ConnectorLib C++ 23.3

# Read Configuration Parameters

All of the fetch action methods you can override in `ConnectorBase` are passed a task object that has a `taskConfig()` that returns the configuration for the task.

NOTE: The task configuration returned by the methods of the `TaskConfig` object can be different to what is specified in the configuration file. This is because the settings in the configuration file can be overridden by settings passed to ACI actions.

The following lines demonstrate how to read string, integer and boolean values:

           std::string param = task.taskConfig().get("Param", "DefaultValue");
           int numeric = task.taskConfig().getInt("Numeric", 6);
           bool boolean = task.taskConfig().getBool("Boolean", true);

Each of the methods called above takes the name of the parameter to read and the default value to return if the parameter is not specified. Values for these parameters might be specified in a configuration file like this:

           Param=MyValue
           Numeric=4
           Boolean=False

You can read encrypted values (such as passwords that were encrypted with `autpassword.exe`) using the `getEncrypted` function:

           std::string password = task.taskConfig().getEncrypted("Password");

Copyright 2022 Open Text
Version 23.3 | Last updated June 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL ConnectorLib C++ 23.3

Topic Title: Read Configuration Parameters