Page 1 of 2

Adding NEW flow (Service -->> DAO --> DB Query -->> DTO flow

Posted: Thu Feb 05, 2015 12:40 pm
by sumit784
Hi,

I am currently trying to create a totally new flow for one of the functionality in the BroadLeaf. Here is the use case :-

- A customer is adding serveral products in wishlist.
- For each product, I have created a "Product_offers" table and storing various deals about that product in this table. Product_id is a foreign key to the existing(inbuilt) products table.
- I have to fetch these offers corresponding to that product and show it in Wishlist, under each product. Something like this :-

WishList ( Inbuilt , out of the box)
-Product1 ( Inbuilt , out of the box)
- Offer1 (To be Fetched using this new flow from "Product_offers" table)
- offer2 (To be Fetched using this new flow from "Product_offers" table)
- offer3....(To be Fetched using this new flow from "Product_offers" table)

Now, I just want to keep this whole customization separate and want to write my own Service, DAO, query, jpa & DTO components to make it work. For controller I am using the inbuilt "Managewishlistcontroller".

I have tried adding it , but either the annotations itself are not being recognized by maven build or its giving some other error.

Can someone, tell me the detailed, step by step flow of adding a totally new frontend-backend flow. FYI.. I have gone thorugh the docs in details, but they only give a small example of extending an existing flow. I am talking about a TOTALLY NEW flow from scratch.

Early response is highly appreciated. We are stuck with it for sometime now and project is getting delayed.

- Sumit Rathore

Re: Adding NEW flow (Service -->> DAO --> DB Query -->> DTO flow

Posted: Mon Feb 09, 2015 12:12 am
by phillipuniverse
If you are doing a completely new flow, you are better served by looking at general Spring/Spring MVC documentation.

What was the error that you were getting?

Re: Adding NEW flow (Service -->> DAO --> DB Query -->> DTO flow

Posted: Mon Feb 09, 2015 4:08 pm
by sumit784
Thanks for replying.
Some of the compilation errors I am getting are :-

- annotations like @service , @Repository etc are not recognized.

- Impl classes are giving error saying the wrong method signature, but they are just the implementation of interfaces with just one method.

- Query is not being recogized neither its query.getResult().

These are few of them, but overall its not compiling the files at all .

Do, I have to make changes only in "site" or in the "core" also, for making a new flow works ?

- Sumit

Re: Adding NEW flow (Service -->> DAO --> DB Query -->> DTO flow

Posted: Sun Feb 15, 2015 1:32 pm
by sumit784
I have figured it out and it now works for me.

Re: Adding NEW flow (Service -->> DAO --> DB Query -->> DTO flow

Posted: Wed Oct 07, 2015 9:33 am
by manishjain5238
Hi Sumit,

Can you please list out what steps were followed while adding new flow? I am facing similar problems.

Thanks in advance

Regards
Manish \

Re: Adding NEW flow (Service -->> DAO --> DB Query -->> DTO flow

Posted: Sun Jul 31, 2016 8:04 am
by ajit
Hi Sumit I stucked with issue, could you send me the detail steps to add complete new flow like controller,service,entity,dto,dao.