Difference between revisions of "Communitcation between the AS400, CloudFaxGateway and the TF400Gateway"
(37 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | <h2>Host And Port Settings</h2> | ||
+ | |||
+ | <b>TF400Gateway (tf400.ini)</b> | ||
+ | |||
+ | FaxCloudGatewayAddress=192.168.65.27 | ||
+ | FaxCloudGatewayPortListen=4450 | ||
+ | FaxCloudGatewayPortSend=4451 | ||
+ | |||
+ | <b>CloudFaxGateway (config.xml)</b> | ||
+ | |||
+ | <tf400gatewayaddress>192.168.65.61</tf400gatewayaddress> | ||
+ | <portlistentogateway>4451</portlistentogateway> | ||
+ | <portsendtogateway>4450</portsendtogateway> | ||
+ | |||
+ | <h2>From The AS400 To The TF400Gateway</h2> | ||
+ | |||
+ | <b>AQR</b> - Add Queue Request (initiates a message) | ||
+ | |||
+ | <h2>From The TF400Gateway To The AS400</h2> | ||
+ | |||
+ | <b>MOQ</b> - Message On Queue | ||
+ | |||
+ | <b>MNQ</b> - Message Not Queued | ||
+ | |||
+ | <b>QRU</b> - Queue Record Update (eg Gone,Failed,Retry) | ||
+ | |||
<h2>From The TF400Gateway To The CloudFaxGateway</h2> | <h2>From The TF400Gateway To The CloudFaxGateway</h2> | ||
<b>SFR</b> - Scan Folder Request | <b>SFR</b> - Scan Folder Request | ||
− | + | 8 Folder Reference, C0000239 | |
− | 8 | + | |
<b>AMR</b> - Archive Message Request | <b>AMR</b> - Archive Message Request | ||
− | + | X Folder | |
− | + | ||
<b>LAR</b> - Log Audit Request | <b>LAR</b> - Log Audit Request | ||
− | + | 214 AuditItem | |
− | + | ||
<b>IAR</b> - Incoming Audit Request | <b>IAR</b> - Incoming Audit Request | ||
− | + | 50 uniqueId | |
− | 8 | + | 14 receiveDate |
+ | 48 message | ||
+ | 40 callerid | ||
+ | 40 destination | ||
+ | 50 imagefile | ||
+ | 8 pages | ||
+ | 11 as400 | ||
<b>TSR</b> - Test Socket Request | <b>TSR</b> - Test Socket Request | ||
− | |||
− | |||
<b>FSU</b> - Failed Status Update | <b>FSU</b> - Failed Status Update | ||
− | + | X Failed Status | |
− | 8 | + | |
+ | <b>CMR</b> - Cancel Message Request | ||
+ | 8 Folder Reference, C0000239 | ||
<h2>From The CloudFaxGateway To The TF400Gateway</h2> | <h2>From The CloudFaxGateway To The TF400Gateway</h2> | ||
− | <b>MQC</b> - Message Queue | + | <b>MQC</b> - Message Queue Change |
7 QueueFile | 7 QueueFile | ||
1 Type(MNQ,MOQ,QRU) | 1 Type(MNQ,MOQ,QRU) | ||
+ | |||
+ | <h2>Processing the MOQ/MNQ</h2> | ||
+ | |||
+ | In the TF400Gateway RequestHandler the function <b>TimerCloudMOQ_Timer</b> scans the folder | ||
+ | |||
+ | The TF400Gateway scans the D:\Program Files\TF400Gateway\TF400\Queue\ for *.new | ||
+ | |||
+ | Found file D:\Program Files\TF400Gateway\TF400\Queue\TF0770320-05_03_12-16+11-C0000279.new | ||
+ | |||
+ | 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 | ||
+ | |||
+ | <b>Private Sub ProcessMOQMNQFromFolderName(strFolder As String)</b> in the TFRequestHandler | ||
+ | |||
+ | <h2>Processing the QRU</h2> | ||
+ | |||
+ | 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:- | ||
+ | |||
+ | <b>EP400P1<sep>0770320<sep>TF0770320-05/03/12-16:11/32461<sep>C0000279<sep>206<sep>EP400P1C</b> | ||
+ | |||
+ | Once the CloudFax400 has queried this reference (<b>TF0770320-05/03/12-16:11/32461</b>), it will append any new updates to the file | ||
+ | |||
+ | For example | ||
+ | |||
+ | <b> | ||
+ | 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= | ||
+ | </b> | ||
+ | |||
+ | 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:- | ||
+ | |||
+ | <b>D:\Program Files\TF400Gateway\TF400\Queue\</b> for fcq files. | ||
+ | Each of these is a record of a message queued to the CloudFax400 | ||
+ | |||
+ | eg, <b>TF0770320-05_03_12-16+11-C0000279.fcq</b> contains <b>C0000279-206/0</b> | ||
+ | |||
+ | The number after the / is the attempts that we've notified the as400 about so far (recorded attempts). | ||
+ | |||
+ | <b>Associated Cloud File is \\grahamxp\c$\CloudFax400_Files\Queue\C0000279-206-moq.txt</b> | ||
+ | |||
+ | <b>Cloud File Contains <b>EP400P1<sep>0770320<sep>TF0770320-05/03/12-16:11/32461<sep>C0000279<sep>206<sep>EP400P1C</b> | ||
+ | |||
+ | We then go through each line of the MOQ file comparing the Attempt number with the recorded attempts. | ||
+ | |||
+ | <b> | ||
+ | AssociatedCloudLine=date=05032012161127,attempt=0,type=jobsubmit,statusvalue=13,status=w,description=des... | ||
+ | |||
+ | strAttempt=0 | ||
+ | |||
+ | 0< 0? | ||
+ | |||
+ | AssociatedCloudLine=date=05032012161141,attempt=0,type=jobsubmit,statusvalue=13,status=r,description=mes... | ||
+ | |||
+ | strAttempt=0 | ||
+ | |||
+ | 0< 0? | ||
+ | |||
+ | AssociatedCloudLine=date=05032012161200,attempt=1,type=jobdone,statusvalue=0,status=s,description= ok... | ||
+ | |||
+ | strAttempt=1 | ||
+ | |||
+ | 0< 1? | ||
+ | |||
+ | strType=jobdone | ||
+ | |||
+ | ConvertFaxComStatusToCode=G | ||
+ | |||
+ | CachePacket=QRUEP400P1 0770320 C0000279 G05032012161259206 | ||
+ | |||
+ | </b> |
Latest revision as of 09:06, 11 July 2012
Contents
Host And Port Settings
TF400Gateway (tf400.ini)
FaxCloudGatewayAddress=192.168.65.27 FaxCloudGatewayPortListen=4450 FaxCloudGatewayPortSend=4451
CloudFaxGateway (config.xml)
<tf400gatewayaddress>192.168.65.61</tf400gatewayaddress> <portlistentogateway>4451</portlistentogateway> <portsendtogateway>4450</portsendtogateway>
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
QRU - Queue Record Update (eg Gone,Failed,Retry)
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\TF0770320-05_03_12-16+11-C0000279.new
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:-
EP400P1<sep>0770320<sep>TF0770320-05/03/12-16:11/32461<sep>C0000279<sep>206<sep>EP400P1C
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.
AssociatedCloudLine=date=05032012161127,attempt=0,type=jobsubmit,statusvalue=13,status=w,description=des...
strAttempt=0
0< 0?
AssociatedCloudLine=date=05032012161141,attempt=0,type=jobsubmit,statusvalue=13,status=r,description=mes...
strAttempt=0
0< 0?
AssociatedCloudLine=date=05032012161200,attempt=1,type=jobdone,statusvalue=0,status=s,description= ok...
strAttempt=1
0< 1?
strType=jobdone
ConvertFaxComStatusToCode=G
CachePacket=QRUEP400P1 0770320 C0000279 G05032012161259206