Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

CVP Configurable Action Element

Hey Guys,

I need your help to understand the step by step process for creating configurable action element.

What i am trying to do is to have element which will take a parameter (Key) and then in the backend it will access SQL DB and fetch matching rows in recordset. Plan is to use JNDI and Connection pooling concept.


Vinod K

New Member

Re: CVP Configurable Action Element

Hello Vinod,

Have you had a chance to review the  Element Specification Guide for CVP VXML:

This provides some pretty good detail on configuring specific elements.

Also, you may want to look into the Pogramming Guide for CVP VXML as this also goes into some good detail on configuring the elements.

I hope this helps.

Thank you,


Re: CVP Configurable Action Element

A lot of the details on this sort of coding is posted on the CVP Developer's forum.

You should start small. Get the configurable action element template and build one  that does something trivial. Like take some settings and write them to the activity log. Learn where the configurable action element needs to be in Studio for it to see it, to appear in the Gallery, and learn where it needs to be on the VXML server in order to execute.

On the JNDI side, learn how to configure server.xml and context.xml for JNDI, learn where you must place sqlserver.jar so that Tomcat can see it, and use the standard Database Element in a simple app to fetch something from the DB.

Now you need to get to the coding. I always build a standalone Java app that I can call from the command line and build a method in this that does the heavy lifting, and once I have this working I copy the entire method into the configurable action class I am building. If changes are to be made, I go back to my test class and change the method, then copy it again.

Obviously you can't use connection pooling in your test class so you will have something like

        String connectionUrl = "jdbc:sqlserver://" +

                               databaseServer +

                               ":" +

                               databasePort +

                               ";" +

                               "databaseName=MyDatabase;user=" +

                               databaseUser +

                               ";password=" +


          Connection con = null;


          con = DriverManager.getConnection(connectionUrl);

whereas inside the custom action element using the JNDI you can say

          Context initialContext = new InitialContext();
          DataSource dataSource = null;

          Connection con = null;

          dataSource = (DataSource) initialContext.lookup("java:comp/env/jdbc/userDBConnection");
          con =  dataSource.getConnection();


          // Specified in the ResourceLink global tag in Tomcat\conf\context.xml
          //         name="jdbc/userDBConnection" type="javax.sql.DataSource"/>

CreatePlease to create content