## 1 Introduction  
The manufacturing domain is constantly presented with challenges due to increasing demands for mass customization and leads to a production referred to as \"high-mixlow-volume\" (HMLV) [1]. The fourth industrial revolution, also known as Industry 4.0 (I4.0), promises to solve these challenges through the extraction of information from the production data created by interconnected processes. More specifically, an I4.0 factory will be a pluralism of interconnected processes that stem from new forms of collaboration, such as: machine-to-machine, machine-to-human, and human-to-human [2]. These processes will receive information on ways to efficiently perform manufacturing through the analysis of the production data [3]. Specific examples of the advantages given by the adoption of I4.0 principles can be found in [4]. However, I4.0 concepts are slow to be adopted by European small and medium-sized enterprises (SMEs) [5], especially in the context of robotics [6]. Therefore, ways to further expand their adoption are necessary.  
Human-robot collaboration (HRC), a form of human-machine interaction, is one of the I4.0 areas where adoption is limited. HRC is often implemented to make use of the cognitive abilities of humans to augment machines, executing repetitive or physically strenuous tasks. However, ensuring safety is often a barrier to more widespread usage [7]. This is because changes to an application require review, and possibly an update, to the risk analysis, depending on the significance of the change. While a program can be automatically generated to adapt to new parts that are to be manipulated, risk analysis is completely manually generated at this time and requires the oversight of a safety expert. Therefore, in this paper, a methodology and a software component (i.e., risk analysis tool) to mitigate this issue are presented.  
The main innovation of this work is the risk analysis tool and its integration within the overall connected factory architecture. This integration means that it can automatically identify where changes to components or processes within a specific collaborative robot (cobot) application have been made. In case of changes to the application that could potentially require an update to the risk analysis documentation (as part of the CE marking process), only the changed areas are highlighted. This allows the safety expert to easily see where updates to the risk assessment are required. The overall proposed workflow still requires a human safety expert to review all the changes to the risk analysis and evaluate whether the risks have changed; however, by marking all changes, the burdensome task of searching and finding these areas is eliminated. The authors believe that this is a particularly useful tool that can be used in industry in the near future.  
To present the main innovation of this tool, this article is structured as follows. Initially, an introduction of the state-of-the-art methods of risk analysis in collaborative robotics applications, as well as of smart factories for HMLV productions, is given in Sections 1.1 and 1.2. Second, the overall architecture proposed by the EU-funded project, SHOP4 CF ([https://shop4 cf.eu/](https://shop4 cf.eu/) (accessed on 5 January 2022)) for smart factories of the future, is outlined in Section 2, highlighting specific software components used for process modeling and risk analysis documentation, and for connecting these with a high-level manufacturing execution system (MES). Third, an exemplary use-case, developed within the project to illustrate how the components work in practice and to provide a comparison of the proposed methods against traditional methods through a user test, is presented in Sections 3 and 4. Finally, the main findings and future directions are summarized in Sections 5 and 6.