// 1. top sequence
TaskSequence top = new TaskSequence(runData,null,null,false); // top level, not parallel
// 2. task to create the index
CreateIndexTask create = new CreateIndexTask(runData);
top.addTask(create);
// 3. task seq to add 500 docs (order matters - top to bottom - add seq to top, only then add to seq)
TaskSequence seq1 = new TaskSequence(runData,"AddDocs",top,false);
seq1.setRepetitions(500);