When you setup the Flex Viewer you had to setup the config.xml to point to a number of different services. One of these was the Workflow Manager Service <workflowService>. Use ArcCatalog to connect to the Workflow Manager Server and add a Workflow Manager Server Object. This object will include the location of the .jtc connection file used on the server. This will tell the application what the database is how to connect to it and subsequently the JTX_Users table found in that database will potentially allow you to connect to the database.
I hope that makes sense. It was a while ago that I set things up.