# Towards a Flexible Smart Factory with a Dynamic Resource Orchestration
## 4 An Assembly Use-Case  
The application of the Orchestrator is discussed and evaluated on several use-cases, as a part of Step IV of the DSR methodology applied in the research. A first assembly use-case was used to set up a laboratory with accompanying simulation and is previously discussed in [19]. Additional use-case, described in this paper, represents a proof-of-concept through an industrial case-study carried out in an isolated and experimental assembly line of an EU-based manufacturer. One of the product types from their product range is shown in Figure 3. It is an industry-optimised controller with built-in I/O elements, that consists of a mainboard with all electronic components pre-integrated, and a compact casing. There are several product variants, slightly differentiated by the interfaces on the front side of the controller. For this paper, it will further be addressed as Controller-A. This case study is based on a simplified real-world assembly process consisting of the following steps:  
1. The integrated mainboard is placed in the plastic bottom casing. 2. Optionally, the default interfaces are replaced with customer-specific ones. 3. The front casing is placed above the mainboard and sealed. 4. The testing phase is conducted by two collaborative resources working in parallel: 1. one is holding the product and performing a robust test, and 2. the other is visually inspecting the product. 5. If any defects are found in the inspection phase, the product is sent for reassembly. 6. If no defects are found, the product is sent for packaging. Both reassembly and packaging are considered separate, complex sub-processes. Figure 3: Controller-A, assembled in the use-case. The complete orchestration process of the assumed Controller-A assembly is described below, elaborating the impact on all the elements of the architecture depicted in Figure 2. Complex sub-processes (assembly process steps 2 and 6) are not described in-depth, as they are decomposed into simpler steps similar to those described below. The numbers given next to all the architectural elements are the same as in Figure 2.  
Usually, in the first step of the orchestration process, a client uses the customer interface (1) to specify a product. The client creates a specification of the product and uploads it, upon which the Orchestration Agent (2) triggers the Process Reasoner (3a) to generate the production process specification and store it in the Knowledge Base (4). This is not the case in the concrete example, as the interface for the upload of the predefined input format is not developed. Process or Quality Engineers will instead use a provided Process Modeller tool (3b) to create the desired production process from scratch and import it to the KB. Therefore, the specification of the production process, similarly a recipe that is used for complete orchestration of all the resources towards the product being delivered, is either created or extended within the Process Modeller. The first process step after the process starts is _'Put Mainboard into the Case'_, represented by a sharp-edged rectangle with an inscribed circle. To perform this step, an allocated resource will require the ability to perform assembling operations and to meet certain constraints while acting. Therefore, this process step is linked to the capability _'Assemble'_, depicted by a rounded rectangle. It is also required to determine the inputs and outputs of every process step, and for this step, the inputs are a bottom cover and a mainboard, while the output is the mainboard placed into the cover. Both inputs and outputs are depicted in Figure 4 by a rounded rectangle marked with 'OUT' or 'IN' in its heading, linked to the process step. The next in line is _'Customise Interface Layout'_, which is a sub-process consisting of several simpler process steps and is depicted by a rectangle with a dashed borderline. It is an optional step and will be performed when required by the product specification.