MDN and state files, a confirmation?

You are here

MDN and state files, a confirmation?

6 posts / 0 new
Last post
darz
darz's picture
MDN and state files, a confirmation?

Hi all, sorry i'm still quite new to AS2 so please forgive my ignorance.

I have 2 questions:

Firstly, would I be correct in saying that a .state file created in a sent directory can be used to confirm whether a file was transferred successfully? (ie state=OK, state=ERROR for error obviously) I'm wanting to use this state to control a receipt acknowledgment flag in another application.

Secondly, if the above is correct is there any issue with moving .state files out of the sent directories? Does AS2 require the .state file to remain in sent dir after it is produced?

Cheers

Darz

darz
darz's picture

alternatively we could query the hSQL DB for state flag = 1 (2 or 3 for error).

heller
heller's picture

Darz,

the state file contains the state of a transaction. It is not required by the m-e-c as2 server, you could move it anywhere.

Performing a query on the db will work, too. But please be aware that there is no flag if the transaction is already finished, dont read the state before the transaction has been finished.

The next release of m-e-c as2 will contain the possibility to execute a command after receipt (success) of messages and sent (error, success).

Regards
Heller

darz
darz's picture

Thanks for the reply Heller, ill take all that into consideration.

So the .state file is created after transaction is finished? I think this will be easiest for us to use to trigger acknowledgment.

heller
heller's picture

darz,

the state file is written after the transaction has been finished. Whenever it exists it is save regarding the transaction state to process it.

Regards
Heller

darz
darz's picture

thank you for the clarification Heller :)