I need node1 ~ node12 (or even more) to execute at the same time, how should I set it up, I can only make 8 tasks execute at the same time according to the following settings, why?
This is my setting:
process2.bpmn (19.7 KB)
camunda.bpm:
admin-user:
id: demo
password: demo
filter:
create: All tasks
job-execution:
core-pool-size: 100
max-pool-size: 300
lock-time-in-millis: 7200000
queue-capacity: 100
max-jobs-per-acquisition: 100
database:
jdbc-batch-processing: false
default-number-of-retries: 1
and this is my code:
@Component
@Scope("prototype")
public class NodeProcess
{
private static final Logger logger = LoggerFactory.getLogger(NodeProcess.class);
@Autowired
private final TaskService taskService;
public NodeProcess(TaskService taskService)
{
this.taskService = taskService;
}
public void execute(DelegateExecution execution) throws Exception
{
System.out.println(getTime() + "[thread:" + Thread.currentThread().getId() + "]"
+ " [node id:" + execution.getCurrentActivityId() + "]");
Thread.sleep(1000 * 5);
}
private static String getTime()
{
SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return "[" + s.format(new Date()) + "] ";
}
}
@RestController
@RequestMapping("/")
public class Controller
{
@Autowired
private RepositoryService repositoryService;
@Autowired
private RuntimeService runtimeService;
@RequestMapping(value = "/start", method = RequestMethod.GET)
public String startBpmnFlow() throws Exception
{
DeploymentBuilder deployment = repositoryService.createDeployment();
BpmnModelInstance instance = Bpmn.readModelFromFile(new File("C:\\Users\\sherl\\Desktop\\process2.bpmn"));
deployment.addModelInstance("C:\\Users\\sherl\\Desktop\\process2.bpmn", instance);
deployment.enableDuplicateFiltering(false);
deployment.source("abcd").deploy();
Map<String, Object> initialVariables = new HashMap<>(1);
runtimeService.startProcessInstanceByKey("process2", initialVariables);
return "ok";
}
}