# An Intelligent System to Ensure Interoperability for the Dairy Farm Business Model
## 5 Collaborative Negotiation System
### Communication Process  
The communication process is provided by the Middleware layer, which defines the generic mechanisms for broadcasting and synchronizing the offers elaborated during a negotiation process. This layer is an extension of the CLF (Coordination Language Facility) middleware [48] that is needed, in particular, to enrich the possibilities to support the various collaborative activities that take place within the alliance [49]. This extension is called Xplore. At the Xplore Middleware level, a negotiation process is represented as a bicoloured graph. The evolution of a negotiation, in terms of proposals and counterproposals, corresponds to the construction of a black and white graph. In this graph, the white nodes contain information about the attributes of the negotiated task, while black nodes represent decision nodes that may have multiple alternatives. White nodes are characterized by a parameter and a set of attributes with associated values. The parameter is the Negotiation Object that is described at a given moment by the negotiated attributes, depending on the context of the negotiation in the respective white node. During a negotiation, several proposals and counterproposals can be exchanged, so there are several alternatives to continue the negotiation [50]. These alternatives are modelled by black nodes that are, consequently, nodes of exclusive choice among several white nodes. The notion of choice introduced by the black nodes imposes a restriction on the construction of the Xplore graph, namely that sub-graphs that have a common black root must not have any other node in common. According to the architecture of the proposed negotiation system (see Figure 4), at the Middleware level, the negotiation is managed as a process of synchronization of several partial copies of a bicoloured graph. The Coordination Components layer facilitates the instantiation of one or more components for a current negotiation (e.g., Outsrc, Broker, and Block). Each instance manages, depending on its functionalities, a local image of the current negotiation through a bicoloured graph corresponding to the respective agent. These instances interact with the Middleware layer through Xplore primitives to synchronize different bicolour graphs. For example, a negotiation, which involves a potential initiator (DF1) and three possible partners (DF2, DF4, and DF6), requires an instance of the Outsrc  
Figure 6: The simplified version of \(L_{K}\) updated with a new dairy farm \(NEW\_DF\). component that handles the negotiation for the initiator and three instances of the Insrc component for each possible partner. According to the proposed approach wherein the negotiation process is distributed among the alliance participants, the middleware Xplore builds the negotiation graphs in the same manner for each of the partners. Hence, each negotiation participant makes decisions and acts on its own copy of the Xplore graph. Therefore, only the initiator (DF1) has a global view of the negotiation graph, whereas the guests (DF2, DF4, and DF6) have a partial view corresponding to the offers sent to each of them by the initiator. In this respect, the Middleware layer must maintain the graphical image of the negotiations for each participant and synchronize this image with those of the partners involved. To model this synchronization, the Middleware uses six operations (_connect_, _open_, _quit_, _assert_, _request_, and _ready_) to manipulate the graphs. Therefore, the partners communicate indirectly through the proposed operations called verbs. These verbs propagated by Middleware are used by each participant on their copy of the negotiation graph. Subsequently, we explain each verb based on which the communication of the partners is made in the context of a negotiation in the field of dairy products. * Connect(\(n\),\(p\)): this informs a participant, identified by the parameter \(p\), that is invited to a negotiation that has the root \(n\).