Skip to content

Use case: As a system I want to process all the PO events, validate, trigger new business rules and update database accordingly #27

@juanfranblanco

Description

@juanfranblanco

Description:
When an Purchase Order is created and / or updated a backend processing job will be pulling for events to update the internal storage of the different changes, and / or message queue other services for further processing business logic.

Business process(es)

  • Any purchase order / linked to a quote will need to be re validated and flag accordingly in case of internal issues
  • Stock will need to be allocated accordingly (if not done already) for example anyone interacting with the smart contracts directly.
  • Notifications might need to be send (users email), delivery etc.
  • Drop-shipping integration
  • Fund management
    • Release of funds when user happy with delivery
    • Release of funds when accepted cancellation (if further validation is needed)

Storage

  • Purchase orders (Change of State)
  • Quote (basket) transaction confirmed / linked to a Purchase Order.
  • Images (if any image is referenced on a purchase order, they may required to be published or format in IPFS)

Reference architecture

Web Job in Ujo backend
The usage of web jobs provides a simple way to manage, scale and error reporting. Nethereum processing based can be hooked up into web jobs to either run locally the business logic and queue further work to other "micro services".

Web job Processing Job: https://github.com/Nethereum/ujo-backend/tree/master/Ujo.Work/Ujo.WorkRegistry.WebJob
Web job Singleton: https://github.com/Nethereum/ujo-backend/blob/master/Ujo.Work/Ujo.WorkRegistry.WebJob/Functions.cs#L23
Configuration: https://github.com/Nethereum/ujo-backend/blob/master/Ujo.Work/Ujo.WorkRegistry.WebJob/ConfigurationSettings.cs

IPFS Image Processing
On disputes there might be a need to upload images that will required further processing to scale / display on UI
https://github.com/Nethereum/ujo-backend/blob/master/Ujo.Work/Ujo.Work.WebJob/Functions.cs#L22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions