Skip to content

Latest commit

 

History

History
445 lines (355 loc) · 38.4 KB

README.md

File metadata and controls

445 lines (355 loc) · 38.4 KB


Demo module definition

Quality Gate Status

Introduction

This is a demo order management application (backend and frontend).

Import

To import this module:

  • Create a module named Demo
  • Set the settings as:
{
	"type": "git",
	"origin": {
		"uri": "https://github.com/simplicitesoftware/module-demo.git"
	}
}
  • Click on the Import module button

Configure

In order to have the frontend examples working the password for the webservices-only user website must be simplicite.

This can be achieved by importing the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<simplicite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.simplicite.fr/base" xsi:schemaLocation="http://www.simplicite.fr/base https://www.simplicite.io/resources/schemas/base.xsd">
<object>
	<name>UserPwd</name>
	<action>update</action>
	<data>
		<usr_login_read>website</usr_login_read>
		<usr_password>simplicite</usr_password>
	</data>
</object>
</simplicite>

Load data

Some sample data is provided as a module's dataset. It contains:

  • Sample providers
  • Sample products
  • Sample customers

Open this dataset and click on the Apply button after having imported the module and made a full clear cache.

Quality

This module can be analysed by the SonarQube analysis tool using this command:

mvn verify sonar:sonar

DemoContact business object definition

The contact object holds the interactions with the clients.

A contact can be linked or not a an order of the selelcted client (when linked to an order the demoCtcOrdId field is set).

Fields

Name Type Required Updatable Personal Description
demoCtcDatetime datetime yes* Contcat date and time
demoCtcType enum(10) using DEMO_CTC_TYPE list yes yes Contact type
demoCtcSubType enum(10) using DEMO_CTC_SUBTYPE list yes Contact sub type
demoCtcCanal enum(10) using DEMO_CTC_CANAL list yes yes Canal used for contact
demoCtcPriority boolean yes yes Contact priority
demoCtcStatus enum(1) using DEMO_CTC_STATUS list yes yes Contact status
demoCtcCliId link to DemoClient id yes* yes Contact customer
Ref. demoCtcCliId.demoCliCode regexp(10) Customer code
Ref. demoCtcCliId.demoCliFirstname char(100) yes Customer first name
Ref. demoCtcCliId.demoCliLastname char(100) yes Customer last name
Ref. demoCtcCliId.demoCliEmail email(50) yes Customer email address
Ref. demoCtcCliId.demoCliHomePhone phone(20) yes Customer home phone number
Ref. demoCtcCliId.demoCliWorkPhone phone(20) yes Customer work phone number
Ref. demoCtcCliId.demoCliMobilePhone phone(20) yes Customer mobile phone number
Ref. demoCtcCliId.demoCliFax phone(20) yes Customer fax number
demoCtcOrdId link to DemoOrder id yes Contact order
Ref. demoCtcOrdId.demoOrdNumber int(11) Order number (automatically calculated at creation)
Ref. demoCtcOrdId.demoOrdDate date Order date
Ref. demoCtcOrdId.demoOrdStatus enum(30) using DEMO_ORD_STATUS list Order status
Ref. demoCtcOrdId.demoOrdCliId id Order customer
Ref. demoOrdCliId.demoCliCode regexp(10) Customer code
Ref. demoCtcOrdId.demoOrdPrdId id Order product
Ref. demoOrdPrdId.demoPrdSupId id Product supplier
Ref. demoPrdSupId.demoSupCode regexp(50) Supplier unique code (e.g. MYSUP)
Ref. demoPrdSupId.demoSupUsrId id User responsible of supplier
Ref. demoOrdPrdId.demoPrdReference regexp(10) Product reference
Ref. demoOrdPrdId.demoPrdName char(100) Product name
Ref. demoCtcOrdId.demoOrdQuantity int(11) Product quantity ordered
demoCtcFile document yes Contact attached file
demoCtcPicture image yes -
demoCtcMessages notepad(50000) yes yes Messages

Lists

  • DEMO_CTC_TYPE
    • INF Information
    • REQ Request
    • CMP Complaint
    • OTH Other
  • DEMO_CTC_SUBTYPE
    • EMPTY
  • DEMO_CTC_CANAL
    • PHONE Code PHONE
    • EMAIL Code EMAIL
    • CHAT Code CHAT
    • WEB Code WEB
  • DEMO_CTC_STATUS
    • O Open
    • C Closed
    • P Processing
  • DEMO_ORD_STATUS
    • P Pending status
    • H On hold
    • V Validated status
    • D Shipped status
    • C Canceled status

DemoContactHistoric business object definition

Contact object history, tracks changes on:

  • Status
  • Type and/or subtype
  • Comments

Fields

