## 5 Design of the MES System
### Modeling of MES System
#### 2.2.1 Communication Diagram  
The main communication flow represents the interaction from the customer order (individuals) to process-specific production information to delivery (Figure 9).  
Figure 8: Component diagram for design of cloud-based collaborative MES.  
Figure 9: Communication diagram for design of cloud-based collaborative MES.  
1 The customer places an order for a product. Based on this order, the brand manufacturer creates a design proposal and generates order and design information and work orders that are sent to the collaborating companies.
2 Through the cloud, the fabric supplier verifies the fabric order information and completes the fabric delivery information. The print shop documents the amount of fabric used (including WIP). The sewing plant queries the WIP information and adds its own information on fabric consumption (including WIP) and product delivery via the cloud.
3 The brand manufacturer verifies the order processing status of each cooperating company via the cloud, checks the product delivery information, and the customer receives the finished product.
4 Activity Diagram  
An activity diagram is used to identify the required interactions between the central components (Figure 10). The data generated by the barcode systems, sensors, and various IoT devices are collected by the cloud system, and the required information is provided to the cooperating companies.  
Through this information exchange, the cooperating companies can easily create and manage intelligent production schedules. For each order, a status query can be made on the exchanged order, design, and process information. Owing to the continuous recording of production defects throughout the entire production process, all defects can be corrected by the time the customer orders are completed.  
4 Class Diagram  
The class diagram represents the actors defined in the component diagram as independent classes (Figure 11). In addition, there are classes for order management, for defect management, and for RMI and WIP defect checking. The diagram is composed by defining the exchange data and interfaces between all classes.  
Through the modeling process of the collaborative MES system thus far, the conceptual framework for system development is presented in Figure 12.  
In the proposed framework, for process tracking according to product orders, each company needs a traceability system to provide material flow data to the MES system. Information on work performance is generated via an IoT device on the sewing machine,  
Figure 10: Activity diagram for design of cloud-based collaborative MES.  
information on the status of order processing via the vision sensor (QR code recognition), and information on measurement data via the temperature and humidity sensor. The information is stored in the database via the IoT gateway. In this process, the MES system must be networked with the ERP system to store customer order information and manage design information and work order information.  
Figure 11: Class diagram for design of cloud-based collaborative MES.  
Figure 12: Conceptual framework for cloud-based collaborative MES.