To use a servlet node, drop it onto your callflow. Note: there is a difference between a servlet and vxml servlet node(which are stacked together in the palette). The servlet node is just a bare bones servlet that allows you to add your own custom code, which is what you want to use.
You then override servletImplementation(), connect to and code your DB operations there.
We intentionally added hooks into the generated code for users to write their own code which will not be overwritten if the code is regenerated. As long as you override the recommended methods, you should have no problems.
There isn''t a sample showing how to use a servlet. There is one showing how to use a VXML servlet which is called UserDefineVXML. You can use that as a guide as long as you override the method I mentioned above and remember to use the servlet node instead. There''s really only a few steps: drop it on your flow, connect it up, edit the java code by right clicking the servlet node and picking Edit, then override the method mentioned and you are ready to write your code.
|