Ayusman Dikshit:
Here is a simple example for multiple instances component:
http://community.jboss.org/people/bpmn2user/blog/2011/03/05/jbpm5--multiple-instances
Here loop condition can be set using a value from database either using a script node or programmatically.