Communitcation between the AS400, CloudFaxGateway and the TF400Gateway

From PresenceWiki
Revision as of 05:02, 11 July 2012 by Graham (Talk | contribs)

Jump to: navigation, search

Host And Port Settings

TF400Gateway (tf400.ini)


CloudFaxGateway (config.xml)


From The AS400 To The TF400Gateway

AQR - Add Queue Request (initiates a message)

From The TF400Gateway To The AS400

MOQ - Message On Queue
MNQ - Message Not Queued

From The TF400Gateway To The CloudFaxGateway

SFR - Scan Folder Request
      8 Folder Reference, C0000239
AMR - Archive Message Request
      X Folder  
LAR - Log Audit Request
      214 AuditItem
IAR - Incoming Audit Request
      50 uniqueId
      14 receiveDate
      48 message
      40 callerid
      40 destination
      50 imagefile
      8  pages
      11 as400
TSR - Test Socket Request
FSU - Failed Status Update
      X Failed Status
CMR - Cancel Message Request
      8 Folder Reference, C0000239

From The CloudFaxGateway To The TF400Gateway

MQC - Message Queue Change
      7 QueueFile
      1 Type(MNQ,MOQ,QRU)

Processing the MOQ/MNQ

In the TF400Gateway RequestHandler the function TimerCloudMOQ_Timer scans the folder

The TF400Gateway scans the D:\Program Files\TF400Gateway\TF400\Queue\ for *.new

Found file D:\Program Files\TF400Gateway\TF400\Queue\

Which contains C0000279-206/0

Once it finds a corresponding MOQ/MNQ in the \\grahamxp\c$\CloudFax400_Files\Queue\

Associated Cloud File MOQ is \\grahamxp\c$\CloudFax400_Files\Queue\C0000279-206-moq.txt

It then sends the MOQ and renames the new file to fcq

Private Sub ProcessMOQMNQFromFolderName(strFolder As String) in the TFRequestHandler

Processing the QRU

When the fax is queued to the cloud a file is created in the Queue directory to monitor it

eg C:\CloudFax400_Files\Queue\C0000277-208-moq.txt

Initially it contains one line:-


Once the CloudFax400 has queried this reference (TF0770320-05/03/12-16:11/32461), it will append any new updates to the file

For example

EP400P1<sep>0770320<sep>TF0770320-05/03/12-16:11/32461<sep>C0000279<sep>206<sep>EP400P1C Date=05032012161127,Attempt=0,Type=JobSubmit,StatusValue=13,Status=W,Description=Des...,Pages=0,Connect Time=0,CSI=ImpsCloud,Number=206,TryAgain= Date=05032012161141,Attempt=0,Type=JobSubmit,StatusValue=13,Status=R,Description=Mes...,Pages=0,Connect Time=0,CSI=ImpsCloud,Number=206,TryAgain= Date=05032012161200,Attempt=1,Type=JobDone,StatusValue=0,Status=S,Description= ok ...,Pages=1,Connect Time=0,CSI=ImpsCloud,Number=206,TryAgain=

This File is then handled by the following Routine in the TF400Gateway QueueManager

TimerExpiredFaxCloud which in turn calls HandleFaxCloudQ

The Gateway looks in the folder:-

D:\Program Files\TF400Gateway\TF400\Queue\ for fcq files. Each of these is a record of a message queued to the CloudFax400

eg, TF0770320-05_03_12-16+11-C0000279.fcq contains C0000279-206/0

The number after the / is the attempts that we've notified the as400 about so far (recorded attempts).

Associated Cloud File is \\grahamxp\c$\CloudFax400_Files\Queue\C0000279-206-moq.txt

Cloud File Contains <b>EP400P1<sep>0770320<sep>TF0770320-05/03/12-16:11/32461<sep>C0000279<sep>206<sep>EP400P1C

We then go through each line of the MOQ file comparing the Attempt number with the recorded attempts.



0< 0?



0< 0?

AssociatedCloudLine=date=05032012161200,attempt=1,type=jobdone,statusvalue=0,status=s,description= ok...


0< 1?



CachePacket=QRUEP400P1 0770320 C0000279 G05032012161259206