Name Type Required Updatable Personal Description
row_ref_id link to DemoContact id yes* Record row ID
row_idx int(11) yes* yes History record index
created_by_hist char(100) yes* Created by
created_dt_hist datetime yes* Created date
demoCtcStatus enum(1) using DEMO_CTC_STATUS list yes yes Contact status
demoCtcType enum(10) using DEMO_CTC_TYPE list yes yes Contact type
demoCtcSubType enum(10) using DEMO_CTC_SUBTYPE list yes Contact sub type

Lists

  • DEMO_CTC_STATUS
    • O Open
    • C Closed
    • P Processing
  • DEMO_CTC_TYPE
    • INF Information
    • REQ Request
    • CMP Complaint
    • OTH Other
  • DEMO_CTC_SUBTYPE
    • EMPTY

DemoOrder business object definition

The order business object corresponds to the product orders placed by clients.

An order is for one single product.

Fields

Name Type Required Updatable Personal Description
demoOrdNumber int(11) yes* Order number (automatically calculated at creation)
demoOrdDate date Order date
demoOrdStatus enum(30) using DEMO_ORD_STATUS list yes yes Order status
demoOrdDeliveryDate datetime yes Order delivery date
demoOrdCliId link to DemoClient id yes* yes Order customer
Ref. demoOrdCliId.demoCliCode regexp(10) Customer code
Ref. demoOrdCliId.demoCliFirstname char(100) yes Customer first name
Ref. demoOrdCliId.demoCliLastname char(100) yes Customer last name
Ref. demoOrdCliId.demoCliEmail email(50) yes Customer email address
Ref. demoOrdCliId.demoCliAddress1 char(100) yes Customer address (line 1)
Ref. demoOrdCliId.demoCliAddress2 char(100) yes Customer address (line 2)
Ref. demoOrdCliId.demoCliZipCode char(10) yes Customer postal code
Ref. demoOrdCliId.demoCliCity char(50) yes Customer city
Ref. demoOrdCliId.demoCliCountry enum(30) using DEMO_COUNTRY list yes Customer country
demoOrdPrdId link to DemoProduct id yes* yes Order product
Ref. demoOrdPrdId.demoPrdReference regexp(10) Product reference
Ref. demoOrdPrdId.demoPrdName char(100) Product name
Ref. demoOrdPrdId.demoPrdType enum(50) using DEMO_PRD_TYPE list Product type
Ref. demoOrdPrdId.demoPrdPicture image Product picture
Ref. demoOrdPrdId.demoPrdSupId id Product supplier
Ref. demoPrdSupId.demoSupCode regexp(50) Supplier unique code (e.g. MYSUP)
Ref. demoPrdSupId.demoSupName char(100) Supplier name
Ref. demoPrdSupId.demoSupLogo image Supplier logo
Ref. demoPrdSupId.demoSupUsrId id User responsible of supplier
Ref. demoOrdPrdId.demoPrdStock int(11) Current stock for product
Ref. demoOrdPrdId.demoPrdUnitPrice float(11, 2) Unit price of product
demoOrdUnitPrice float(11, 2) Product unit price for order
demoOrdQuantity int(11) yes yes Product quantity ordered
demoOrdTotal float(11, 2) Total order amount
demoOrdVAT float(11, 2) VAT for order
demoOrdComments notepad(50000) yes Comments on order

Lists

  • DEMO_ORD_STATUS
    • P Pending status
    • H On hold
    • V Validated status
    • D Shipped status
    • C Canceled status
  • DEMO_COUNTRY
    • FR France
    • UK United Kingdom
    • SP Spain
  • DEMO_PRD_TYPE
    • LAPTOP Laptop
    • DESKTOP Desktop
    • TABLET Tablet
    • SMARTPHONE Smartphone
    • OTHER Other

DemoOrderHistoric business object definition

Order object history, tracks changes on:

  • Status
  • Quantity

Fields

Name Type Required Updatable Personal Description
row_ref_id link to DemoOrder id yes* Record row ID
row_idx int(11) yes* yes History record index
created_by_hist char(100) yes* Created by
created_dt_hist datetime yes* Created date
demoOrdStatus enum(30) using DEMO_ORD_STATUS list yes yes Order status
demoOrdQuantity int(11) yes yes Product quantity ordered

Lists

  • DEMO_ORD_STATUS
    • P Pending status
    • H On hold
    • V Validated status
    • D Shipped status
    • C Canceled status

DemoProductHistoric business object definition

Product object history, tracks changes on:

  • Product name
  • Unit price
  • Availability

Fields

Name Type Required Updatable Personal Description
row_ref_id link to DemoProduct id yes* Record row ID
row_idx int(11) yes* yes History record index
created_by_hist char(100) yes* Created by
created_dt_hist datetime yes* Created date
demoPrdReference regexp(10) yes* yes Product reference
demoPrdName char(100) yes yes Product name
demoPrdUnitPrice float(11, 2) yes yes Unit price of product
demoPrdAvailable boolean yes yes Available product?

