# An Approach to Analyze Vulnerability of Information Flow in Software Architecture
## 3 Proposed Approach
### Construction Approach of Service Invocation Diagram Based on Software Architecture
#### 3.4.1 Determination and Representation of Service Invocation Elements  
There are many relationships between and among services, such as invocation, containment, association, aggregation, cascade, and replacement. In these relationships, invocation is the most capable of reflecting the direction and propagation of the carried information. Before determining the service invocation relationship, we first propose a definition for service invocation and a series of related concepts as the basis for describing the invocation relationship between services. **Definition 6**. : _Service invocation. Service invocation refers to the process of information carried in one service is passed on to another service._  
**Definition 7**. : _Set of service invocations. The set of service invocations is a set consisting of service invocation elements. It can be denoted by a quadruple I. I = {S,R,A,D}, in which S stands for the pair of service involved in the invocation, R represents the invocation relationship, A is the operation sequence of service invocation, and D is the direction of data flow._  
The definitions R, A, and D will be given in definitions 8-10. Before defining the relationship of service invocation R, forms of service invocation should be clarified, including the types of service invocation and forms of service interaction. In serviced-oriented software architecture, there are four types of service invocation: sequence structure, selection structure, parallel structure, and iteration structure [56], as shown in Figure 4. In data flow analysis, it is common to ignore the conditions of the paths, i.e., to assume that all paths are feasible [57]. As a result, based on the four types of service invocation, we can abstract three types of service interaction: one to one, one to many, and many to many. This is also consistent with the interaction relationship between common data elements [58]. Table 3 shows these three types of service interaction. **Definition 8**. : _The relationship of service invocation. The relationship of service invocation refers to the interaction form when service invocation occurs, which can be denoted by a tuple, R = {S,S},S_o}. Ss stands for the invoking service, which is the service that invokes another service, and S\({}_{o}\) stands for the invoked service, which is the service that is invoked. This tuple can be denoted as S\({}_{so}\). For example, if service i invokes service j, then the relationship of this invocation can be denoted as S\({}_{ji}\)._ \begin{table}
\begin{tabular}{c c} \hline \hline
**Data Interaction Relationship** & **Service Interaction Type** \\ \hline One to one & \(S_{1}\)\(S_{2}\) \\ One to many & \(S_{1}\)\(S_{3}\) \\ Many to many & \(S_{4}\)\(S_{4}\) \\ Many to many & \(S_{3}\)\(S_{1}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Types of service interaction. Figure 5 and Table 3 provide examples to show the relationships of the four types of service invocation. For sequence structure, the corresponding type of service interaction is one to one, and the resulting relationship is S12 and S23..., Sn-1 Sn. For parallel structure, the corresponding types of service interactions are one to many and many to one, and the resulting relationship are S1S2, S2S5 AND S1S3, S3S5 AND S1S4, S4S5. For selection structure, the corresponding types of service interaction is one to many and many to one, and the resulting relationship is S1S2, S2S5 OR S1S3, S3S5 OR S1S4, S4S5. For iteration structure, the corresponding type of service interaction is one to one, and the resulting relationship is S1S2 and S2S1. The service invocation process includes not only interaction types, but also operation sequence of service invocation A and direction of data flow D. Next, the operation sequence of service invocation A and the direction of data flow between services resulting from service invocation process will be defined. **Definition 9**. : _Operation sequence of service invocation. Operation sequence of service invocation refers to the set of operations during service invocation.