Build add to cart feature using Camunda

Hi,

I am now doing POC for a company project. I am trying to understand multiple scenarios.

Scenario:
As a customer I should be able to operate cart & place order. In this case all customer are logged in.

In normal case list of API will be as following:

  1. Add product
  2. Remove product
  3. Change quantity
  4. Place order

In this case, 1, 2, 3 can run multiple number of times in any pattern till 4th one.
For example, 1,3,2,2,3,3,2,4

Questions:

  1. How to achieve this using Camunda?
  2. If customer logs in again, I want same cart without creating a new cart. How to achieve this?
  3. Is this common practice?

Regards

Hello @anon8058936

Welcome to the forum!

This model would satisfy the requirements

If you want a user to be able to come back to it at any time, simply create the process with with a business key that represents the user. Then, the next time they log it you shuold query for a process that matches that id and then you’ll be able to load the last known state.

1 Like

Hi @Niall,

Thank you for your detailed response.

Can you please give list of BPMN example for such simple scenarios? It will be really good to comprehend.

Would you recommend resources to learn and understand better?

What are the best practices? What should we avoid?

Any reference or detail would help us a lot.

Regards

I strongly suggest that if you intend to use Camunda, you should start with learning BPMN.
Because this is an open standard there are lots of resources out there for learning it. Camunda itself runs online trainings frequently. BPMN 2.0 Training - Camunda

We do offer a best practice guide for modeling but it’s better that you first understand the notation before making us of it: Camunda Best Practices - Creating Readable Process Models

1 Like