DemoSupplier business object definition

The supplier business object corresponds to the suppliers of products that can be ordered.

Fields

Name Type Required Updatable Personal Description
demoSupCode regexp(50) yes* yes Supplier unique code (e.g. MYSUP)
demoSupName char(100) yes yes Supplier name
demoSupDescription html(1000000) yes Supplier description
demoSupPhone phone(20) yes Supplier phone number
demoSupFax phone(20) yes Supplier fax number
demoSupWebsite url(100) yes Supplier website URL
demoSupEmail email(20) yes Supplier email address
demoSupLogo image yes Supplier logo
demoSupUsrId link to User id yes User responsible of supplier
Ref. demoSupUsrId.usr_login regexp(100) yes Login
demoSupComments notepad(50000) yes Comments on supplier

DemoProduct business object definition

The product business object corresponds to the products that can be ordered.

Its reference is unique per supplier.

Fields

Name Type Required Updatable Personal Description
demoPrdSupId link to DemoSupplier id yes* yes Product supplier
Ref. demoPrdSupId.demoSupCode regexp(50) Supplier unique code (e.g. MYSUP)
Ref. demoPrdSupId.demoSupName char(100) Supplier name
Ref. demoPrdSupId.demoSupLogo image Supplier logo
Ref. demoPrdSupId.demoSupUsrId id User responsible of supplier
demoPrdReference regexp(10) yes* yes Product reference
demoPrdName char(100) yes yes Product name
demoPrdType enum(50) using DEMO_PRD_TYPE list yes yes Product type
demoPrdDescription text(1000000) yes Product description
demoPrdPicture image yes Product picture
demoPrdEan13 char(13) yes EAN13 code
demoPrdEan13Image image EAN13 code image
demoPrdStock int(11) yes yes Current stock for product
demoPrdUnitPrice float(11, 2) yes yes Unit price of product
demoPrdAvailable boolean yes yes Available product?
demoPrdFeatured boolean yes yes Featured product?
demoPrdDocumentation html(1000000) yes Product documentation
demoPrdBrochure document yes Product brochure
demoPrdOnlineDoc url(255) yes Online product documentation URL
demoPrdComments notepad(50000) yes Comments on product

Lists

  • DEMO_PRD_TYPE
    • LAPTOP Laptop
    • DESKTOP Desktop
    • TABLET Tablet
    • SMARTPHONE Smartphone
    • OTHER Other

Custom actions

  • DEMO_DECSTOCK: Product stock decrement triggered by the order state transition to shipped status.
  • DEMO_PRD_EMAIL: Send product information by email
  • DEMO_INCSTOCK: Sample action for product stock increment (by N specified in the product business object code).

DemoClient business object definition

The client business object corresponds to the customer who places order.

His address is geolocalized using GoogleMaps® API.

Fields

Name Type Required Updatable Personal Description
demoCliCode regexp(10) yes* yes Customer code
demoCliFirstname char(100) yes yes yes Customer first name
demoCliLastname char(100) yes yes yes Customer last name
demoCliAddress1 char(100) yes yes yes Customer address (line 1)
demoCliAddress2 char(100) yes yes Customer address (line 2)
demoCliZipCode char(10) yes yes yes Customer postal code
demoCliCity char(50) yes yes yes Customer city
demoCliCountry enum(30) using DEMO_COUNTRY list yes yes yes Customer country
demoCliCoords geocoords yes yes Customer geoccordinates
demoCliEmail email(50) yes yes Customer email address
demoCliHomePhone phone(20) yes yes Customer home phone number
demoCliWorkPhone phone(20) yes yes Customer work phone number
demoCliMobilePhone phone(20) yes yes Customer mobile phone number
demoCliFax phone(20) yes yes Customer fax number
demoCliType enum(30) using DEMO_CLI_TYPE list yes yes Customer type
demoCliComments html(1000000) yes Useful comments on customer
demoCliPlacemapLabel char(100) yes Customer place map label

Lists

  • DEMO_COUNTRY
    • FR France
    • UK United Kingdom
    • SP Spain
  • DEMO_CLI_TYPE
    • T1 Code T1
    • T2 Code T2
    • T3 Code T3

DemoOrderCreate business process definition

Order entry activity workflow

Activities

  • Begin: Begin activity
  • ClientSelect: Customer selection activity
  • SupplierSelect: Supplier selection activity
  • ProductSelect: Selected supplier's product selection activity
  • OrderCreate: Order creation form activity
  • End: End activity

DemoCatalog external object definition

Custom JSON web service for getting the product catalog

DemoCounters external object definition

Counters

DemoOrderAgenda external object definition

Order delivery agenda

DemoPlaceNewOrder external object definition

Place new order internal page