I am using $c variables for db connectivity[i declared those variables in preprocessor script] in javascript reader as a source even I used channel map variables I am getting channel map not found error... Tried&Failed cases: 1.Added code template Lib[In Lib declared one function for db conn using those two channel map variables as parameters]. 2.used those $c variables and called function as one of step in transformer and returned the db conn variable name. 3.used $c variables and called function in deploy script as global map variables as well 4. declared like channelMap.put(dbconn,Dbconn); in source js reader Expected result: Source connector should connect to the db and read the data and return msg.
FYI: only for db connectivity I declared function and $c variables