MrChuckles
Member
I am looking at integrating a third-party application with EnterpriseOne and have a question regarding 'polling' on the return transaction.
The plan is execute a call from within a 'C' business function and interactively call a custom NER. This NER would parse the data, create a flat text file (ie. a REQUEST transaction), and then copy the flat file (REQUEST) to an 'Exported' directory on the network. The third-party software continuously monitors for files in the 'Exported' directory, processes the transactions, creates a separate flat text file (ie. a RESPONSE transaction), and then copies the RESPONSE text file to an 'Import' directory on the network.
My question is, how do I code the NER to keep polling the 'Import' directory to see if a RESPONSE has been generated? I do not want the NER to return to the calling 'C' business function until either, a RESPONSE has been received, or a pre-determined amount of time has passed (eg. 30 seconds, or so, in which case I'd pass back a status of 'timed out').
I know how to check to see if a RESPONSE has been returned, but I'm not sure how to assign a predetermined 'TIME' limit to the loop?
Any 'best practice' ideas, or constructive thoughts would be appreciated for someone who has done something similar.
Thanks for your assistance.
The plan is execute a call from within a 'C' business function and interactively call a custom NER. This NER would parse the data, create a flat text file (ie. a REQUEST transaction), and then copy the flat file (REQUEST) to an 'Exported' directory on the network. The third-party software continuously monitors for files in the 'Exported' directory, processes the transactions, creates a separate flat text file (ie. a RESPONSE transaction), and then copies the RESPONSE text file to an 'Import' directory on the network.
My question is, how do I code the NER to keep polling the 'Import' directory to see if a RESPONSE has been generated? I do not want the NER to return to the calling 'C' business function until either, a RESPONSE has been received, or a pre-determined amount of time has passed (eg. 30 seconds, or so, in which case I'd pass back a status of 'timed out').
I know how to check to see if a RESPONSE has been returned, but I'm not sure how to assign a predetermined 'TIME' limit to the loop?
Any 'best practice' ideas, or constructive thoughts would be appreciated for someone who has done something similar.
Thanks for your assistance.