Table of content



The Product entity within the microservice architecture

Entity-Relationship-Model of <ProductService>

Entity Name: Product

Data Schema: Shop

Master Service: ProductService


Dataflow of entity of Product

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
ArticleNumberSTRINGProduct
BarCodeSTRINGProduct
CountryOfOriginLONGProductCountry
HarmonizedCodeSTRINGProduct
MetaDescriptionSTRINGProduct
NeedsShipmentBOOLProduct
PageTitleSTRINGProduct
PageURLSTRINGProduct
PrimaryKeyLONGProduct
ProductCategoryLONGProductProductCategory
ProductTitleSTRINGProduct
SalesTaxLONGProductSalesTax
ServerReplicationVersionLONGProduct
ShopOwnerLONGProduct
ShopVisibilityBOOLProduct
StopSalesIfStockEmptyBOOLProduct
TagsSTRINGProduct
WeightDOUBLEProduct

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/purchaserule/product/{id}GETfindAllPurchaseRuleOfProduct(id)ProductServiceProduct PurchaseRule
/productPOSTinsertProduct(product)ProductServiceProduct
/productGETfindAllProduct()ProductServiceProduct
/discountcampaignproduct/product/{id}GETfindAllDiscountCampaignProductOfProduct(id)DiscountCampaignServiceProduct DiscountCampaignProduct
/product/countryoforigin/{id}GETfindAllProductOfCountryOfOrigin(id)ProductServiceCountry Product
/orderitem/product/{id}GETfindAllOrderItemOfProduct(id)ProductServiceProduct OrderItem
/product/productcategory/{id}GETfindAllProductOfProductCategory(id)ProductServiceProductCategory Product
/productdelivery/product/{id}GETfindAllProductDeliveryOfProduct(id)ProductServiceProduct ProductDelivery
/product/salestax/{id}GETfindAllProductOfSalesTax(id)ProductServiceSalesTax Product
/product/{id}DELETEdeleteProductById(id)ProductServiceProduct
/productprice/product/{id}GETfindAllProductPriceOfProduct(id)ProductServiceProduct ProductPrice
/product/{id}PUTupdateProductById(product)ProductServiceProduct
/product/{id}GETfindProductById(id)ProductServiceProduct

Distributed transaction of <Product>

Pseudo code snippet

final Product product = (Product) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/product/" + id, Product.class);
if (product != null) {
    final SalesTax salestax1 = (SalesTax) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/salestax/" + product.getSalesTax().getId(), SalesTax.class);
    if (salestax1 != null) {
        final Country country2 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + salestax1.getCountry().getId(), Country.class);
        if (country2 != null) {
        }
    }
    final ProductCategory productcategory3 = (ProductCategory) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/productcategory/" + product.getProductCategory().getId(), ProductCategory.class);
    if (productcategory3 != null) {
    }
    final Country countryoforigin4 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + product.getCountryOfOrigin().getId(), Country.class);
    if (countryoforigin4 != null) {
    }
}
return product;


Table of content