Synchronizing phases with link groups
Depending on your needs, you might want one phase to communicate with another phase. Typically, this happens when you need to synchronize the actions of both phases. You can synchronize two or more phases by creating a phase link group.
Link groups allow the logical organization of phases within a recipe in order to facilitate communication and synchronization of those phases. Once grouped, the phases either request a message from or submit a message to the group. How each phase sends, receives and uses that message is determined by the logic written in the individual phases. An integer number distinguishes messages. The phases must all use the same message number in order to synchronize.
Phase link messages have no relationship to the Operator messages that are defined at the Phase Class.To send or receive a message, the phase issues a request and then waits for the Batch Executive to acknowledge the request. The phase continues to process its FAIL_MONITOR to check for failures while it is waiting.
In order for synchronized phases to run, all phases must be active simultaneously. If one phase becomes active before the other phases in the link group, the active phase can send its message and wait for the other phases to activate and send their messages. Once all of the phases have sent their messages, the Batch Executive sends an acknowledgement to all of the phases in the link group, which can then continue their execution. In this way, the phases are synchronized.
For example, the operations in the sample application transfer material to a reactor and mix the paint base and color together. In order for the transfer to be successful, three phases must be synchronized. Now, assume the phase XFER_IN in the FINAL operation becomes active first. The XFER_IN phase waits for the other phases in the link group to become active and send their messages. Once all of the phases are active, the Batch Executive acknowledges them so that they are synchronized and continue running.