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

Broadleaf Commerce Discussion Forum

Moderator: jocanas

sumit784
Junior
Junior
Posts: 39
Joined: Thu Feb 05, 2015 12:31 pm

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

Postby sumit784 » Thu Feb 05, 2015 12:40 pm

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
Thanks,
Sumit Rathore

phillipuniverse
Team Member
Team Member
Posts: 1563
Joined: Tue Dec 20, 2011 12:11 pm

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

Postby phillipuniverse » Mon Feb 09, 2015 12:12 am

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?

sumit784
Junior
Junior
Posts: 39
Joined: Thu Feb 05, 2015 12:31 pm

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

Postby sumit784 » Mon Feb 09, 2015 4:08 pm

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
Thanks,
Sumit Rathore

sumit784
Junior
Junior
Posts: 39
Joined: Thu Feb 05, 2015 12:31 pm

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

Postby sumit784 » Sun Feb 15, 2015 1:32 pm

I have figured it out and it now works for me.
Thanks,
Sumit Rathore

manishjain5238
Newbie
Newbie
Posts: 1
Joined: Wed Oct 07, 2015 9:28 am

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

Postby manishjain5238 » Wed Oct 07, 2015 9:33 am

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 \

ajit
Newbie
Newbie
Posts: 2
Joined: Mon Jun 20, 2016 8:24 am

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

Postby ajit » Sun Jul 31, 2016 8:04 am

Hi Sumit I stucked with issue, could you send me the detail steps to add complete new flow like controller,service,entity,dto,dao.


Return to “Broadleaf Commerce”

Who is online

Users browsing this forum: No registered users and 1 guest