# Increasing Resilience of Production Systems by Integrated Design
## 2 Materials and Methods
### Modelling and Execution of Resilient Production Processes
Furthermore, a human operator is responsible for loading and unloading the machine. In order to execute task 4, tasks 1 and 3 must have been executed successfully before. However, task 2 is independent of the other tasks and is only crucial for the success of the whole workflow. This means that if task 2 fails (e.g., due to a malfunction of the milling machine), the other tasks can still be executed and task 2 can be performed later, provided that the defect is remedied. Furthermore, executing the automated tasks (drilling, milling, measuring) requires that the work piece is in the skid of the conveyor belt, while the manual task requires that the work piece has been taken from the skid into the knuckle joint press. By annotating the activities of the process with the required and returned context data, it is possible to verify whether the process is valid. For example, if an activity requires that the work piece be located inside the skid, a preceding activity must have returned \"location = skid\". This standard process annotated with the required and returned context data is depicted in Figure 4.  
Furthermore, these annotations can be utilized to dynamically provide resilience on the level of process execution in case one of the modules fails to perform its designated task. The use case that we want to examine represents a temporary defect of the milling machine, which is supposed to be remedied by a human operator. This resilience can be provided in the form of a modified workflow, which is generated ad hoc upon process errors. For this matter, we propose a Process-Planning Engine (PPE), which can be accessed by the Manufacturing Execution System (MES) and that is able to obtain information from the process itself as well as a context model of the plant. The information flow outlined above requires a suitable architecture, in which contextual information is available in real-time to the PPE. This use case is explored in [21], where an architecture consisting of four layers allowing for real-time communication between the involved components is proposed. One of these layers (the so called \"RESPOND infrastructure\") is responsible for communication via an event bus. Payloads delivered via this event bus include, e.g., sensor data, commands for actuators, or messages sent by components upon their registration. Besides the event bus, components communicate via a peer-to-peer connection. Within this architecture, the proposed PPE can be represented by the \"Process Healing\" node. Based on this architecture, a sequence diagram displaying the information exchange relevant for resilient process planning is shown in Figure 5. As soon as a fault in the current process is detected, a message containing the IDs of the faulty process, the blamable activity, and the involved agents is sent to the PPE. For this matter, the origin of this error message is considered a black box; however, it is conceivable to provide these error messages by means of a Complex Event Processing (CEP) engine. In the architecture proposed by [21], the CEP engine is represented by the \"Process Analysis\" node. Figure 4: Default process of the model machine described in Section 2.4. The activities are annotated with the requirements that the work piece must meet in order to allow for an execution of the activity (“requires”) as well as with the context changes that are applied to the work piece after the execution of the activity (“returns”). Based on these IDs (process, activity, agents, artifacts), the PPE requests the process repository for the process model and the context engine for context information about the involved agents and artifacts. Assuming that the process model is amended by semantic information about the artifact states as shown in Figure 4, the \"required\" and \"returned\" states can be summarized as \"modifications\" and can be mapped to the necessary skill profile of the involved agents. Based on these modifications and skill profiles, two general approaches can be conducted (Figure 6):  
1.