service/src/main/java/org/apache/fineract/cn/customer/rest/controller/CustomerRestController.java [161:177]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    customer.setCurrentState(Customer.State.PENDING.name());
    customer.setMember(false);
    if (this.customerService.customerExists(customer.getIdentifier())) {
      throw ServiceException.conflict("Customer {0} already exists.", customer.getIdentifier());
    }

    this.commandGateway.process(new CreateCustomerCommand(customer));

    ProductInstance productInstance = new ProductInstance();
    productInstance.setProductIdentifier(nonPerson.getProductIdentifier());
    productInstance.setCustomerIdentifier(customer.getIdentifier());
    productInstance.setAccountIdentifier(customer.getIdentifier());
    //create account
    depositAccountManager.create(productInstance);

    //activate
    if(nonPerson.isActive()){
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



service/src/main/java/org/apache/fineract/cn/customer/rest/controller/CustomerRestController.java [199:214]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    customer.setCurrentState(Customer.State.PENDING.name());
    customer.setMember(false);
    if (this.customerService.customerExists(customer.getIdentifier())) {
      throw ServiceException.conflict("Customer {0} already exists.", customer.getIdentifier());
    }

    this.commandGateway.process(new CreateCustomerCommand(customer));

    ProductInstance productInstance = new ProductInstance();
    productInstance.setProductIdentifier(nonPerson.getProductIdentifier());
    productInstance.setCustomerIdentifier(customer.getIdentifier());
    productInstance.setAccountIdentifier(customer.getIdentifier());
    //create account
    depositAccountManager.create(productInstance);
    //activate
    if(nonPerson.isActive()){
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



