Node node = stateNode.getNode();
String bpmn2NodeId = (String) metadata.get("UniqueId");
SimulationDataProvider provider = context.getDataProvider();
Map<String, Object> properties = provider.getSimulationDataForNode(node);
TimeGenerator timeGenerator=TimeGeneratorFactory.newTimeGenerator(properties);
long duration = timeGenerator.generateTime();
context.getStaffPoolManager().registerPool(pi.getProcessId(), node, 1);
StaffPool pool = context.getStaffPoolManager().getActivityPool(node.getName());
long waitTime = pool.allocate(context.getClock().getCurrentTime());