in service/src/main/java/org/apache/fineract/cn/office/rest/controller/OfficeRestController.java [319:330]
ResponseEntity<Void> createEmployee(@RequestBody @Valid final Employee employee) throws InterruptedException {
if (employee.getAssignedOffice() != null && !this.officeService.officeExists(employee.getAssignedOffice())) {
throw ServiceException.notFound("Office {0} to assign not found.", employee.getAssignedOffice());
}
if (this.employeeService.employeeExists(employee.getIdentifier())) {
throw ServiceException.conflict("Employee {0} already exists.", employee.getIdentifier());
}
this.commandGateway.process(new CreateEmployeeCommand(employee));
return ResponseEntity.accepted().build();
}