If you are talking about Guvnor, you might wanna read the documantation (with an example):
full documentation: http://docs.jboss.org/jbpm/v5.3/userguide/
tutorial starting from eclipse, passing through Guvnor and Jbpm-Console: http://docs.jboss.org/jbpm/v5.3/userguide/ch.installer.html#d0e469
Hope this helps.