1. Home
  2. Phase
  3. Link Groups

Link Groups

Link Groups allow phases from 2 or more units to be linked together to share information and synchronize state.

By default FT Batch Link Groups don’t have any inherent functionality; however, S88 Builder assumes certain functionality for the different types of phases.

All Phases 

Any command given to one phase is propagated to all phases.  For example: Holding Transfer-Out will also hold Transfer-In.  Stopping Transfer-In will also stop Transfer-Out.

Transfer Phase 

Link group has 2 or more phases

May have exactly 1 phase configured as an EM phase

Has 1 or more non-EM phases

Starting:

EM phase Sends message with Phase ID and waits

Non-EM phase(s) Receives message and waits

Once all phases are waiting then batch will pass the information and reset the messages.

This will start the phases

Started:

Ending:

EM phase Sends message and waits

Non-EM phase(s) Receives message and waits

Once all phases are waiting then the messages are reset and both phases can complete

Sync Phase

Link group has 2 or more phases

Has exactly 1 phase configured as the Send phase (CP2 = 0)

Has 1 or more phases configured as the Receive phase (CP <> 0)

Starting:

Send phase Sends message and waits

Receive phase(s) Receives message and waits

Started:

Ending:

Completes immediately

Tags

PhDef.IsLink This phase has link partners
PhDef.IsTransfer Transfer Phase which handles link partners with predefined method
PhDef.IsSync Sync Phase which handles link partners with predefined method
PH.Batch.Link1Sent 1st message to link partner was sent
PH.Batch.Link1Rcvd 1st message from link partner was received
PH.Link1Cplt 1st message was sent and received
PH.Batch.Link2Sent 2nd message to link partner was sent
PH.Batch.Link2Rcvd 2nd message from link partner was received
PH.Link2Cplt 2nd message was sent and received
PH.Batch.LinkPending PhDef.IsTransfer AND PH.Batch.Link1Rcvd AND NOT PH.Batch.Link2Rcvd
FTBatch.Q01 Information shared with Link Partner (information = partner’s phase ID)
C.BATCH.SEND/RECEIVE Link Send/Receive Command Constants
Send – send information to all linked partners and wait for response

Receive – wait for information to be sent from link partner

QUESTION: What if there are 2 partners and both send?

PH.Batch.Rqst Request to Send/Receive message with link partners

Cmd – Requested batch command

Active – Command is currently active. This will remain until partner receives message

Snd – Send request is active

Rcv – Receive request is active

   

 

Redesign 

Ph.LinkSnd Send Link Message
Ph.LinkRcv Receive Link Message
Ph.LinkPend Link Message is Pending
Ph.LinkCplt Link Message is Complete
PHAPI.c.Rqst.Snd Sending
PHAPI.c.Rqst.Rcv Receiving
Batch Cmd

SEND

RECEIVE

5201
5501
   

 

 

Ph.LinkSnd

FTBatch.Q01 = PhDef.LinkPartners (2)

FTBatch.Q02 = Ph.LinkData (Ph.ID)

PH.LinkCplt = 0

PH.LinkPend = 1

FTBatch.c.Rqst.Cmd = SEND

FTBatch.c.Rqst.Active = 1

 

Logic

NOT LinkCplt AND (NOT LinkPend OR LinkSnd OR LinkRcv)

IF NOT LinkRcv AND IsSender

Move Ph.ID -> LinkData

Set LinkSnd

LinkCplt AND NOT IsSender

Move LinkData to lnkPhID

Move linked data into linked phase array

lnkPhID -> ph.LinkPhID[n]

Ph.ID -> PHs[lnkPhID].LinkPhID[0]

FTBatch.c.Rqst.Cplt

Ph.LinkPend = 0

Ph.LinkCPlt = 1

If Sending then

Ph.LinkData = FTBatch.Q01 (i.e. Link Data)

The receiver partner count appears to be irrelevant but it could be used to examine other receivers if it knew how many to expect but currently, the logic isn’t informing the receiver of other receivers.  I think the Sync phase logic could be deleted and still work but need to test.

Updated on December 14, 2018

Related Articles

Password Protected