How to create multiple tasks at once

I’m creating task using TaskService using below snippet.

**Task task = taskService.newTask();**

** task.setName(taskName);**
** task.setParentTaskId(taskParentId);**
** task.setDescription(taskDescription);**
** task.setCategory(taskCategory);**
** taskService.saveTask(task);**

I have got a requirement where I need to create multiple tasks(1000) but taskService.saveTask() is taking too much time to create these many tasks. Tried exploring the Activiti APIs but couldn’t find any API related to bulk task creation. Is there any support for bulk task creation? If not, can someone share an alternative to handle this scenario?

Hey @pratikaambani ,

I am not sure about bulk task creation. At least I have never seen it. There are two Markers in the BPMN standard which are called Multi Instances maker. Both create multiple task. One is doing this in parallel and the other one sequentially. You could set this one to your user task and then define in the properties panel the cardinality:
forum-multiinstance-marker.bpmn (4.1 KB)

I hope this helps
Cheers
Nele