# Investigation of Microservice-Based Workflow Management Solutions for Industrial Automation
## 4 Strategies for Workflow Management in a Microservice Architecture
### Workflow Manager and Executor  
The Workflow Manager and the Workflow Executor are two software systems designed to support workflows at several stages of their lifecycle, i.e., during selection, implementation, and execution. The system's main objective is to handle manufacturing workflows at a cell or workstation level, where several CPSs are deployed and provide their capabilities as services to other systems [23]. The systems are to be deployed in a manufacturing Industry 4.0 environment that follows a service-oriented paradigm. Specifically, the implementations  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Workflow challenges** & \begin{tabular}{c} **Workflow** \\ **Manager and Executor** \\ \end{tabular} & \begin{tabular}{c} **Workflow** \\ **Choreographer** \\ \end{tabular} & \begin{tabular}{c} **WSO2 Enterprise** \\ **Integrator** \\ \end{tabular} & \begin{tabular}{c} **Node-RED** \\ **Workflow** \\ **Manager** \\ \end{tabular} & \begin{tabular}{c} **FITMAN-CBPM** \\ **Manager** \\ \end{tabular} \\ \hline \multirow{6}{*}{\begin{tabular}{c} Management interface \\ \end{tabular} } & Workstation manufacturing workflows, mainly & \begin{tabular}{c} Any kind of \\ manufacturing \\ started and \\ stopped by human \\ operators. \\ Furthermore, \\ supporting \\ automatic error \\ handling in \\ runtime \\ \end{tabular} & \
\begin{tabular}{c} Any kind of \\ dataflow or \\ enterprise-level \\ processes with \\ human \\ intervention. \\ Relies on other \\ alternatives for \\ workstation level \\ \end{tabular} &
\begin{tabular}{c} Collaborative \\ business process \\ management and \\ SOA-based \\ environment. The \\ focus is the \\ provision of tools \\ for collaboration \\ among the roles of \\ BPM and \\ manufacturing. \\ \end{tabular} \\ \hline \end{tabular}
\end{table} 
Table 2: Implementation features of the open source workflow technologies analysed. of the present system are designed to work with the Arrowhead framework mandatory core systems in a microservice architecture. This solution relies on two separate software systems, each with their own goals and duties. Workflow Manager systems are designed to retrieve the product recipe information needed to start a particular workflow and command the Workflow Executor accordingly. In traditional factories, this information is stored and provided by a centralized system, such as an MES or factory control system. However, in the foreseen smart factories, this information would be decentralized and carried out by the products themselves, hence the use of the term smart products. A negotiation process will begin between the Workflow Manager and the smart product, which is the holder of the product recipe information, to match the available operations and costs associated with the manufacturing needs and goals of the stakeholders. Once an agreement is reached, the data will be processed and an order will be issued to the companion Workflow Executor. Following the order, the Workflow Executor will activate the corresponding workflow, internally represented by a Finite State Machine (FSM). These workflows involve stages of manufacturing operations, such as assembly, drilling, or milling, that are to be performed by the workstation equipment through service calls. For each product to be manufactured in a workstation, where the Workflow systems are deployed, a dedicated FSM would be needed to automate the workflow. From a general point of view, the FSM's purpose is to specify in which order and with which parameters the workstation services should be requested. The entire process of interactions between the Workflow systems, smart product, and workstation equipment is summarized in Figure 4.  
The choice of the Workflow Manager and Executor solution implies several architectural decisions regarding the operation and management of workflows.