public class DemoTaskService {
public static void main(String[] args) {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");
TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
TaskServiceSession taskSession = taskService.createSession();
// Add users
Map vars = new HashMap();
Reader reader = new InputStreamReader( DemoTaskService.class.getResourceAsStream( "LoadUsers.mvel" ) );
Map<String, User> users = ( Map<String, User> ) eval( reader, vars );
for ( User user : users.values() ) {