Here is a simple example:
http://community.jboss.org/people/bpmn2user/blog/2011/03/07/jbpm5--ruletask-example
You can create a rule task and use a drl file (or an Excel decision table http://community.jboss.org/people/bpmn2user/blog/2011/03/07/jbpm5--ruletask-example-using-an-excel-decision-table). In the drl file you can define the rule ' if the string contains New York, then print "hello New York" =====>'