The DBCPConnectionPool Service
requires 5 connection parameters to establish connection to a database as shown in the picture below [Marked Yellow]
I used UpdateAttribute Processor
to manually add these 5 connection parameters and gave them their respective values as shown in the picture below [Marked Yellow]
Now, when I was trying to read the values for the connection parameters in DBCPConnectionPool Service
through these attributes (Shown in picture below) , I was unable to read them.
To know the reason why the DBCPConnectionPool Service
was unable to read the Flowfile attributes, I went ahead to check the source code for both DBCPConnectionPool Service
and UpdateAttribute Processor
.
Souce code for DBCPConnectionPool Service
:
Souce code for UpdateAttribute Processor
:
Thus, I came to know the reason why it was unable to read the values from FlowFile attributes. This is because the ExpressionLanguageScope
is limited to VARIABLE_REGISTRY
and not FLOWFILE_ATTRIBUTES
.
Now, My Question is that why the ExpressionLanguageScope
for DBCPConnectionPool Service
is limited to VARIABLE_REGISTRY
. What is the reason for this limitation? The reason why I am asking this question is because I want to read the values for the connection parameters through FlowFile attributes.