Dynamically Over-riding DBinfo parameters

We can over-ride the DBinfo parameters like serverURL, user and password dynamically by using PutContextVar activity in the process Flow and also by using custom plugin.

1. Below are the high level steps to Dynamically over-ride these variables using putContextVar activity:

Below table shows the Context variable Name's corresponding to the DBinfo parameters:

DBInfo Parameter

Context VariableName

Server URL

Service.DBInfoName.Url

User

Service.DBInfoName.User

Password

Service.DBInfoName.Password

where DBInfoName is name of DBInfo activity used by DatabaseSource, AdvancedDatabaseSource, DatabaseTarget and AdvancedDatabaseTarget.

For more help refer to the below image:

DbinfoOverride.jpg

2. Dynamically over-riding DBinfo parameters through CustomPlugin.  This can be achieved by setting context variables through the below line of code:


context.put(contextVarName, contextVarValue);

where contextVarName is the context variable name for parameter which needs to be over-ridden.

Note: You need to override the complete server URL that is used for database connection instead of only dbName. You can use a custom plugin to generate the complete server URL with dynamic dbName and set it in current flow context. Once these parameters are set in flow context, dbInfo will always create connection with new parameters wherever it has been referenced in the flow.

Have more questions? Submit a request

0 Comments

Article is closed for comments.